CN109871294A - Method and apparatus for verifying data, processing request - Google Patents

Method and apparatus for verifying data, processing request Download PDF

Info

Publication number
CN109871294A
CN109871294A CN201910098633.3A CN201910098633A CN109871294A CN 109871294 A CN109871294 A CN 109871294A CN 201910098633 A CN201910098633 A CN 201910098633A CN 109871294 A CN109871294 A CN 109871294A
Authority
CN
China
Prior art keywords
task
request
data
storage device
type
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
CN201910098633.3A
Other languages
Chinese (zh)
Other versions
CN109871294B (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 Baidu Netcom Science and Technology Co Ltd
Original Assignee
Beijing Baidu Netcom Science and Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Baidu Netcom Science and Technology Co Ltd filed Critical Beijing Baidu Netcom Science and Technology Co Ltd
Priority to CN201910098633.3A priority Critical patent/CN109871294B/en
Publication of CN109871294A publication Critical patent/CN109871294A/en
Application granted granted Critical
Publication of CN109871294B publication Critical patent/CN109871294B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Debugging And Monitoring (AREA)

Abstract

The embodiment of the present application discloses the method and apparatus for verifying data, processing request.One specific embodiment of the above method includes: the data fragmentation for scanning and storing in storage device, determines the quantity and mark of data fragmentation;Data check task is generated according to above-mentioned quantity and above-mentioned mark, and determines the type of above-mentioned data check task;Receive the task requests of at least one task execution server transmission;Above-mentioned data check task and type are sent at least one above-mentioned task execution server, so that at least one above-mentioned task execution server sends request corresponding with the above-mentioned type to above-mentioned storage device, to execute above-mentioned data check task.The embodiment can be by generating different types of data check task, to complete the verification to the data fragmentation stored in storage device.

Description

Method and apparatus for verifying data, processing request
Technical field
The invention relates to technical field of data security, and in particular to the method for verifying data, processing request And device.
Background technique
The correctness of data and safety are the important guarantees that data-storage system runs well, and data check is by comparing Whether initial data and the check code that target data is calculated consistent, it can be determined that target data and initial data whether one It causes, i.e., whether damaged condition occurs.Relatively common check code such as MD5 (MD5Message-Digest Algorithm, the 5th For Message Digest 5) value, CRC (Cyclic Redundancy Check, cyclic redundancy check) value etc..
For data-storage system, inevitably factor will lead to the number in data-storage system to hard disk failure etc. According to being damaged, this is a great hidden danger for data-storage system.In order to find corrupted data situation to arrange in time Data-storage system risk is looked into, data-storage system needs a kind of periodic mechanism, verifies to full dose data, guarantees system Data accuracy in system.
Summary of the invention
The embodiment of the present application proposes the method and apparatus for verifying data, processing request.
In a first aspect, the embodiment of the present application provides a kind of method for verifying data, it is applied to verification server set Task in group generates server, and above-mentioned verification server cluster further includes task execution server, and the above method includes: scanning The data fragmentation stored in storage device determines the quantity and mark of data fragmentation;It is generated according to above-mentioned quantity and above-mentioned mark Data check task, and determine the type of above-mentioned data check task;Receive the transmission of at least one task execution server Task requests;Above-mentioned data check task and type are sent at least one above-mentioned task execution server, so that above-mentioned At least one task execution server sends request corresponding with the above-mentioned type to above-mentioned storage device, to execute above-mentioned data school Test task.
In some embodiments, the type of data check task includes the first kind;And it is above-mentioned by above-mentioned data check Task and type are sent at least one above-mentioned task execution server, comprising: send out the data check task of the first kind At least one above-mentioned task execution server is given, so that at least one above-mentioned task execution server is sent out to above-mentioned storage device Send the first request, wherein above-mentioned first request is for identifying the data fragmentation of instruction in requests data reading verification task.
In some embodiments, the type of data check task includes Second Type;And it is above-mentioned by above-mentioned data check Task and type are sent at least one above-mentioned task execution server, comprising: send out the data check task of Second Type At least one above-mentioned task execution server is given, so that at least one above-mentioned task execution server is sent out to above-mentioned storage device Send the second request, wherein above-mentioned second request determines mark instruction in data check task for requesting above-mentioned storage device The state of data fragmentation.
In some embodiments, the above method further include: receive the number that at least one above-mentioned task execution server is sent According to check results;According to above-mentioned data check as a result, determining whether the data fragmentation stored in above-mentioned storage device is abnormal;Response In determining that the data fragmentation stored in above-mentioned storage device is abnormal, warning message is generated.
Second aspect, the embodiment of the present application provide a kind of method for verifying data, are applied to verification server set Group in task execution server, above-mentioned verification server cluster further include task generate server, the above method include: to appoint Business generates server and sends task requests;It receives above-mentioned task and generates data check task and type that server is sent;Root According to the above-mentioned type, request corresponding with the above-mentioned type is sent to storage device, to execute above-mentioned data check task.
In some embodiments, the type of data check task includes the first kind, and data check task includes data point The mark of piece;And it is above-mentioned according to the above-mentioned type, request corresponding with the above-mentioned type is sent to storage device, comprising: in response to Determine that the above-mentioned type is the first kind, Xiang Shangshu storage device sends the first request, wherein above-mentioned first request is read for requesting Take the data fragmentation that instruction is identified in above-mentioned data check task.
In some embodiments, the type of data check task includes Second Type, and data check task includes data point The mark of piece;And it is above-mentioned according to the above-mentioned type, request corresponding with the above-mentioned type is sent to storage device, comprising: in response to Determine that the above-mentioned type is Second Type, Xiang Shangshu storage device sends the second request, wherein above-mentioned second request is for requesting It states storage device and determines the state for identifying the data fragmentation of instruction in above-mentioned data check task.
In some embodiments, the above method further include: in response to the completion of the above-mentioned data check task of determination, generate number According to check results;Above-mentioned data check result is sent to above-mentioned task and generates server.
In some embodiments, the above method further include: verified in response to receiving the refusal that above-mentioned storage device is sent Message, interval preset duration send request corresponding with the above-mentioned type to above-mentioned storage device, wherein above-mentioned refusal verification message Above-mentioned storage device is sent in the case where determining that current data access meets preset condition.
The third aspect, the embodiment of the present application provide a kind of method for handling request, are applied to storage device, packet Include: receiving request and determine the sender of above-mentioned request;According to above-mentioned sender, the priority of above-mentioned request is determined;According to Above-mentioned priority handles above-mentioned request.
In some embodiments, above-mentioned according to above-mentioned sender, determine the priority of above-mentioned request, comprising: in response to true Determining sender is task execution server, and the priority that above-mentioned request is arranged is preset value.
In some embodiments, above-mentioned according to above-mentioned priority, handle above-mentioned request, comprising: ask in response to determination is above-mentioned The priority asked is preset value, determines whether current data access meets preset condition;In response to determining that current data access is full Sufficient preset condition, Xiang Shangshu task execution server send refusal verification message.
In some embodiments, above-mentioned request includes the first request, and above-mentioned request includes the mark of data fragmentation;On and State according to above-mentioned priority, handle above-mentioned request, comprising: in response to determine current data access be unsatisfactory for preset condition and on Request is stated as the first request, foundation is connect with the access of above-mentioned task execution server, so that above-mentioned task execution server is read Take the data fragmentation of above-mentioned mark instruction.
In some embodiments, above-mentioned request includes the second request, and above-mentioned request includes the mark of data fragmentation;On and State according to above-mentioned priority, handle above-mentioned request, comprising: in response to determine current data access be unsatisfactory for preset condition and on Request is stated as the second request, Xiang Shangshu task execution server sends the status information of the data fragmentation of above-mentioned mark instruction.
Fourth aspect, the embodiment of the present application provide a kind of for verifying the device of data, are set to verification server set Task in group generates in server, and above-mentioned verification server cluster further includes task execution server, and above-mentioned apparatus includes: number It according to scanning element, is configured to scan the data fragmentation stored in storage device, determines the quantity and mark of data fragmentation;Task Generation unit is configured to generate data check task according to above-mentioned quantity and above-mentioned mark, and determines above-mentioned data check The type of task;First request reception unit is configured to receive the task requests of at least one task execution server transmission; Task transmission unit is configured to for above-mentioned data check task and type to be sent at least one above-mentioned task execution service Device, so that at least one above-mentioned task execution server sends request corresponding with the above-mentioned type to above-mentioned storage device, to hold The above-mentioned data check task of row.
In some embodiments, the type of data check task includes the first kind;And above-mentioned task transmission unit into One step is configured to: the data check task of the first kind is sent at least one above-mentioned task execution server, so that on It states at least one task execution server and sends the first request to above-mentioned storage device, wherein above-mentioned first request is for requesting Read the data fragmentation that instruction is identified in data check task.
In some embodiments, the type of data check task includes Second Type;And above-mentioned task transmission unit into One step is configured to: the data check task of Second Type is sent at least one above-mentioned task execution server, so that on It states at least one task execution server and sends the second request to above-mentioned storage device, wherein above-mentioned second request is for requesting Above-mentioned storage device determines the state that the data fragmentation of instruction is identified in data check task.
In some embodiments, above-mentioned apparatus further include: result receiving unit, be configured to receive it is above-mentioned at least one appoint The data check result that execute server of being engaged in is sent;Result verification unit is configured to according to above-mentioned data check as a result, determining Whether the data fragmentation stored in above-mentioned storage device is abnormal;Alarm generation unit, is configured in response to determine above-mentioned storage The data fragmentation stored in device is abnormal, generates warning message.
5th aspect, the embodiment of the present application provides a kind of for verifying the device of data, is set to verification server set Task execution server in group, above-mentioned verification server cluster further include that task generates server, and above-mentioned apparatus includes: first Request transmitting unit is configured to generate server transmission task requests to task;Task receiving unit, is configured in reception It states task and generates data check task and type that server is sent;Task executing units are configured to according to the above-mentioned type, Request corresponding with the above-mentioned type is sent to storage device, to execute above-mentioned data check task.
In some embodiments, the type of data check task includes the first kind, and data check task includes data point The mark of piece;And above-mentioned task executing units are further configured to: in response to determining that the above-mentioned type is the first kind, upwards It states storage device and sends the first request, wherein above-mentioned first request refers to for requesting to read to identify in above-mentioned data check task The data fragmentation shown.
In some embodiments, the type of data check task includes Second Type, and data check task includes data point The mark of piece;And above-mentioned task executing units are further configured to: in response to determining that the above-mentioned type is Second Type, upwards It states storage device and sends the second request, wherein above-mentioned second request is for requesting above-mentioned storage device to determine above-mentioned data check The state of the data fragmentation of instruction is identified in task.
In some embodiments, above-mentioned apparatus further include: result generation unit is configured in response to determine above-mentioned data The completion of verification task generates data check result;As a result transmission unit is configured to for above-mentioned data check result being sent to Above-mentioned task generates server.
In some embodiments, above-mentioned apparatus further include: the second request transmitting unit is configured in response to receive The refusal verification message of storage device transmission is stated, interval preset duration sends ask corresponding with the above-mentioned type to above-mentioned storage device It asks, wherein above-mentioned refusal verification message is above-mentioned storage device in the case where determining that current data access meets preset condition It sends.
6th aspect, the embodiment of the present application provide it is a kind of for handle request device, be set to storage device, it is above-mentioned Device includes: the second request reception unit, is configured to receive request and determines the sender of above-mentioned request;Priority determines Unit is configured to determine the priority of above-mentioned request according to above-mentioned sender;Requesting processing is configured to according to upper Priority is stated, above-mentioned request is handled.
In some embodiments, above-mentioned priority determining unit is further configured to: in response to determining that sender is to appoint Business execute server, the priority that above-mentioned request is arranged is preset value.
In some embodiments, above-mentioned requesting processing is further configured to: in response to the excellent of the above-mentioned request of determination First grade is preset value, determines whether current data access meets preset condition;In response to determining that it is default that current data access meets Condition, Xiang Shangshu task execution server send refusal verification message.
In some embodiments, above-mentioned request includes the first request, and above-mentioned request includes the mark of data fragmentation;On and It states requesting processing to be further configured to: in response to determining that current data access is unsatisfactory for preset condition and above-mentioned request For the first request, foundation is connect with the access of above-mentioned task execution server, so that the reading of above-mentioned task execution server is above-mentioned Identify the data fragmentation of instruction.
In some embodiments, above-mentioned request includes the second request, and above-mentioned request includes the mark of data fragmentation;On and It states requesting processing to be further configured to: in response to determining that current data access is unsatisfactory for preset condition and above-mentioned request For the second request, Xiang Shangshu task execution server sends the status information of the data fragmentation of above-mentioned mark instruction.
7th aspect, the embodiment of the present application provide a kind of server, comprising: one or more processors;Storage device, One or more programs are stored thereon with, when said one or multiple programs are executed by said one or multiple processors, so that Said one or multiple processors realize the method as described in first aspect any embodiment.
Eighth aspect, the embodiment of the present application provide a kind of server, comprising: one or more processors;Storage device, One or more programs are stored thereon with, when said one or multiple programs are executed by said one or multiple processors, so that Said one or multiple processors realize the method as described in second aspect any embodiment.
9th aspect, the embodiment of the present application provide a kind of storage device, comprising: one or more processors;Storage dress It sets, is stored thereon with one or more programs, when said one or multiple programs are executed by said one or multiple processors, make It obtains said one or multiple processors realizes the method as described in third aspect any embodiment.
Tenth aspect, the embodiment of the present application provide a kind of computer-readable medium, are stored thereon with computer program, should The method as described in first aspect any embodiment is realized when program is executed by processor.
Tenth on the one hand, and the embodiment of the present application provides a kind of computer-readable medium, is stored thereon with computer program, The method as described in second aspect any embodiment is realized when the program is executed by processor.
12nd aspect, the embodiment of the present application provide a kind of computer-readable medium, are stored thereon with computer program, The method as described in third aspect any embodiment is realized when the program is executed by processor.
The application's is provided by the above embodiment for verifying data method and apparatus, can be by scanning storage device The data fragmentation of storage determines the quantity and mark of data fragmentation.And data check task is generated according to above-mentioned quantity and mark, And determine the type of data check task.At the same time it can also receive the task requests of at least one task execution server transmission. Finally, data check task and type are sent at least one task execution server, so that at least one above-mentioned task Execute server sends request corresponding with type to storage device, to execute data check task.The method of the present embodiment, can Different types of data check task is generated to pass through, to complete the verification to the data fragmentation stored in storage device.
Detailed description of the invention
By reading a detailed description of non-restrictive embodiments in the light of the attached drawings below, the application's is other Feature, objects and advantages will become more apparent upon:
Fig. 1 is that one embodiment of the application can be applied to exemplary system architecture figure therein;
Fig. 2 is the flow chart according to one embodiment of the method for verifying data of the application;
Fig. 3 is the flow chart according to another embodiment of the method for verifying data of the application;
Fig. 4 is the flow chart according to one embodiment of the method for handling request of the application;
Fig. 5 is the structural schematic diagram according to one embodiment of the device for verifying data of the application;
Fig. 6 is the structural schematic diagram according to another embodiment of the device for verifying data of the application;
Fig. 7 is the structural schematic diagram according to one embodiment of the device for handling request of the application;
Fig. 8 is adapted for the structural representation of the computer system for the server or storage device of realizing the embodiment of the present application Figure.
Specific embodiment
The application is described in further detail with reference to the accompanying drawings and examples.It is understood that this place is retouched The specific embodiment stated is used only for explaining related invention, rather than the restriction to the invention.It also should be noted that in order to Convenient for description, part relevant to related invention is illustrated only in attached drawing.
It should be noted that in the absence of conflict, the features in the embodiments and the embodiments of the present application can phase Mutually combination.The application is described in detail below with reference to the accompanying drawings and in conjunction with the embodiments.
Fig. 1 shows the method for verifying data that can apply the application, the method for handling request, for school Test the exemplary system architecture 100 of the device of data or the embodiment of the device for handling request.
As shown in Figure 1, system architecture 100 may include verification server cluster 101, web server 102 and storage device 103.Wherein, verification server cluster 101 may include that task generates server 1011 and at least one task execution server 1012.Storage device 103 may include multiple storage equipment 1031.Verification server cluster 101 can pass through web server 102 access storage devices 103, to carry out data check to the data stored in storage device 103.
Task generation server 1011 in verification server cluster 101, which can scan respectively to store in storage device 103, to be set The data fragmentation of standby 1031 storage, and generate the data check task of at least one type.Then, the data check of generation is appointed Business and type are sent to task execution server 1012.
Verify task execution server 1012 in server cluster 101 can according to the type of data check task, to Web server 102 or storage device 103 send request, to execute data check task.
Web server 102 can be to provide the server of various services, such as to the data stored in storage equipment 103 Fragment provides the server supported.Web server 102 can receive the task execution server in verification server cluster 101 1012 requests sent, and are handled above-mentioned request, and then by treated, that request is sent to is each in storage device 103 Store equipment 1031.
Storage device 103 can be various devices for storing data, such as database, data center etc..
It can be it should be noted that task generates server 1011, task execution server 1012, web server 102 Hardware is also possible to software.It is hardware when task generates server 1011, task execution server 1012, web server 102 When, the distributed server cluster of multiple server compositions may be implemented into, individual server also may be implemented into.When task is raw At server 1011, task execution server 1012, web server 102 be software when, multiple softwares or software may be implemented into Module (such as providing Distributed Services), also may be implemented into single software or software module.It is not specifically limited herein.
It should be noted that can not also include web server 102, task execution server 1012 in above-mentioned framework 100 It can also directly be interacted with storage device 103.
It should be noted that for verifying the method for data generally by task provided by the application embodiment illustrated in fig. 2 Server 1011 is generated to execute.Correspondingly, the device shown in fig. 5 for verifying data is generally positioned at task and generates server In 1011.For verifying the method for data generally by task execution server 1012 provided by the application embodiment illustrated in fig. 3 It executes.Correspondingly, the device shown in fig. 6 for verifying data is generally positioned in task execution server 1012.The application Method provided by embodiment illustrated in fig. 4 for handling request is generally executed by storage device 103.Correspondingly, shown in Fig. 7 Device for handling request is generally positioned in storage device 103.
It should be understood that the number of task generation server, task execution server, web server and storage device in Fig. 1 Mesh is only schematical.According to needs are realized, it can have any number of task and generate server, task execution service Device, web server and storage device.
With continued reference to Fig. 2, the process of one embodiment of the method for verifying data according to the application is shown 200.The method for verifying data of the present embodiment generates server applied to the task in verification server cluster, above-mentioned Verifying server cluster can also include task execution server.The method of the present embodiment the following steps are included:
Step 201, the data fragmentation stored in storage device is scanned, determines the quantity and mark of data fragmentation.
In the present embodiment, for verify the method for data executing subject (such as task shown in FIG. 1 generate server 1011) data fragmentation stored in storage device (such as storage device 103 shown in FIG. 1) can be scanned, determines data fragmentation Quantity and mark.Above-mentioned storage device can be database.In the storage device, data are stored in the form of data fragmentation, Each data fragmentation has a unique mark.Task generates server by the full dose data in scanning storage device, just It can determine the quantity and mark of data fragmentation.
Step 202, data check task is generated according to quantity and mark, and determines the type of data check task.
In the present embodiment, executing subject, can be according to quantity and mark after the quantity and mark for determining data fragmentation Data check task is generated, and determines the type of data check task.For example, task, which generates server, can be generated M data Verification task, wherein M is the quantity of data fragmentation.Also, task generates server and can be encapsulated in the mark of data fragmentation In data check task.In this way, each data check task and each data fragmentation correspond.Alternatively, task generates service Multiple data fragmentations and multiple marks can also be encapsulated in a data check and appointed by device according to the size of each data fragmentation In business.Data check task is used to be sent to task execution server (such as task execution server 1012 shown in FIG. 1), with Data check task is executed for task execution server, completes the verification to full dose data in storage device.
In the present embodiment, data check task may include the data check task of at least one type, for example, can wrap Include the data check task of the first kind and the data check task of Second Type.Wherein, the data check task of the first kind It is used to indicate each data fragmentation that task execution server completely reads data, school then is calculated to read data It tests code and is compared with the check code of itself storage.The data check task of the first kind can ensure the correctness of data, But I/O (input/output) resource of storage device can be occupied when reading data fragmentation, and calculate the time-consuming ratio of check code It is longer.The data check task of Second Type is used to indicate the shape that task execution server request storage device determines data fragmentation State.Above-mentioned state may include open position and non-open position.If data fragmentation is open position, illustrate storage device The data of middle storage be it is incomplete, the data fragmentation of open position is non-readable.The data check task of Second Type It not can read data, reduce the occupancy of the I/O resource to hard disk and network, and do not have to calculate check code.Therefore, the second class The data check task time-consuming of type is shorter, the disadvantage is that the exception of data content cannot be verified out.
Task generates server when generating data check task, can generate the data check task of the first kind simultaneously With the data check task of Second Type, data school can also be generated according to the execution state of all types of data check tasks Test task.For example, if currently the data check task of the first kind is still in the process of implementation, task generates service Device can only generate the data check task of Second Type.
Step 203, the task requests of at least one task execution server transmission are received.
In the present embodiment, task, which generates server, can determine each task execution server by receiving task requests State, above-mentioned state may include that task execution is finished with task execution in the process.If task generates server and has received The task requests that task execution server is sent, illustrate that the state of task execution server finishes for task execution.At this point, task Task execution server can be sent to for the data check task and type of generation by generating server.
Step 204, data check task and type are sent at least one task execution server, so that at least one A task execution server sends request corresponding with type to storage device, to execute data check task.
In the present embodiment, the data check task and type of generation can be sent to each task and held by task generation server Row server.Each task execution server, can be to storage device transmission and class after receiving data check task and type The corresponding request of type, to execute data check task.For example, if task execution server receives the number of the first kind According to verification task, then the first request corresponding with the first kind can be sent to storage device.If task execution server connects The data check task of Second Type is received, then can send the second request corresponding with Second Type to storage device.
It should be noted that task generates server may generate multiple data check tasks simultaneously, task generates service Different data check tasks can be sent to each task execution server by device.
In some optional implementations of the present embodiment, the type of data check task includes the first kind.On then Stating step 204 can be realized by following steps unshowned in Fig. 2: by the data check task of the first kind be sent to A few task execution server, so that at least one task execution server sends the first request to storage device.Wherein, One request is for identifying the data fragmentation of instruction in requests data reading verification task.
It, can be to if task execution server receives the data check task of the first kind in this implementation Storage device sends the first request corresponding with the first kind.By storage device be database for, task execution server to After database sends the first request, database can establish database connection, so that task execution server can read data Data in library.It is understood that including the mark of data fragmentation in data check task, task execution server only needs to read Take the data fragmentation of above-mentioned mark instruction.
In some optional implementations of the present embodiment, the type of data check task includes Second Type.On then Stating step 204 can be realized by following steps unshowned in Fig. 2: by the data check task of Second Type be sent to A few task execution server, so that at least one task execution server sends the second request to storage device.Wherein, Two requests determine the state that the data fragmentation of instruction is identified in data check task for requesting storage device.
It, can be to if task execution server receives the data check task of Second Type in this implementation Storage device sends the second request corresponding with Second Type.Storage device need to only determine data after receiving the second request The state of the data fragmentation of instruction is identified in verification task, and status information is sent to task execution server.It can be with Understand, includes the mark of data fragmentation in the second request, can store Data Identification and storage position inside storage device The mapping relations set.Storage device can parse the second request after receiving the second request, determine data fragmentation therein Mark.Then in conjunction with above-mentioned mapping relations, the storage location of the data fragmentation of above-mentioned mark instruction is determined.If above-mentioned storage position The place of setting still is stored with data fragmentation, then its state is non-vacancy.If not stored at above-mentioned storage location have data fragmentation, Its state is vacancy.
In some optional implementations of the present embodiment, the above method can further include following in Fig. 2 Step: the data check result of at least one task execution server transmission is received;According to data check as a result, determining storage dress Whether the data fragmentation for setting middle storage is abnormal;In response to determining that the data fragmentation stored in storage device is abnormal, alarm signal is generated Breath.
In this implementation, each task execution server after completing data check task, data check can be generated as a result, And data check result is sent to task and generates server.Wherein, for receiving the data check task of the first kind It for task execution server, after it, which reads, completes data fragmentation, is calculated the check code of data fragmentation, and will obtain After check code is compared with the check code being locally stored, indicate that it completes data check task.For receiving Second Type Data check task task execution server for, when its receive storage device return data fragmentation status information When, indicate that it completes data check task.Task execution server can be according to check code comparison result or the state received Information generates check results.Above-mentioned check results are for indicating data fragmentation with the presence or absence of abnormal.
Task generates server after receiving the check results that each task execution server is sent, it can be determined that storage dress Each data fragmentation of middle storage is set with the presence or absence of abnormal.Specifically, if task generates each check results that server receives All indicate that data fragmentation is normal, then task, which generates server, can determine that each data fragmentation stored in storage device is normal.Such as Fruit task, which generates server one or more check results, indicates that data fragmentation is abnormal, then task generation server, which can determine, deposits Each data fragmentation stored in storage device is abnormal.
Task generates server when determining each data fragmentation exception, and warning message can be generated.Above-mentioned warning message is used In reminding technology personnel, there is exception in data fragmentation, so as to technical staff's repair data fragment.
In this implementation, since the data check task time-consuming of Second Type is short, task generates server can The data exception as caused by data fragmentation vacancy is found as soon as possible.Simultaneously as the data check task of the first kind can be with Determine data content with the presence or absence of abnormal, therefore, task generate server it is also ensured that data check accuracy rate.
The method provided by the above embodiment for verifying data of the application, can be by storing in scanning storage device Data fragmentation, determine the quantity and mark of data fragmentation.And data check task is generated according to above-mentioned quantity and mark, and really Determine the type of data check task.At the same time it can also receive the task requests of at least one task execution server transmission.Most Afterwards, data check task and type are sent at least one task execution server, so that at least one above-mentioned task is held Row server sends request corresponding with type to storage device, to execute data check task.The method of the present embodiment, can be with By generating different types of data check task, to complete the verification to the data fragmentation stored in storage device.
With continued reference to Fig. 3, it illustrates the streams according to another embodiment of the method for verifying data of the application Journey 300.The method for verifying data of the present embodiment is applied to the task execution server in verification server cluster.Verification Server cluster further includes that task generates server.As shown in figure 3, the method for verifying data of the present embodiment includes following Step:
Step 301, server is generated to task send task requests.
In the present embodiment, the executing subject of the method for verifying data (such as task execution server shown in Fig. 1 1012) server hair can be generated to task by wired connection or wireless connection mode when being not carried out data check task Send task requests.Task generates server after receiving task requests, it can be assumed that task execution server can currently connect Receive data check task.
Step 302, it receives task and generates data check task and type that server is sent.
In the present embodiment, task execution server can receive task generate server send data check task and Type.Above-mentioned data check task can be task and generate the data fragmentation that server stores in scanning storage device, determine The quantity and mark of data fragmentation.Then it is generated according to quantity and mark.Task generates server can be by number generated Task execution server is sent to according to verification task.The type of data check task may include the first kind and Second Type. It may include the mark of data fragmentation in data check task, task execution server is used to verify the data of above-mentioned mark instruction Fragment.Wherein, the data check task of the first kind be used to indicate task execution server completely read data each Then fragment calculates check code to read data and is compared with the check code of itself storage.The data of the first kind Verification task can ensure the correctness of data, but I/O (input/output) money of storage device can be occupied when reading data Source, and the time-consuming for calculating check code is long.The data check task of Second Type is used to indicate task execution server and asks Storage device is asked to determine the state of data fragmentation.Above-mentioned state may include open position and non-open position.If data point Piece is open position, then illustrate the data stored in storage device be it is incomplete, it is non-readable.The data school of Second Type Testing task not can read data, reduce the occupancy of the I/O resource to hard disk and network, and not have to calculate check code.Therefore, The data check task time-consuming of Second Type is shorter, the disadvantage is that the exception of data content cannot be verified out.
Step 303, according to the above-mentioned type, request corresponding with type is sent to storage device, is appointed with executing data check Business.
Task execution server can be sent and type pair after receiving data check task and type to storage device The request answered, to execute data check task.Corresponding first request of the first kind, corresponding second request of Second Type.
In some optional implementations of the present embodiment, the type of data check task includes the first kind, data Verification task includes the mark of data fragmentation.Then above-mentioned steps 303 can specifically pass through following steps unshowned in Fig. 3: ring The first request should be sent to storage device in determining that the above-mentioned type is the first kind.
In this implementation, the first request is for identifying the data fragmentation of instruction in requests data reading verification task.With Storage device is for database, after task execution server sends the first request to database, database can establish data Library connection, so that task execution server can be with the data in reading database.It is understood that task execution server is only The data fragmentation of above-mentioned mark instruction need to be read.
In some optional implementations of the present embodiment, the type of data check task includes Second Type, data Verification task includes the mark of data fragmentation.Then above-mentioned steps 303 can specifically pass through following steps unshowned in Fig. 3: ring The second request should be sent to storage device in determining that type is Second Type.
In this implementation, the second request identifies the data of instruction for requesting storage device to determine in data check task The state of fragment.Storage device need to only determine the data point that instruction is identified in data check task after receiving the second request The state of piece, and status information is sent to task execution server.
In some optional implementations of the present embodiment, the above method can further include in Fig. 3 and be not shown Following steps: in response to determine data check task completion, generate data check result;Data check result is sent to Task generates server.
In this implementation, data check result is can be generated after completing data check task in task execution server. It is then possible to which the data check result of generation, which is sent to task, generates server.Wherein, for receiving the number of the first kind For task execution server according to verification task, after it, which reads, completes data fragmentation, the verification of data fragmentation is calculated Code, and after obtained check code is compared with the check code being locally stored, indicate its completion data check task.For connecing For the task execution server for receiving the data check task of Second Type, when it receives the data point of storage device return When the status information of piece, indicate that it completes data check task.Task execution server can according to check code comparison result or The status information that receives generates check results.Above-mentioned check results are for indicating data fragmentation with the presence or absence of abnormal.
Task generates the check results that server can be sent according to each task execution server, to judge in storage device Each data fragmentation of storage is with the presence or absence of abnormal.
In some optional implementations of the present embodiment, the above method can also include unshowned following in Fig. 3 Step: the refusal verification message in response to receiving storage device transmission, interval preset duration is sent to storage device and type Corresponding request.
In this implementation, refusal verification message, which is storage device, is determining that current data access meets the feelings of preset condition It is sent under condition.Above-mentioned preset condition can be for judge current data access whether the condition of congestion.Above-mentioned preset condition Can include but is not limited to: the number of requests received is greater than preset threshold, and occupied flow is respectively requested to be greater than preset threshold. If current data access meets above-mentioned preset condition, illustrate that congestion is compared in current data access, storage device processing is above-mentioned to ask The pressure asked is larger.At this point, storage device can refuse the first request and/or the second request of the transmission of task execution server, Refusal verification message is sent to task execution server.When task execution server receives refusal verification message, it can be assumed that The pressure of the currently processed request of storage device is larger, can be spaced preset duration and send and data check task to storage device The corresponding request of type.In this way, storage device can handle task execution service in the case where current data accesses not congestion The first request and/or the second request that device is sent.
The method of this implementation can allow to store dress when the data in user's access storage device are more frequent The verification postponed to the data fragmentation wherein stored is set, to will not influence reading of the user to data fragmentation.
The method provided by the above embodiment for verifying data of the application can generate server hair to task first Send task requests.And it receives task and generates data check task and type that server is sent.Finally, according to type, Xiang Cun Storage device sends request corresponding with type, to execute data check task.The method of the present embodiment, can be according to data check The type of task sends different requests to storage device, so as to complete data check task in different ways, increases number According to the mode of verification.
With continued reference to Fig. 4, it illustrates the processes according to one embodiment for handle the method requested of the application 400.The method for handling request of the present embodiment can be applied to storage device, which can receive task execution The request that server is sent.As shown in figure 4, the method for the present embodiment may comprise steps of:
Step 401, it receives request and determines the sender of request.
It, can for handling the executing subject (such as storage device 103 shown in Fig. 1) of method of request in the present embodiment Asking for user terminal, task execution server or the transmission of other electronic equipments is received in a manner of through wired connection or wireless connection It asks.It may include the information of sender, such as source IP address in above-mentioned request.Storage device can be according to sender in request Information determines that the sender of request is user terminal or task execution server.
Step 402, according to sender, the priority of request is determined.
Storage device can also determine the priority of request according to sender.Such as, if it is determined that the sender of request is User terminal, then storage device can set 1 for the priority of the request.If it is determined that the sender of request is task execution Server, then storage device can set 0 for the priority of the request.Wherein, priority 1 is higher than priority 0.It is understood that , storage device can also identify the priority of the request of different senders using other modes.
Step 403, according to priority, processing request.
Storage device can be according to set priority, to handle request.For example, storage device can prioritize processing it is excellent The first higher request of grade reprocesses the lower request of priority when the quantity of the higher request of priority is less than preset threshold.
In some optional implementations of the present embodiment, above-mentioned steps 403 can specifically include unshowned in Fig. 4 Following steps: in response to determining that sender is task execution server, the priority that request is arranged is preset value.
In this implementation, if storage device determines that the sender of request is task execution server, it can will request Priority be set as preset value.Herein, preset value can be used to indicate that the priority of request is lower.
In some optional implementations of the present embodiment, above-mentioned steps 403 can specifically include unshowned in Fig. 4 Following steps: in response to determining that the priority of request is preset value, determine whether current data access meets preset condition;Response Meet preset condition in determining that current data accesses, sends refusal verification message to task execution server.
After the priority for determining request is preset value, storage device may further determine that whether current data access is full Sufficient preset condition.In this implementation, above-mentioned preset condition can be for judge current data access whether the condition of congestion. Above-mentioned preset condition can include but is not limited to: the number of requests received is greater than preset threshold, respectively requests occupied flow Greater than preset threshold.If current data access meets above-mentioned preset condition, illustrate that congestion, storage dress are compared in current data access Set handle above-mentioned request pressure it is larger.At this point, storage device can refuse the request of task execution server transmission, to task Execute server sends refusal verification message.
The method of this implementation can allow to store dress when the data in user's access storage device are more frequent The verification postponed to the data fragmentation wherein stored is set, to will not influence reading of the user to data fragmentation.
In some optional implementations of the present embodiment, above-mentioned request may include the first request, and above-mentioned request is also Mark including data fragmentation.Above-mentioned steps 403 can specifically include unshowned following steps in Fig. 4: work as in response to determination Preceding data access is unsatisfactory for preset condition and above-mentioned request is the first request, establishes the access with task execution server and connects It connects, so that task execution server reads the data fragmentation of mark instruction.
If storage device determines current data, access is unsatisfactory for preset condition, illustrates the pressure of currently processed request not Greatly, it can handle the request of task execution server transmission.If the request that task execution server is sent is the first request, It can establish and connect with the access of task execution server.In this way, task execution server can be read in the first request Identify the data fragmentation of instruction.Task execution server can calculate the check code of data fragmentation after the completion of reading, and by its It is compared with the check code being locally stored, generates check results.
In some optional implementations of the present embodiment, above-mentioned request may include the second request, and above-mentioned request is also Mark including data fragmentation.Above-mentioned steps 403 can specifically include unshowned following steps in Fig. 4: work as in response to determination Preceding data access is unsatisfactory for preset condition and request as the second request, and the data of mark instruction are sent to task execution server The status information of fragment.
If storage device determines current data, access is unsatisfactory for preset condition, illustrates the pressure of currently processed request not Greatly, it can handle the request of task execution server transmission.If the request that task execution server is sent is the second request, Storage device can determine the storage location of the data fragmentation of above-mentioned mark instruction.If be still stored at above-mentioned storage location Data fragmentation, then its state is non-vacancy.If not stored at above-mentioned storage location have data fragmentation, state is vacancy. Status information can be sent to task execution server by storage device, so that task execution server generates check results.
The method provided by the above embodiment for handling request of the application can determine request upon receiving a request Sender.And according to sender, the priority of request is determined.Finally, according to priority, processing request.In this manner it is ensured that The request that priority processing user sends guarantees that the checking procedure of data will not influence user and experience to the reading of data.
With further reference to Fig. 5, as the realization to method shown in above-mentioned each figure, this application provides one kind to be used for check number According to device one embodiment, the Installation practice is corresponding with embodiment of the method shown in Fig. 2, which can specifically answer For in various electronic equipments.
As shown in figure 5, the device 500 for verifying data of the present embodiment can be set in verification server cluster Task generates in server, and verification server cluster further includes task execution server.Device 500 includes: data scanning unit 501, task generation unit 502, the first request reception unit 503 and task transmission unit 504.
Data scanning unit 501 is configured to scan the data fragmentation stored in storage device, determines the number of data fragmentation Amount and mark.
Task generation unit 502 is configured to generate data check task according to quantity and mark, and determines data school Test the type of task.
First request reception unit 503 is configured to receive the task requests of at least one task execution server transmission.
Task transmission unit 504 is configured to data check task and type being sent at least one task execution Server, so that at least one task execution server sends request corresponding with type to storage device, to execute data school Test task.
In some optional implementations of the present embodiment, the type of data check task includes the first kind.Task Transmission unit 504 can be further configured to: the data check task of the first kind is sent at least one task execution Server, so that at least one task execution server sends the first request to storage device.Wherein, the first request is for requesting Read the data fragmentation that instruction is identified in data check task.
In some optional implementations of the present embodiment, the type of data check task includes Second Type.Task Transmission unit 504 is further configured to: the data check task of Second Type is sent at least one task execution service Device, so that at least one task execution server sends the second request to storage device.Wherein, the second request is for requesting storage Device determines the state that the data fragmentation of instruction is identified in data check task.
In some optional implementations of the present embodiment, above-mentioned apparatus 500, which can further include in Fig. 5, not to be shown Result receiving unit, result verification unit and alarm generation unit out.
As a result receiving unit is configured to receive the data check result of at least one task execution server transmission.
Result verification unit is configured to according to data check as a result, determining that the data fragmentation stored in storage device is No exception.
Alarm generation unit is configured in response to determine that the data fragmentation stored in storage device is abnormal, generates alarm Information.
It should be appreciated that for verifying the unit 501 recorded in the devices 500 of data to unit 504 respectively and in reference Fig. 2 Each step in the method for description is corresponding.As a result, above with respect to the operation and feature of the method description for verifying data It is equally applicable to device 500 and unit wherein included, details are not described herein.
With continued reference to Fig. 6, it illustrates the knots according to another embodiment of the device for verifying data of the application Structure schematic diagram.As shown in fig. 6, the task execution service in verification server cluster can be set in the device 600 of the present embodiment In device, verification server cluster further includes that task generates server.Device 600 includes: the first request transmitting unit 601, task Receiving unit 602 and task executing units 603.
First request transmitting unit 601 is configured to generate server transmission task requests to task.
Task receiving unit 602 is configured to receive task and generates data check task and type that server is sent.
Task executing units 603, are configured to according to type, request corresponding with type are sent to storage device, to hold Row data check task.
In some optional implementations of the present embodiment, the type of data check task includes the first kind, data Verification task includes the mark of data fragmentation.Task executing units 603 can be further configured to: be in response to determining type The first kind sends the first request to storage device, wherein the first request refers to for identifying in requests data reading verification task The data fragmentation shown.
In some optional implementations of the present embodiment, the type of data check task includes Second Type, data Verification task includes the mark of data fragmentation.Task executing units 603 can be further configured to: be in response to determining type Second Type sends the second request to storage device.Wherein, the second request is for requesting storage device to determine data check task The state of the data fragmentation of middle mark instruction.
In some optional implementations of the present embodiment, above-mentioned apparatus 600, which can further include in Fig. 6, not to be shown Result generation unit and result transmission unit out.
As a result generation unit is configured in response to determine the completion of data check task, generates data check result.
As a result transmission unit is configured to for data check result being sent to task and generates server.
In some optional implementations of the present embodiment, above-mentioned apparatus 600, which can further include in Fig. 6, not to be shown The second request transmitting unit out is configured in response to receive the refusal verification message of storage device transmission, and interval is default Duration sends request corresponding with type to storage device.Wherein, refusal verification message is that storage device is determining current data What access was sent in the case where meeting preset condition.
It should be appreciated that for verifying the unit 601 recorded in the devices 600 of data to unit 603 respectively and in reference Fig. 3 Each step in the method for description is corresponding.As a result, above with respect to the operation and feature of the method description for verifying data It is equally applicable to device 600 and unit wherein included, details are not described herein.
With continued reference to Fig. 7, it illustrates the structures according to one embodiment for handle the device requested of the application Schematic diagram.The present embodiment for handle request device can be set in storage device.The device 700 of the present embodiment includes Second request reception unit 701, priority determining unit 702 and requesting processing 703.
Second request reception unit 701 is configured to receive request and determines the sender of request.
Priority determining unit 702 is configured to determine the priority of request according to sender.
Requesting processing 703 is configured to according to priority, processing request.
In some optional implementations of the present embodiment, priority determining unit 702 can be further configured to: In response to determining that sender is task execution server, the priority that request is arranged is preset value.
In some optional implementations of the present embodiment, requesting processing 703 can be further configured to: be rung It should determine whether current data access meets preset condition in determining that the priority of request is preset value;It is current in response to determining Data access meets preset condition, sends refusal verification message to task execution server.
In some optional implementations of the present embodiment, request includes the first request, and request includes data fragmentation Mark.Then requesting processing 703 can be further configured to: in response to determining that current data access is unsatisfactory for preset condition And request is the first request, foundation is connect with the access of task execution server, so that task execution server reads mark The data fragmentation of instruction.
In some optional implementations of the present embodiment, request includes the second request, and request includes data fragmentation Mark.Then requesting processing 703 can be further configured to: in response to determining that current data access is unsatisfactory for preset condition And request is the second request, and the status information of the data fragmentation of mark instruction is sent to task execution server.
It should be appreciated that for handle in the device 700 requested the unit 701 recorded to unit 703 respectively and in reference Fig. 4 Each step in the method for description is corresponding.As a result, above with respect to the operation and feature of the method description for handling request It is equally applicable to device 700 and unit wherein included, details are not described herein.
Below with reference to Fig. 8, it illustrates the electronic equipment that is suitable for being used to realize embodiment of the disclosure, (example is as shown in figure 1 Server or storage device) 800 structural schematic diagram.Storage device/server shown in Fig. 8 is only an example, is not answered Any restrictions are brought to the function and use scope of embodiment of the disclosure.
As shown in figure 8, electronic equipment 800 may include processing unit (such as central processing unit, graphics processor etc.) 801, random access can be loaded into according to the program being stored in read-only memory (ROM) 802 or from storage device 808 Program in memory (RAM) 803 and execute various movements appropriate and processing.In RAM 803, it is also stored with electronic equipment Various programs and data needed for 800 operations.Processing unit 801, ROM 802 and RAM803 are connected with each other by bus 804. Input/output (I/O) interface 805 is also connected to bus 804.
In general, following device can connect to I/O interface 805: including such as touch screen, touch tablet, keyboard, mouse, taking the photograph As the input unit 806 of head, microphone, accelerometer, gyroscope etc.;Including such as liquid crystal display (LCD), loudspeaker, vibration The output device 807 of dynamic device etc.;Storage device 808 including such as tape, hard disk etc.;And communication device 809.Communication device 809, which can permit electronic equipment 800, is wirelessly or non-wirelessly communicated with other equipment to exchange data.Although Fig. 8 shows tool There is the electronic equipment 800 of various devices, it should be understood that being not required for implementing or having all devices shown.It can be with Alternatively implement or have more or fewer devices.Each box shown in Fig. 8 can represent a device, can also root According to needing to represent multiple devices.
Particularly, in accordance with an embodiment of the present disclosure, it may be implemented as computer above with reference to the process of flow chart description Software program.For example, embodiment of the disclosure includes a kind of computer program product comprising be carried on computer-readable medium On computer program, which includes the program code for method shown in execution flow chart.In such reality It applies in example, which can be downloaded and installed from network by communication device 809, or from storage device 808 It is mounted, or is mounted from ROM 802.When the computer program is executed by processing unit 801, the implementation of the disclosure is executed The above-mentioned function of being limited in the method for example.It should be noted that computer-readable medium described in embodiment of the disclosure can To be computer-readable signal media or computer readable storage medium either the two any combination.Computer can Reading storage medium for example may be-but not limited to-the system of electricity, magnetic, optical, electromagnetic, infrared ray or semiconductor, device Or device, or any above combination.The more specific example of computer readable storage medium can include but is not limited to: tool There are electrical connection, the portable computer diskette, hard disk, random access storage device (RAM), read-only memory of one or more conducting wires (ROM), erasable programmable read only memory (EPROM or flash memory), optical fiber, portable compact disc read-only memory (CD- ROM), light storage device, magnetic memory device or above-mentioned any appropriate combination.In embodiment of the disclosure, computer Readable storage medium storing program for executing can be any tangible medium for including or store program, which can be commanded execution system, device Either device use or in connection.And in embodiment of the disclosure, computer-readable signal media may include In a base band or as the data-signal that carrier wave a part is propagated, wherein carrying computer-readable program code.It is this The data-signal of propagation can take various forms, including but not limited to electromagnetic signal, optical signal or above-mentioned any appropriate Combination.Computer-readable signal media can also be any computer-readable medium other than computer readable storage medium, should Computer-readable signal media can send, propagate or transmit for by instruction execution system, device or device use or Person's program in connection.The program code for including on computer-readable medium can transmit with any suitable medium, Including but not limited to: electric wire, optical cable, RF (radio frequency) etc. or above-mentioned any appropriate combination.
Above-mentioned computer-readable medium can be included in above-mentioned electronic equipment;It is also possible to individualism, and not It is fitted into the electronic equipment.Above-mentioned computer-readable medium carries one or more program, when said one or more When a program is executed by the electronic equipment, so that the electronic equipment: the data fragmentation stored in scanning storage device determines data The quantity and mark of fragment;Data check task is generated according to quantity and mark, and determines the type of data check task;It connects Receive the task requests of at least one task execution server transmission;Data check task and type are sent at least one Business execute server, so that at least one task execution server sends request corresponding with type to storage device, to execute Data check task.Alternatively, generating server to task sends task requests;Reception task generates the data school that server is sent Test task and type;According to type, request corresponding with type is sent to storage device, to execute data check task.Or Person receives request and determines the sender of request;According to sender, the priority of request is determined;According to priority, processing is asked It asks.
The behaviour for executing embodiment of the disclosure can be write with one or more programming languages or combinations thereof The computer program code of work, above procedure design language include object oriented program language-such as Java, Smalltalk, C++ further include conventional procedural programming language-such as " C " language or similar program design language Speech.Program code can be executed fully on the user computer, partly be executed on the user computer, as an independence Software package execute, part on the user computer part execute on the remote computer or completely in remote computer or It is executed on server.In situations involving remote computers, remote computer can pass through the network of any kind --- packet It includes local area network (LAN) or wide area network (WAN)-is connected to subscriber computer, or, it may be connected to outer computer (such as benefit It is connected with ISP by internet).
Flow chart and block diagram in attached drawing are illustrated according to the system of the various embodiments of the disclosure, method and computer journey The architecture, function and operation in the cards of sequence product.In this regard, each box in flowchart or block diagram can generation A part of one module, program segment or code of table, a part of the module, program segment or code include one or more use The executable instruction of the logic function as defined in realizing.It should also be noted that in some implementations as replacements, being marked in box The function of note can also occur in a different order than that indicated in the drawings.For example, two boxes succeedingly indicated are actually It can be basically executed in parallel, they can also be executed in the opposite order sometimes, and this depends on the function involved.Also it to infuse Meaning, the combination of each box in block diagram and or flow chart and the box in block diagram and or flow chart can be with holding The dedicated hardware based system of functions or operations as defined in row is realized, or can use specialized hardware and computer instruction Combination realize.
Being described in unit involved in embodiment of the disclosure can be realized by way of software, can also be passed through The mode of hardware is realized.Described unit also can be set in the processor, for example, can be described as: a kind of processor Including data scanning unit, task generation unit, the first request reception unit and task transmission unit.Alternatively, a kind of processor Including the first request transmitting unit, task receiving unit and task executing units.Alternatively, a kind of processor includes that the second request connects Receive unit, priority determining unit and requesting processing.Wherein, the title of these units under certain conditions constitute pair The restriction of the unit itself, for example, data scanning unit is also described as the " data point stored in scanning storage device Piece determines the quantity of data fragmentation and the unit of mark ".
Above description is only the preferred embodiment of the disclosure and the explanation to institute's application technology principle.Those skilled in the art Member it should be appreciated that embodiment of the disclosure involved in invention scope, however it is not limited to the specific combination of above-mentioned technical characteristic and At technical solution, while should also cover do not depart from foregoing invention design in the case where, by above-mentioned technical characteristic or its be equal Feature carries out any combination and other technical solutions for being formed.Such as disclosed in features described above and embodiment of the disclosure (but It is not limited to) technical characteristic with similar functions is replaced mutually and the technical solution that is formed.

Claims (34)

1. a kind of method for verifying data generates server, the verification applied to the task in verification server cluster Server cluster further includes task execution server, which comprises
The data fragmentation stored in scanning storage device, determines the quantity and mark of data fragmentation;
Data check task is generated according to the quantity and the mark, and determines the type of the data check task;
Receive the task requests of at least one task execution server transmission;
The data check task and type are sent at least one described task execution server, so that described at least one A task execution server sends request corresponding with the type to the storage device, is appointed with executing the data check Business.
2. according to the method described in claim 1, wherein, the type of data check task includes the first kind;And
It is described that the data check task and type are sent at least one described task execution server, comprising:
The data check task of the first kind is sent at least one described task execution server so that it is described at least one Task execution server sends the first request to the storage device, wherein first request is used for requests data reading school It tests in task and identifies the data fragmentation of instruction.
3. according to the method described in claim 1, wherein, the type of data check task includes Second Type;And
It is described that the data check task and type are sent at least one described task execution server, comprising:
The data check task of Second Type is sent at least one described task execution server so that it is described at least one Task execution server sends the second request to the storage device, wherein second request is for requesting the storage to fill It sets, determines the state for identifying the data fragmentation of instruction in data check task.
4. method according to claim 1-3, wherein the method also includes:
Receive the data check result that at least one described task execution server is sent;
According to the data check as a result, determining whether the data fragmentation stored in the storage device is abnormal;
In response to the data fragmentation exception stored in the determination storage device, warning message is generated.
5. a kind of method for verifying data, applied to the task execution server in verification server cluster, the verification Server cluster further includes that task generates server, which comprises
Server, which is generated, to task sends task requests;
It receives the task and generates data check task and type that server is sent;
According to the type, request corresponding with the type is sent to storage device, to execute the data check task.
6. data check is appointed according to the method described in claim 5, wherein, the type of data check task includes the first kind Business includes the mark of data fragmentation;And
It is described according to the type, send request corresponding with the type to storage device, comprising:
It is the first kind in response to the determination type, Xiang Suoshu storage device sends the first request, wherein first request Data fragmentation for requesting to identify instruction in the reading data check task.
7. data check is appointed according to the method described in claim 5, wherein, the type of data check task includes Second Type Business includes the mark of data fragmentation;And
It is described according to the type, send request corresponding with the type to storage device, comprising:
It is Second Type in response to the determination type, Xiang Suoshu storage device sends the second request, wherein second request The state of the data fragmentation of instruction is identified in the data check task for requesting the storage device to determine.
8. according to the described in any item methods of claim 5-7, wherein the method also includes:
In response to the completion of the determination data check task, data check result is generated;
The data check result is sent to the task and generates server.
9. according to the described in any item methods of claim 5-7, wherein the method also includes:
The refusal verification message sent in response to receiving the storage device, interval preset duration are sent to the storage device Request corresponding with the type, wherein the refusal verification message is that the storage device is determining that current data access is full It is sent in the case where sufficient preset condition.
10. a kind of method for handling request, is applied to storage device, comprising:
It receives request and determines the sender of the request;
According to described sender, the priority of the request is determined;
According to the priority, the request is handled.
11. it is described that the priority of the request is determined according to described sender according to the method described in claim 10, wherein, Include:
In response to determining that sender is task execution server, the priority that the request is arranged is preset value.
12. according to the method for claim 11, wherein it is described according to the priority, handle the request, comprising:
Priority in response to the determination request is preset value, determines whether current data access meets preset condition;
In response to determining that current data access meets preset condition, Xiang Suoshu task execution server sends refusal verification message.
13. according to the method for claim 12, wherein the request includes the first request, and the request includes data point The mark of piece;And
It is described according to the priority, handle the request, comprising:
In response to determining that current data access is unsatisfactory for preset condition and the request as the first request, establish and the task The access of execute server connects, so that the task execution server reads the data fragmentation of the mark instruction.
14. according to the method for claim 12, wherein the request includes the second request, and the request includes data point The mark of piece;And
It is described according to the priority, handle the request, comprising:
In response to determining that current data access is unsatisfactory for preset condition and the request as the second request, Xiang Suoshu task execution Server sends the status information of the data fragmentation of the mark instruction.
15. a kind of for verifying the device of data, being set in verification server cluster for task is generated in server, the school Testing server cluster further includes task execution server, and described device includes:
Data scanning unit is configured to scan the data fragmentation stored in storage device, determines the quantity and mark of data fragmentation Know;
Task generation unit is configured to generate data check task according to the quantity and the mark, and described in determination The type of data check task;
First request reception unit is configured to receive the task requests of at least one task execution server transmission;
Task transmission unit is configured to for the data check task and type being sent at least one described task execution Server, so that at least one described task execution server sends request corresponding with the type to the storage device, To execute the data check task.
16. device according to claim 15, wherein the type of data check task includes the first kind;And
The task transmission unit is further configured to:
The data check task of the first kind is sent at least one described task execution server so that it is described at least one Task execution server sends the first request to the storage device, wherein first request is used for requests data reading school It tests in task and identifies the data fragmentation of instruction.
17. device according to claim 15, wherein the type of data check task includes Second Type;And
The task transmission unit is further configured to:
The data check task of Second Type is sent at least one described task execution server so that it is described at least one Task execution server sends the second request to the storage device, wherein second request is for requesting the storage to fill It sets, determines the state for identifying the data fragmentation of instruction in data check task.
18. the described in any item devices of 5-17 according to claim 1, wherein described device further include:
As a result receiving unit is configured to receive the data check result that at least one described task execution server is sent;
Result verification unit is configured to according to the data check as a result, determining the data point stored in the storage device Whether piece is abnormal;
Alarm generation unit is configured in response to determine that the data fragmentation stored in the storage device is abnormal, generates alarm Information.
19. a kind of for verifying the device of data, the task execution server being set in verification server cluster, the verification Server cluster further includes that task generates server, and described device includes:
First request transmitting unit is configured to generate server transmission task requests to task;
Task receiving unit is configured to receive the task and generates data check task and type that server is sent;
Task executing units, are configured to according to the type, request corresponding with the type are sent to storage device, to hold The row data check task.
20. device according to claim 19, wherein the type of data check task includes the first kind, data check Task includes the mark of data fragmentation;And
The task executing units are further configured to:
It is the first kind in response to the determination type, Xiang Suoshu storage device sends the first request, wherein first request Data fragmentation for requesting to identify instruction in the reading data check task.
21. device according to claim 19, wherein the type of data check task includes Second Type, data check Task includes the mark of data fragmentation;And
The task executing units are further configured to:
It is Second Type in response to the determination type, Xiang Suoshu storage device sends the second request, wherein second request The state of the data fragmentation of instruction is identified in the data check task for requesting the storage device to determine.
22. the described in any item devices of 9-21 according to claim 1, wherein described device further include:
As a result generation unit is configured in response to determine the completion of the data check task, generates data check result;
As a result transmission unit is configured to for the data check result being sent to the task and generates server.
23. the described in any item devices of 9-21 according to claim 1, wherein described device further include:
Second request transmitting unit is configured in response to receive the refusal verification message that the storage device is sent, interval Preset duration sends request corresponding with the type to the storage device, wherein the refusal verification message is described deposits What storage device was sent in the case where determining that current data access meets preset condition.
24. it is a kind of for handling the device of request, it is set to storage device, described device includes:
Second request reception unit is configured to receive request and determines the sender of the request;
Priority determining unit is configured to determine the priority of the request according to described sender;
Requesting processing is configured to handle the request according to the priority.
25. device according to claim 24, wherein the priority determining unit is further configured to:
In response to determining that sender is task execution server, the priority that the request is arranged is preset value.
26. device according to claim 25, wherein the requesting processing is further configured to:
Priority in response to the determination request is preset value, determines whether current data access meets preset condition;
In response to determining that current data access meets preset condition, Xiang Suoshu task execution server sends refusal verification message.
27. device according to claim 26, wherein the request includes the first request, and the request includes data point The mark of piece;And
The requesting processing is further configured to:
In response to determining that current data access is unsatisfactory for preset condition and the request as the first request, establish and the task The access of execute server connects, so that the task execution server reads the data fragmentation of the mark instruction.
28. device according to claim 26, wherein the request includes the second request, and the request includes data point The mark of piece;And
The requesting processing is further configured to:
In response to determining that current data access is unsatisfactory for preset condition and the request as the second request, Xiang Suoshu task execution Server sends the status information of the data fragmentation of the mark instruction.
29. a kind of server, comprising:
One or more processors;
Storage device is stored thereon with one or more programs,
When one or more of programs are executed by one or more of processors, so that one or more of processors are real The now method as described in any in claim 1-4.
30. a kind of server, comprising:
One or more processors;
Storage device is stored thereon with one or more programs,
When one or more of programs are executed by one or more of processors, so that one or more of processors are real The now method as described in any in claim 5-9.
31. a kind of storage device, comprising:
One or more processors;
Storage device is stored thereon with one or more programs,
When one or more of programs are executed by one or more of processors, so that one or more of processors are real The now method as described in any in claim 10-14.
32. a kind of computer-readable medium, is stored thereon with computer program, wherein the realization when program is executed by processor Method as described in any in claim 1-4.
33. a kind of computer-readable medium, is stored thereon with computer program, wherein the realization when program is executed by processor Method as described in any in claim 5-9.
34. a kind of computer-readable medium, is stored thereon with computer program, wherein the realization when program is executed by processor Method as described in any in claim 10-14.
CN201910098633.3A 2019-01-31 2019-01-31 Method and device for checking data and processing request Active CN109871294B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910098633.3A CN109871294B (en) 2019-01-31 2019-01-31 Method and device for checking data and processing request

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910098633.3A CN109871294B (en) 2019-01-31 2019-01-31 Method and device for checking data and processing request

Publications (2)

Publication Number Publication Date
CN109871294A true CN109871294A (en) 2019-06-11
CN109871294B CN109871294B (en) 2023-08-01

Family

ID=66918396

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910098633.3A Active CN109871294B (en) 2019-01-31 2019-01-31 Method and device for checking data and processing request

Country Status (1)

Country Link
CN (1) CN109871294B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111061357A (en) * 2019-12-13 2020-04-24 北京奇艺世纪科技有限公司 Energy saving method and device, electronic equipment and storage medium
CN112269706A (en) * 2020-11-16 2021-01-26 北京百度网讯科技有限公司 Interface parameter checking method and device, electronic equipment and computer readable medium

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102143040A (en) * 2010-06-30 2011-08-03 华为技术有限公司 Traffic control method and device
CN102546755A (en) * 2011-12-12 2012-07-04 华中科技大学 Data storage method of cloud storage system
US20160119372A1 (en) * 2014-10-23 2016-04-28 International Business Machines Corporation Interacting with a remote server over a network to determine whether to allow data exchange with a resource at the remote server
US20160203061A1 (en) * 2015-01-09 2016-07-14 Ariba, Inc. Delta replication of index fragments to enhance disaster recovery
CN105813032A (en) * 2016-03-11 2016-07-27 中国联合网络通信集团有限公司 Information sending method and server
CN108897806A (en) * 2018-06-15 2018-11-27 东软集团股份有限公司 Comparison of data consistency method, apparatus, storage medium and electronic equipment
CN109032824A (en) * 2018-05-31 2018-12-18 康键信息技术(深圳)有限公司 Database method of calibration, device, computer equipment and storage medium

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102143040A (en) * 2010-06-30 2011-08-03 华为技术有限公司 Traffic control method and device
CN102546755A (en) * 2011-12-12 2012-07-04 华中科技大学 Data storage method of cloud storage system
US20160119372A1 (en) * 2014-10-23 2016-04-28 International Business Machines Corporation Interacting with a remote server over a network to determine whether to allow data exchange with a resource at the remote server
US20160203061A1 (en) * 2015-01-09 2016-07-14 Ariba, Inc. Delta replication of index fragments to enhance disaster recovery
CN105813032A (en) * 2016-03-11 2016-07-27 中国联合网络通信集团有限公司 Information sending method and server
CN109032824A (en) * 2018-05-31 2018-12-18 康键信息技术(深圳)有限公司 Database method of calibration, device, computer equipment and storage medium
CN108897806A (en) * 2018-06-15 2018-11-27 东软集团股份有限公司 Comparison of data consistency method, apparatus, storage medium and electronic equipment

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111061357A (en) * 2019-12-13 2020-04-24 北京奇艺世纪科技有限公司 Energy saving method and device, electronic equipment and storage medium
CN111061357B (en) * 2019-12-13 2021-09-03 北京奇艺世纪科技有限公司 Energy saving method and device, electronic equipment and storage medium
CN112269706A (en) * 2020-11-16 2021-01-26 北京百度网讯科技有限公司 Interface parameter checking method and device, electronic equipment and computer readable medium
CN112269706B (en) * 2020-11-16 2024-04-05 北京百度网讯科技有限公司 Interface parameter verification method, device, electronic equipment and computer readable medium

Also Published As

Publication number Publication date
CN109871294B (en) 2023-08-01

Similar Documents

Publication Publication Date Title
CN109446071A (en) Interface test method, interface test device, electronic equipment and storage medium
CN108985208A (en) The method and apparatus for generating image detection model
CN113268336B (en) Service acquisition method, device, equipment and readable medium
CN109408250A (en) Call application programming interface API approach, device, electronic equipment
CN109992732A (en) Information sharing method, device, electronic equipment and storage medium
CN115660589B (en) Business auditing method, device, equipment and computer readable medium
CN109614340A (en) Exploitation adjustment method, device, electronic equipment and the storage medium of application program
CN110377440A (en) Information processing method and device
CN105915529A (en) Message generation method and device
CN109918146A (en) Page generation method and device
CN109871294A (en) Method and apparatus for verifying data, processing request
CN109656799A (en) Test method and device
CN109819042A (en) For providing the method and apparatus of Software Development Kit
CN109240928A (en) A kind of test method, device, equipment and storage medium
CN109088793A (en) Method and apparatus for detecting network failure
CN108959102A (en) Method and apparatus for generating test data, test application to be tested
CN107403112A (en) Data verification method and its equipment
CN115022328B (en) Server cluster, testing method and device of server cluster and electronic equipment
CN110489326A (en) HTTPAPI adjustment method device, medium and equipment based on IDS
CN109947659A (en) System, method and apparatus for test application
CN116662193A (en) Page testing method and device
CN109840072A (en) Information processing method and device
CN109698774A (en) Method and device for monitoring device working condition
CN109840109A (en) Method and apparatus for generating Software Development Kit
CN109145591A (en) The plug-in loading method of application program

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