CN106598488B - Distributed data read method and device - Google Patents

Distributed data read method and device Download PDF

Info

Publication number
CN106598488B
CN106598488B CN201611042476.7A CN201611042476A CN106598488B CN 106598488 B CN106598488 B CN 106598488B CN 201611042476 A CN201611042476 A CN 201611042476A CN 106598488 B CN106598488 B CN 106598488B
Authority
CN
China
Prior art keywords
target data
memory node
read request
memory
read
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201611042476.7A
Other languages
Chinese (zh)
Other versions
CN106598488A (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.)
Beijing Xiaomi Mobile Software Co Ltd
Original Assignee
Beijing Xiaomi Mobile Software 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 Beijing Xiaomi Mobile Software Co Ltd filed Critical Beijing Xiaomi Mobile Software Co Ltd
Priority to CN201611042476.7A priority Critical patent/CN106598488B/en
Publication of CN106598488A publication Critical patent/CN106598488A/en
Application granted granted Critical
Publication of CN106598488B publication Critical patent/CN106598488B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0602Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
    • G06F3/061Improving I/O performance
    • G06F3/0611Improving I/O performance in relation to response time
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0629Configuration or reconfiguration of storage systems
    • G06F3/0635Configuration or reconfiguration of storage systems by changing the path, e.g. traffic rerouting, path reconfiguration
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0655Vertical data movement, i.e. input-output transfer; data movement between one or more hosts and one or more storage devices
    • G06F3/0659Command handling arrangements, e.g. command buffers, queues, command scheduling
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0668Interfaces specially adapted for storage systems adopting a particular infrastructure
    • G06F3/067Distributed or networked storage systems, e.g. storage area networks [SAN], network attached storage [NAS]

Abstract

The disclosure is directed to a kind of distributed data read method and devices, wherein, this method comprises: sending read request to the first memory node for preserving target data, first memory node is any one for not receiving read request in the memory node for preserve in distributed memory system target data, obtain sending time point and the corresponding transmission period of the first memory node of the read request, and detect whether the first memory node returns to target data in transmission period, when the transmission period is greater than preset time threshold and the first memory node is not detected returns to target data in transmission period, read request is sent to the second memory node for preserving target data, second memory node is any one for not receiving read request in the memory node for preserve target data in addition to the first memory node.The technical solution of the disclosure effectively reduces delay of the read operation under abnormality in the case where not increasing network burden, and data reading performance using redundancy is high.

Description

Distributed data read method and device
Technical field
This disclosure relates to technical field of data processing, in particular to a kind of distributed data read method and device.
Background technique
In distributed memory system (for example, distributed file system, distributed data base and distributed block storage system Deng) in, in order to ensure the memory node failure in the system will not all cause storing data to lose, usually by same number Retain multiple data copies according to being respectively stored on different memory nodes, that is, in distributed memory system, data write-in When can write on multiple memory nodes, when reading can remain on the memory node of data copy from any one reads.
In the related technology, when reading the data on distributed memory system, serial mode and concurrent fashion can be used.String The method for reading data of line mode are as follows: client sends read request to a memory node for being stored with data copy first, when The data of memory node return are not received when issuing the time of read request more than preset threshold yet or detect the storage section When point failure, client then successively sends read request to other memory nodes for being stored with data copy, until client receives Until the data that a certain memory node returns.The method for reading data of parallel mode are as follows: client preserves number to all simultaneously Read request is sent according to the memory node of copy, returns to user for the data returned at first as the result of read operation.
Summary of the invention
The embodiment of the present disclosure provides a kind of distributed data read method and device.The technical solution is as follows:
According to the first aspect of the embodiments of the present disclosure, a kind of distributed data read method is provided, comprising:
Read request is sent to the first memory node for preserving target data, first memory node is distributed storage Any one for not receiving the read request in the memory node of the target data is preserved in system;
Obtain sending time point and the corresponding transmission period of first memory node of the read request, the biography The defeated period is the period since the sending time point backward;
Detect whether first memory node returns to the target data in the transmission period;
When the transmission period is greater than preset time threshold, and first memory node is not detected in the transmission When returning to the target data in the period, the read request is sent to the second memory node for preserving the target data, Second memory node is to be preserved in the memory node of the target data in the distributed memory system except described the Any one for not receiving the read request except one memory node.
In an embodiment of the disclosure, the preset time threshold is greater than read operation delay time, and is less than read operation Time-out time.
In another embodiment of the present disclosure, the method, further includes:
Detecting that first memory node returns to the target data or described in the transmission period When two memory nodes return to the target data in corresponding transmission period, stop sending the read request, and determine institute Target data is stated to read successfully.
In the another embodiment of the disclosure, the method, further includes:
Described in being sent when all memory nodes for preserving the target data into the distributed memory system When read request, the corresponding duration of the read operation time-out time is waited.
In above-described embodiment of the disclosure, the method, further includes:
In the corresponding duration of the read operation time-out time, detect that any one preserves depositing for the target data When storing up the node return target data, determine that the target data is read successfully;Alternatively,
In the corresponding duration of the read operation time-out time, any one is not detected and preserves the target data When memory node returns to the target data, determine that the target data reads failure.
In above-described embodiment of the disclosure, after the determination target data reads failure, the method is also wrapped It includes:
Push the notice that the target data reads failure.
According to the second aspect of an embodiment of the present disclosure, a kind of distributed data reading device is provided, comprising:
Sending module is configured as sending read request to the first memory node for preserving target data, and described first deposits Storage node is not receive appointing for the read request in the memory node for preserve in distributed memory system the target data Meaning one;
Module is obtained, is configured as obtaining the sending time point of the read request and first memory node is corresponding Transmission period, the transmission period are the period since the sending time point backward;
Processing module is configured as detecting whether first memory node returns to the mesh in the transmission period Mark data;
The sending module is additionally configured to be greater than preset time threshold in the transmission period, and institute is not detected When stating the first memory node and returning to the target data in the transmission period, to preserving the second of the target data Memory node sends the read request, and second memory node is to preserve the number of targets in the distributed memory system According to memory node in any one for not receiving the read request in addition to first memory node.
In an embodiment of the disclosure, the preset time threshold is greater than read operation delay time, and is less than read operation Time-out time.
In another embodiment of the present disclosure, the processing module is additionally configured to detecting the first storage section Point returns to the target data or second memory node in corresponding transmission period in the transmission period When returning to the target data, stop sending the read request, and determine that the target data is read successfully.
In the another embodiment of the disclosure, the processing module is additionally configured to to the distributed storage When preserving all memory nodes transmission read request of the target data in system, the read operation time-out time is waited Corresponding duration.
In above-described embodiment of the disclosure, the processing module is additionally configured in the read operation time-out time pair In the duration answered, when detecting that any one preserves the memory node of the target data return target data, determine The target data is read successfully, in the corresponding duration of the read operation time-out time, any one is not detected and preserves When the memory node of the target data returns to the target data, determine that the target data reads failure.
In above-described embodiment of the disclosure, the processing module is additionally configured to determining the target data reading After failure, the notice that the target data reads failure is pushed.
According to the third aspect of an embodiment of the present disclosure, a kind of distributed data reading device is provided, which includes:
Processor;
The memory of executable instruction for storage processor;
Wherein, processor is configured as:
Read request is sent to the first memory node for preserving target data, first memory node is distributed storage Any one for not receiving the read request in the memory node of the target data is preserved in system;
Obtain sending time point and the corresponding transmission period of first memory node of the read request, the biography The defeated period is the period since the sending time point backward;
Detect whether first memory node returns to the target data in the transmission period;
When the transmission period is greater than preset time threshold, and first memory node is not detected in the transmission When returning to the target data in the period, the read request is sent to the second memory node for preserving the target data, Second memory node is to be preserved in the memory node of the target data in the distributed memory system except described the Any one for not receiving the read request except one memory node.
The technical solution that the embodiment of the present disclosure provides can include the following benefits:
By sending read request to the first memory node for preserving target data, which deposits for distribution Any one for not receiving the read request in the memory node of the target data is preserved in storage system, next obtains the reading and asks The sending time point asked and the corresponding transmission period of the first memory node, and whether the first memory node is detected in the transmission Target data is returned in period, which is the period since issuing time point backward, finally above-mentioned Transmission period is greater than preset time threshold, and the first memory node is not detected and returns to target data in the transmission period When, the read request is sent to the second memory node for preserving the target data, which is distributed storage It is preserved in system in the memory node of target data and does not receive any one of the read request in addition to the first memory node It is a.In this way, the technical solution of the embodiment of the present disclosure in the case where not increasing network burden, effectively reduces read operation in exception Delay under state, data reading performance using redundancy are high.
It should be understood that above general description and following detailed description be only it is exemplary and explanatory, not The disclosure can be limited.
Detailed description of the invention
The drawings herein are incorporated into the specification and forms part of this specification, and shows the implementation for meeting the disclosure Example, and together with specification for explaining the principles of this disclosure.
Fig. 1 is a kind of flow chart of distributed data read method shown according to an exemplary embodiment;
Fig. 2 is a kind of flow chart of the distributed data read method shown according to another exemplary embodiment;
Fig. 3 is a kind of flow chart of distributed data read method shown according to another exemplary embodiment;
Fig. 4 is a kind of block diagram of distributed data reading device shown according to an exemplary embodiment;
Fig. 5 is a kind of entity block diagram of distributed data reading device shown according to an exemplary embodiment;
Fig. 6 is a kind of block diagram of distributed data reading device shown according to an exemplary embodiment.
Through the above attached drawings, it has been shown that the specific embodiment of the disclosure will be hereinafter described in more detail.These attached drawings It is not intended to limit the scope of this disclosure concept by any means with verbal description, but is by referring to specific embodiments Those skilled in the art illustrate the concept of the disclosure.
Specific embodiment
Example embodiments are described in detail here, and the example is illustrated in the accompanying drawings.Following description is related to When attached drawing, unless otherwise indicated, the same numbers in different drawings indicate the same or similar elements.Following exemplary embodiment Described in embodiment do not represent all implementations consistent with this disclosure.On the contrary, they be only with it is such as appended The example of the consistent device and method of some aspects be described in detail in claims, the disclosure.
The embodiment of the present disclosure provides a kind of distributed data read method and device.The present embodiment reading data in a distributed manner Method is applied to illustrate in terminal device.Wherein, which is, for example, mobile phone, personal digital assistant (Personal Digital Assistant, abbreviation PDA) etc., other for being also possible to have distributed data read functions are set It is standby.
It is a kind of flow chart of distributed data read method shown according to an exemplary embodiment with reference to Fig. 1, Fig. 1. As shown in Figure 1, the distributed data read method may include the following steps:
In step s 11, read request is sent to the first memory node for preserving target data.
Wherein, which is not receive in the memory node for preserve in distributed memory system target data To any one of read request.
The embodiment of the present disclosure is mainly illustrated with the distributed memory system with multiple memory nodes.It is deposited in distribution In storage system, same part data can be respectively stored on different memory nodes when data are written, and can be from when reading data It is stored on any one node of the data and is read out.It can ensure that the memory node of distributed memory system occurs in this way Storing data loss is not will lead to when failure.
In the present embodiment, when terminal device from distributed memory system read data (for example, by taking target data as an example It is illustrated) when, read request is sent to the first memory node for preserving target data first, so that the first memory node returns The target data.
Optionally, which is not connect in the memory node for preserve in distributed memory system target data Receive any one of read request.As an example it is assumed that there is 10 memory nodes to be stored with the mesh in the distributed memory system Mark data, therefore, when terminal device reads the target data from the distributed memory system, as an example, if this 10 A memory node does not receive the read request, then above-mentioned first memory node is any one in 10 memory nodes. As another example, if 10 memory nodes existing 5 receive the read request, then above-mentioned first memory node be this 10 Any one in other 5 memory nodes that above-mentioned 5 have received except the read request is removed in a memory node.
In step s 12, sending time point and the corresponding transmission period of the first memory node of the read request are obtained.
Wherein, which is the period since issuing time point backward.
For the read request that terminal device issues, sending time of each read request of terminal device records and obtaining each is deposited Store up the corresponding transmission period of node.Optionally, the embodiment of the present disclosure sends read request to the first memory node with terminal device For be illustrated.After terminal device sends read request to the first memory node, the sending time point of the read request is obtained, And determine the corresponding transmission period (that is, period since the sending time point backward) of the first memory node, so that Terminal device detects whether first memory node in the transmission period returns to target data.
In step s 13, whether the first memory node of detection in the transmission period returns to target data.
Optionally, after terminal device issues read request to the first memory node, in the corresponding transmission of the first memory node Whether the first memory node of real-time detection in the transmission period returns to target data in period, that is, the terminal device Real-time detection its whether receive the first memory node return target data.
It is worth noting that the embodiment of the present disclosure defines a preset time threshold, it is less than in above-mentioned transmission period When preset time threshold, terminal device is measured in real time in the transmission period, until the time of above-mentioned transmission period Length is equal to preset time threshold.
In step S14, when above-mentioned transmission period is greater than preset time threshold, and the first memory node is not detected and exists When returning to target data in the transmission period, above-mentioned read request is sent to the second memory node for preserving target data.
Wherein, which is to be preserved in the memory node of the target data in distributed memory system except the Any one for not receiving the read request except one memory node.
As an example, after terminal device issues read request to the first memory node, the first memory node is corresponding When transmission period is greater than preset time threshold, terminal device is still not detected the first memory node and returns to target data, at this point, Terminal device is while continuing to test the first memory node and whether returning to target data, also to preserving the second of target data Memory node sends above-mentioned read request.
In addition, being asked in order not to preserve the duplicate reading of the memory node of target data transmission into distributed memory system Ask, the second memory node in the embodiment of the present disclosure be preserve the target data memory node in except the first memory node it Any one outer for not receiving the read request.
To the second memory node send read request after, it is similar with step S12 and step S13, terminal device obtain to Second memory node sends sending time point and the corresponding transmission period of the second memory node of the read request, and detects Whether the second memory node in its corresponding transmission period returns to target data, if the second memory node is in corresponding transmission Period is greater than preset time threshold, and the first memory node is still not detected in terminal device and the second memory node returns to number of targets According at this point, the terminal device memory node that then successively other into distributed memory system do not receive read request sends and reads Request, until sending the read request to all memory nodes for being stored with the target data.
Optionally, the preset time threshold in the embodiment of the present disclosure is greater than read operation delay time, and super less than read operation When the time.As an example, the preset time threshold is slightly longer than read operation delay time under normal circumstances, but compares and read behaviour It is short much to make time-out time, and interval preset time threshold is deposited to other again after sending read request to a memory node It stores up node and sends read request.
In this way, terminal device is sent out to the first memory node on the one hand when the memory node of distributed memory system is normal After sending read request, first just can be received when the corresponding transmission period of the first memory node is less than preset time threshold The target data that memory node returns just will not send above-mentioned reading to the second memory node and other memory nodes and ask It asks, avoids network bandwidth caused by when reading data using parallel mode in the related technology and waste problem.On the other hand, dividing In cloth storage system, if the first memory node for receiving the read request breaks down, terminal device only needs to wait default The corresponding duration of time threshold withouts waiting for the corresponding duration of above-mentioned read operation time-out time, will be to the second storage section Point or other memory nodes for preserving the target data send read request, can be avoided so in the related technology using serial The problem of user caused by when mode reads data falls into a long wait.
The distributed data read method that the embodiment of the present disclosure provides, first by being deposited to preserve target data first It stores up node and sends read request, which is in the memory node for preserve in distributed memory system the target data Any one of the read request is not received, next obtains the sending time point of the read request and the first memory node is corresponding Transmission period, and detect whether the first memory node in the transmission period returns to target data, which is Since the period issuing time point backward be finally greater than preset time threshold in above-mentioned transmission period, and be not detected When first memory node returns to target data in the transmission period, sent out to the second memory node for preserving the target data The read request is sent, which is in the memory node for preserve in distributed memory system target data except first Any one for not receiving the read request except memory node.In this way, the technical solution of the embodiment of the present disclosure is not increasing In the case where network burden, delay of the read operation under abnormality is effectively reduced, data reading performance using redundancy is high.
Further, in distributed data read method provided by the above embodiment, the embodiment of the present disclosure further include as Lower step:
It is detecting the first memory node and returns to target data in above-mentioned transmission period or the second memory node exists When returning to target data in corresponding transmission period, stop sending read request, and determine that target data is read successfully.
Optionally, in the embodiments of the present disclosure, which (is detecting the first memory node in above-mentioned transmission period When return target data or the second memory node return to target data in corresponding transmission period, stops sending and read to ask Ask, and determine that target data is read successfully) it can be realized by the possible implementation of the following two kinds, referring specifically to shown in Fig. 2 Embodiment.
Fig. 2 is a kind of flow chart of the distributed data read method shown according to another exemplary embodiment.Such as Fig. 2 institute Show, in one possible implementation, the embodiment of the present disclosure provide distributed data read method, above-mentioned steps ( Detect that the first memory node returns to target data or the second memory node in corresponding transmission in above-mentioned transmission period When returning to target data in the period, stop sending read request, and determine that target data is read successfully), comprising:
In the step s 21, when detecting that the first memory node returns to the target data in above-mentioned transmission period, stop Read request is only sent, and determines that target data is read successfully.
Optionally, since preset time threshold is greater than read operation delay time, in the normal of the first memory node When, the first memory node can return to target in the transmission period for being less than preset time threshold after receiving read request Data, so, terminal device can then detect that the first memory node returns to target data in transmission period, at this point, terminal Equipment then stops the second memory node that the target data is preserved into distributed memory system or other memory nodes hair Read request is sent, and determines that target data is read successfully, this read request is completed, and target data is then returned to use by terminal device Family.
Therefore, on the basis of embodiment shown in Fig. 1, the step S21 in embodiment illustrated in fig. 2 is located at above-mentioned steps S13 Later.
Further, in the alternatively possible implementation of the embodiment of the present disclosure, above-mentioned steps (are detecting first Memory node returns to target data in above-mentioned transmission period or the second memory node returns in corresponding transmission period When returning target data, stop sending read request, and determine that target data is read successfully), comprising:
In step S22, when detecting that the second memory node returns to the target data in corresponding transmission period, Stop sending read request, and determines that target data is read successfully.
On the basis of embodiment shown in Fig. 1, step S22 is located at after above-mentioned steps S14.
It is similar with step S21, the second memory node it is normal when, the second memory node after receiving read request, Target data can be returned in the transmission period for being less than preset time threshold, so, terminal device can then detect that second deposits Storage node returns to target data in corresponding transmission period, at this point, terminal device then stops to preserving the target data Other memory nodes send read request, and determine target data reads successfully, this read request completion, terminal device then general Target data returns to user.
It is worth noting that if detecting that the first memory node returns in corresponding transmission period in the second memory node Target data is returned, similarly, which also stops sending read request to other memory nodes, also can determine that target data is read Success, this read request are completed, and target data is then returned to user by terminal device.
For example, after the first memory node in terminal device into distributed memory system sends read request, if First memory node does not return to target data in the corresponding transmission period of preset time threshold, terminal device then Xiang Baocun There is the second memory node of target data to send read request, the detection the simultaneously in the corresponding transmission period of the second memory node Whether two memory nodes and the first memory node return to target data, in the corresponding transmission period of the second memory node, no Pipe is to detect that the first memory node returns to target data, still detects that the second memory node returns to target data, stops Read request is sent, and determines that the target data is read successfully.
The distributed data read method that the embodiment of the present disclosure provides, detects the first memory node right in terminal device Target data is returned in the transmission period answered or the second memory node returns to target data in corresponding transmission period When, stop sending read request, and determine that the target data is read successfully.In this way, terminal device is issued to the second memory node After read request, detect whether the second memory node returns to target data in the corresponding transmission period of the second memory node Meanwhile also continuing whether the first memory node of detection returns to target data, accordingly even when the first memory node is due to certain transient state Exception has spent the processing time slightly longer than preset time threshold, but can also return to faster number of targets than the second memory node According to so as to obtain target data faster.
Further, Fig. 3 is a kind of process of distributed data read method shown according to another exemplary embodiment Figure.The embodiment of the present disclosure is further explanation on the basis of above-mentioned Fig. 1 embodiment to distributed data read method.Such as figure Shown in 3, the distributed data read method of embodiment of the present disclosure offer, further includes:
In step S31, when all memory nodes for preserving target data into distributed memory system are sent When read request, the corresponding duration of read operation time-out time is waited.
In the embodiments of the present disclosure, when terminal device is successively to preserving the first memory node of target data, second deposit After storage node and other all memory nodes for preserving the target data send read request, if terminal device is in above-mentioned institute Have and all memory nodes return target datas are not detected in the corresponding transmission period of memory node, at this point, in order to verify Be due to network load fluctuation or memory node failure caused by target data read failure, terminal device then waits the reading Operation overtime time corresponding duration, and then above-mentioned all storage sections are detected within the read operation time-out time corresponding period Whether point can return to target data.Can be avoided in this way causes corresponding not in memory node since memory node transient state is abnormal The problem of returning to target data is detected in transmission period.
Further, on the basis of above-mentioned steps, as shown in figure 3, the distributed data that the embodiment of the present disclosure provides is read Method is taken, further includes following steps.
In one possible implementation, after step S31, this method comprises:
In step s 32, in the corresponding duration of above-mentioned read operation time-out time, detect that any one preserves target When the memory node of data returns to target data, determine that the target data is read successfully.
Optionally, in this embodiment, terminal device preserves the institute of target data into distributed memory system After having memory node to send read request, for terminal device in the corresponding duration of read operation time-out time that it is waited, detection is all Whether the memory node for receiving read request returns to target data.
In this kind of possible implementation, when terminal device detects that any one preserves the memory node of target data When returning to target data, it is determined that the target data is read successfully, that is, this read operation is completed, terminal device will then be obtained The target data got returns to user.
It is worth noting that the memory node that herein any one preserves target data can be the first storage section Point is also possible to the second memory node, can also be that other receive the memory node of read request, belongs to and preserve target data And receive any one in all memory nodes of read request.
And in another possible implementation, the distributed data read method that the embodiment of the present disclosure provides also wraps It includes:
In step S33, in the corresponding duration of read operation time-out time, any one is not detected and preserves number of targets According to memory node return target data when, determine the target data read failure.
Optionally, in this embodiment, terminal device in the corresponding duration of read operation time-out time real-time detection whether There is memory node to return to target data any one is not detected and preserves in the corresponding duration of read operation time-out time The memory node of target data returns to target data, that is, terminal device is not only in the corresponding transmission of all memory nodes Between receive target data in section, and do not receive target data in the corresponding duration of read operation time-out time, at this point, Terminal device is believed that distributed memory system has network load fluctuation or memory node failure, therefore, terminal Equipment determines that target data reads failure.
After issuing multiple read requests, continue to test all memory nodes for receiving read request is terminal device in this way It is no to return to target data, rather than the last one memory node is only waited to return to target data, which ensure that some storage section Point faster returns to mesh than other memory nodes since transient state has spent the processing time slightly longer than preset time threshold extremely In the case where marking data, faster returned data, and in memory node failure, after sending read request to all memory nodes The corresponding duration of read operation time-out time is waited, the time that terminal device expends at preamble memory node is effectively reduced, keeps away Exempt from user to fall into a long wait.
The distributed data read method that the embodiment of the present disclosure provides, when terminal device is into distributed memory system When preserving all memory nodes transmission read request of target data, the corresponding duration of read operation time-out time is waited, and In the corresponding duration of read operation time-out time, detect that any one is preserved the memory node of target data and returns to number of targets According to when, determine that the target data is read successfully, and in the corresponding duration of read operation time-out time, any one guarantor be not detected When the memory node for having target data returns to target data, determine that the target data reads failure.In this way which ensure that some Memory node is since transient state has spent the processing time slightly longer than preset time threshold extremely, but faster than other memory nodes Target data is returned, and in memory node failure, the time that terminal device expends at preamble memory node is effectively reduced, User is avoided to fall into a long wait.
Further, on the basis of embodiment shown in Fig. 3, as an example, after above-mentioned steps S33, the party Method further includes following steps S34.
In step S34, push target data reads the notice of failure.
Optionally, after terminal device determines that target data reads failure, which can preset terminal from trend (for example, mobile phone terminal of user) pushes the notice that target data reads failure, to remind ownership goal reading data to fail, from And convenient for the reading result of user's timely learning target data or subsequent operation is determined according to the demand of user oneself.
It is worth noting that determining that target data reads failure in terminal device, and to default terminal (for example, user Mobile phone terminal) push target data read failure notice after, how user, which specifically operates, to grasp according to the actual situation Make, the embodiment of the present disclosure is simultaneously not limited thereof.
The foregoing describe the realization process of distributed data read method, which can be by distributed data reading device Realize, below by distributed data reading device built-in function and structure be illustrated, disclosure device is implemented Undisclosed details in example, please refers to embodiments of the present disclosure.
Fig. 4 is a kind of block diagram of distributed data reading device shown according to an exemplary embodiment.As shown in figure 4, The distributed data reading device may include: sending module 41, obtain module 42 and processing module 43.
The sending module 41 is configured as sending read request to the first memory node for preserving target data.
Wherein, which is not receive in the memory node for preserve in distributed memory system target data To any one of read request.
The acquisition module 42 is configured as obtaining the sending time point of above-mentioned read request and the first memory node is corresponding Transmission period.
The transmission period is the period since the sending time point backward.
The processing module 43, is configured as whether the first memory node of detection in the transmission period returns to number of targets According to.
Above-mentioned sending module 41 is additionally configured to be greater than preset time threshold in transmission period, and is not detected first When memory node returns to target data in the transmission period, sent out to the second memory node for preserving the target data Send the read request.
Wherein, which is in the memory node for preserve in distributed memory system target data except first Any one for not receiving read request except memory node.
About the distributed data reading device that the embodiment of the present disclosure provides, wherein modules execute the specific side of operation Formula is described in detail in distributed data read method embodiment shown in Fig. 1, will be not set forth in detail herein It is bright.
Optionally, in distributed data reading device provided by the above embodiment, above-mentioned preset time threshold, which is greater than, to be read Operating delay time, and it is less than read operation time-out time.
In an embodiment of the disclosure, above-mentioned processing module 43 is additionally configured to detecting that the first memory node exists Target data is returned in above-mentioned transmission period or the second memory node returns to target data in corresponding transmission period When, stop sending the read request, and determine that the target data is read successfully.
In another embodiment of the present disclosure, above-mentioned processing module 43 is additionally configured to to distributed storage system When preserving all memory nodes transmission read request of target data in system, the corresponding duration of read operation time-out time is waited.
Further, on the basis of the above embodiments, above-mentioned processing module 43, is additionally configured in read operation time-out Between in corresponding duration, when detecting that any one is preserved the memory node of target data and returns to target data, determine target Reading data success, and in the corresponding duration of read operation time-out time, any one is not detected and preserves target data Memory node return target data when, determine target data read failure.
Optionally, in the another embodiment of the disclosure, above-mentioned processing module is additionally configured to determining target data reading After taking failure, push target data reads the notice of failure.
About the device in above-described embodiment, wherein modules execute the concrete mode of operation in related this method Embodiment in be described in detail, no detailed explanation will be given here.
The foregoing describe the inner function module of distributed data reading device and structural representation, Fig. 5 is according to an example Property implement the entity block diagram of a kind of distributed data reading device exemplified, as shown in figure 5, the distributed data reading device It include: memory 501 and processor 502.
Memory 501 is used for storage processor executable instruction.
Processor 502, is used for:
Read request is sent to the first memory node for preserving target data, first memory node is distributed storage Any one for not receiving the read request in the memory node of the target data is preserved in system;
Obtain sending time point and the corresponding transmission period of first memory node of the read request, the biography The defeated period is the period since the sending time point backward;
Detect whether first memory node returns to the target data in the transmission period;
When the transmission period is greater than preset time threshold, and first memory node is not detected in the transmission When returning to the target data in the period, the read request is sent to the second memory node for preserving the target data, Wherein, institute is removed in memory node of second memory node to preserve the target data in the distributed memory system State any one for not receiving the read request except the first memory node.
It is worth noting that in the embodiment of information display device shown in Fig. 5, it should be appreciated that the processor can be Central processing unit (English: Central Processing Unit, referred to as: CPU), it can also be other general processors, number Word signal processor (English: Digital Signal Processor, referred to as: DSP), specific integrated circuit (English: Application Specific Integrated Circuit, referred to as: ASIC) etc..General processor can be microprocessor Or the processor is also possible to any conventional processor etc., and memory above-mentioned can be read-only memory (English: Read-only memory, abbreviation: ROM), random access memory (English: random access memory, referred to as: RAM), flash memory, hard disk or solid state hard disk.SIM card is also referred to as subscriber identification card, smart card, digital mobile electricity Phone must load onto this card and can use.Store the information of digital mobile phone client on computer chip, encryption it is close The contents such as key and the telephone directory of user.The step of method in conjunction with disclosed in the embodiment of the present invention, can be embodied directly in hardware Processor executes completion, or in processor hardware and software module combination execute completion.
Fig. 6 is a kind of block diagram of distributed data reading device shown according to an exemplary embodiment.For example, device 600 can be mobile phone, computer, digital broadcasting terminal, messaging device, game console, tablet device, and medical treatment is set It is standby, body-building equipment, personal digital assistant etc..
Referring to Fig. 6, device 600 may include following one or more components: processing component 602, memory 604, electric power Component 606, multimedia component 608, audio component 610, input/output (I/O) interface 612, sensor module 614, Yi Jitong Believe component 616.
The integrated operation of the usual control device 600 of processing component 602, such as with display, telephone call, data communication, phase Machine operation and record operate associated operation.Processing component 602 may include that one or more processors 620 refer to execute It enables, to perform all or part of the steps of the methods described above.In addition, processing component 602 may include one or more modules, just Interaction between processing component 602 and other assemblies.For example, processing component 602 may include multi-media module, it is more to facilitate Interaction between media component 608 and processing component 602.
Memory 604 is configured as storing various types of data to support the operation in device 600.These data are shown Example includes the instruction of any application or method for operating on device 600, contact data, and telephone book data disappears Breath, picture, video etc..Memory 604 can be by any kind of volatibility or non-volatile memory device or their group It closes and realizes, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM) is erasable to compile Journey read-only memory (EPROM), programmable read only memory (PROM), read-only memory (ROM), magnetic memory, flash Device, disk or CD.
Electric power assembly 606 provides electric power for the various assemblies of device 600.Electric power assembly 606 may include power management system System, one or more power supplys and other with for device 600 generate, manage, and distribute the associated component of electric power.
Multimedia component 608 includes that the touch-control of one output interface of offer between described device 600 and user is shown Screen.In some embodiments, touching display screen may include liquid crystal display (LCD) and touch panel (TP).Touch panel packet One or more touch sensors are included to sense the gesture on touch, slide, and touch panel.The touch sensor can not The boundary of a touch or slide action is only sensed, but also detects duration associated with the touch or slide operation and pressure Power.In some embodiments, multimedia component 608 includes a front camera and/or rear camera.At device 600 In operation mode, such as in a shooting mode or a video mode, front camera and/or rear camera can receive external more matchmakers Volume data.Each front camera and rear camera can be a fixed optical lens system or have focal length and optics Zoom capabilities.
Audio component 610 is configured as output and/or input audio signal.For example, audio component 610 includes a Mike Wind (MIC), when device 600 is in operation mode, when such as call mode, recording mode, and voice recognition mode, microphone is matched It is set to reception external audio signal.The received audio signal can be further stored in memory 604 or via communication set Part 616 is sent.In some embodiments, audio component 610 further includes a loudspeaker, is used for output audio signal.
I/O interface 612 provides interface between processing component 602 and peripheral interface module, and above-mentioned peripheral interface module can To be keyboard, click wheel, button etc..These buttons may include, but are not limited to: home button, volume button, start button and lock Determine button.
Sensor module 614 includes one or more sensors, and the state for providing various aspects for device 600 is commented Estimate.For example, sensor module 614 can detecte the state that opens/closes of device 600, and the relative positioning of component, for example, it is described Component is the display and keypad of device 600, and sensor module 614 can be with a group in detection device 600 or device 600 The position change of part, the existence or non-existence that user contacts with device 600,600 orientation of device or acceleration/deceleration and device 600 Temperature change.Sensor module 614 may include proximity sensor, be configured to examine without any physical contact Survey presence of nearby objects.Sensor module 614 can also include that optical sensor is used for such as CMOS or ccd image sensor It is used in imaging applications.In some embodiments, which can also include acceleration transducer, and gyroscope passes Sensor, Magnetic Sensor, pressure sensor or temperature sensor.
Communication component 616 is configured to facilitate the communication of wired or wireless way between device 600 and other equipment.Device 600 can access the wireless network based on communication standard, such as WiFi, 2G or 3G or their combination.In an exemplary implementation In example, communication component 616 receives broadcast singal or broadcast related information from external broadcasting management system via broadcast channel. In one exemplary embodiment, the communication component 616 further includes near-field communication (NFC) module, to promote short range communication.Example Such as, NFC module can be based on radio frequency identification (RFID) technology, Infrared Data Association (IrDA) technology, ultra wide band (UWB) technology, Bluetooth (BT) technology and other technologies are realized.
In the exemplary embodiment, device 600 can be believed by one or more application specific integrated circuit (ASIC), number Number processor (DSP), digital signal processing appts (DSPD), programmable logic device (PLD), field programmable gate array (FPGA), controller, microcontroller, microprocessor or other electronic components are realized, are read for executing above-mentioned distributed data Method.
In the exemplary embodiment, a kind of non-transitorycomputer readable storage medium including instruction, example are additionally provided It such as include the memory 604 of instruction, above-metioned instruction can be executed by the processor 620 of device 600 to complete the above method.For example, The non-transitorycomputer readable storage medium can be ROM, random access memory (RAM), CD-ROM, tape, floppy disk With optical data storage devices etc..
A kind of non-transitorycomputer readable storage medium, when the instruction in the storage medium is by the processing of device 600 When device executes, so that device 600 is able to carry out a kind of distributed data read method.
Those skilled in the art after considering the specification and implementing the invention disclosed here, will readily occur to its of the disclosure Its embodiment.This application is intended to cover any variations, uses, or adaptations of the disclosure, these modifications, purposes or Person's adaptive change follows the general principles of this disclosure and including the undocumented common knowledge in the art of the disclosure Or conventional techniques.The description and examples are only to be considered as illustrative, and the true scope and spirit of the disclosure are by following Claims are pointed out.
It should be understood that the present disclosure is not limited to the precise structures that have been described above and shown in the drawings, and And various modifications and changes may be made without departing from the scope thereof.The scope of the present disclosure is only limited by appended claims System.

Claims (11)

1. a kind of distributed data read method characterized by comprising
Read request is sent to the first memory node for preserving target data, first memory node is distributed memory system In preserve any one for not receiving the read request in the memory node of the target data;
Sending time point and the corresponding transmission period of first memory node of the read request are obtained, when the transmission Between sending time point described in Duan Weicong start a period backward;
Detect whether first memory node returns to the target data in the transmission period;
When the transmission period is greater than preset time threshold, and first memory node is not detected in the transmission time When returning to the target data in section, the read request is sent to the second memory node for preserving the target data, it is described Second memory node is in the memory node for preserve in the distributed memory system target data except described first deposits Store up any one for not receiving the read request except node;
Wherein, the preset time threshold is greater than read operation delay time, and is less than read operation time-out time.
2. the method according to claim 1, wherein further include:
Detecting that first memory node returns to the target data in the transmission period or described second deposit When storage node returns to the target data in corresponding transmission period, stop sending the read request, and determine the mesh Mark reading data success.
3. the method according to claim 1, wherein further include:
It is asked when all memory nodes for preserving the target data into the distributed memory system send the reading When asking, the corresponding duration of the read operation time-out time is waited.
4. according to the method described in claim 3, it is characterized by further comprising:
In the corresponding duration of the read operation time-out time, detect that any one preserves the storage section of the target data When point returns to the target data, determine that the target data is read successfully;Alternatively,
In the corresponding duration of the read operation time-out time, any one storage for preserving the target data is not detected When node returns to the target data, determine that the target data reads failure.
5. according to the method described in claim 4, it is characterized in that, the determination target data is read after failing, also Include:
Push the notice that the target data reads failure.
6. a kind of distributed data reading device characterized by comprising
Sending module is configured as sending read request to the first memory node for preserving target data, the first storage section Point is not receive any one of the read request in the memory node for preserve in distributed memory system the target data It is a;
Module is obtained, is configured as obtaining the sending time point of the read request and the corresponding transmission of first memory node Period, the transmission period are the period since the sending time point backward;
Processing module is configured as detecting whether first memory node returns to the number of targets in the transmission period According to;
The sending module is additionally configured to be greater than preset time threshold in the transmission period, and is not detected described the When one memory node returns to the target data in the transmission period, to the second storage for preserving the target data Node sends the read request, and second memory node is to preserve the target data in the distributed memory system Any one for not receiving the read request in memory node in addition to first memory node;
Wherein, the preset time threshold is greater than read operation delay time, and is less than read operation time-out time.
7. device according to claim 6, which is characterized in that the processing module, be additionally configured to detect it is described First memory node returns to the target data or second memory node in corresponding biography in the transmission period When returning to the target data in the defeated period, stop sending the read request, and determine that the target data is read successfully.
8. device according to claim 6, which is characterized in that the processing module is additionally configured to to described When preserving all memory nodes transmission read request of the target data in distributed memory system, the reading behaviour is waited Make the corresponding duration of time-out time.
9. device according to claim 8, which is characterized in that the processing module is additionally configured in the read operation In the corresponding duration of time-out time, detect that any one is preserved the memory node of the target data and returns to the number of targets According to when, determine that the target data is read successfully, in the corresponding duration of the read operation time-out time, be not detected any one When a memory node for preserving the target data returns to the target data, determine that the target data reads failure.
10. device according to claim 9, which is characterized in that the processing module is additionally configured to determining the mesh After marking reading data failure, the notice that the target data reads failure is pushed.
11. a kind of distributed data reading device, which is characterized in that described device includes:
Processor;
For storing the memory of the executable instruction of the processor;
Wherein, the processor is configured to:
Read request is sent to the first memory node for preserving target data, first memory node is distributed memory system In preserve any one for not receiving the read request in the memory node of the target data;
Sending time point and the corresponding transmission period of first memory node of the read request are obtained, when the transmission Between sending time point described in Duan Weicong start a period backward;
Detect whether first memory node returns to the target data in the transmission period;
When the transmission period is greater than preset time threshold, and first memory node is not detected in the transmission time When returning to the target data in section, the read request is sent to the second memory node for preserving the target data, it is described Second memory node is in the memory node for preserve in the distributed memory system target data except described first deposits Store up any one for not receiving the read request except node;
Wherein, the preset time threshold is greater than read operation delay time, and is less than read operation time-out time.
CN201611042476.7A 2016-11-24 2016-11-24 Distributed data read method and device Active CN106598488B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201611042476.7A CN106598488B (en) 2016-11-24 2016-11-24 Distributed data read method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201611042476.7A CN106598488B (en) 2016-11-24 2016-11-24 Distributed data read method and device

Publications (2)

Publication Number Publication Date
CN106598488A CN106598488A (en) 2017-04-26
CN106598488B true CN106598488B (en) 2019-08-13

Family

ID=58591939

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201611042476.7A Active CN106598488B (en) 2016-11-24 2016-11-24 Distributed data read method and device

Country Status (1)

Country Link
CN (1) CN106598488B (en)

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110018783B (en) * 2018-01-09 2022-12-20 阿里巴巴集团控股有限公司 Data storage method, device and system
CN108519861A (en) * 2018-04-02 2018-09-11 广东能龙教育股份有限公司 Dynamic storage method based on large-scale parallel access
CN108829496A (en) * 2018-05-29 2018-11-16 阿里巴巴集团控股有限公司 A kind of service calling method, device and electronic equipment
CN108959513A (en) * 2018-06-28 2018-12-07 郑州云海信息技术有限公司 The method and its data processing equipment of data are read under a kind of distributed memory system
CN109407981A (en) * 2018-09-28 2019-03-01 深圳市茁壮网络股份有限公司 A kind of data processing method and device
CN110493315B (en) * 2019-07-19 2022-06-14 视联动力信息技术股份有限公司 Method and device for calling video communication link
CN115277850B (en) * 2022-09-23 2023-01-03 联通智网科技股份有限公司 Data processing method, device, equipment and storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102265277A (en) * 2011-06-01 2011-11-30 华为技术有限公司 Operation method and device for data memory system
CN103023805A (en) * 2012-11-22 2013-04-03 北京航空航天大学 MapReduce system
CN104461943A (en) * 2014-12-29 2015-03-25 成都致云科技有限公司 Data reading method, device and system

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9305011B2 (en) * 2005-07-27 2016-04-05 Hitachi Data Systems Corporation Method for improving mean time to data loss (MTDL) in a fixed content distributed data storage

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102265277A (en) * 2011-06-01 2011-11-30 华为技术有限公司 Operation method and device for data memory system
CN103023805A (en) * 2012-11-22 2013-04-03 北京航空航天大学 MapReduce system
CN104461943A (en) * 2014-12-29 2015-03-25 成都致云科技有限公司 Data reading method, device and system

Also Published As

Publication number Publication date
CN106598488A (en) 2017-04-26

Similar Documents

Publication Publication Date Title
CN106598488B (en) Distributed data read method and device
JP2022163060A (en) Notification processing method, electronic device, and program
WO2018137624A1 (en) Shared data recovery method, device, computer equipment and storage medium
CN107391063A (en) Method for information display, device and computer-readable recording medium
US11082480B2 (en) File information system management system and method
EP3714414A1 (en) Currency settlement method, apparatus, and electronic device
US10324910B2 (en) Contact record processing method and apparatus
CN110061904B (en) Method, device and system for acquiring social information, electronic equipment and storage medium
CN109684406A (en) Method, apparatus, equipment and the storage medium of redis cluster backup data across computer room
CN107040591A (en) A kind of method and device being controlled to client
CN109471596A (en) Method for writing data, device, equipment and storage medium
CN108573034A (en) Data back up method, device, computer equipment and readable storage medium storing program for executing
CN106249995B (en) Notification method and device
CN107608714A (en) Byte-aligned method, apparatus and computer-readable recording medium
CN109951701A (en) Monitor fault handling method and device
CN109151812A (en) No.1 multiple terminals synchronizing unlocking method and device
CN107577810A (en) Method for writing data, device and computer-readable recording medium
KR20180108142A (en) Electronic device for displaying call related information and operating mehtod thereof
EP3236377B1 (en) Method, device and system for preventing account from being broken into
CN114840523A (en) Graph data processing method, graph data processing device and electronic equipment
CN107357643A (en) Application call method, apparatus and computer-readable recording medium
CN107071707A (en) Data transmission method and device
CN106302000A (en) Access based reminding method, device and the terminal of webpage
CN106385430B (en) The management method and device of communication message
CN106598811B (en) Anomalous event processing method, device and terminal

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