CN109241066A - Request processing method and device - Google Patents

Request processing method and device Download PDF

Info

Publication number
CN109241066A
CN109241066A CN201710537730.9A CN201710537730A CN109241066A CN 109241066 A CN109241066 A CN 109241066A CN 201710537730 A CN201710537730 A CN 201710537730A CN 109241066 A CN109241066 A CN 109241066A
Authority
CN
China
Prior art keywords
data
request
equipment
storage device
data storage
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
CN201710537730.9A
Other languages
Chinese (zh)
Other versions
CN109241066B (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 Gridsum Technology Co Ltd
Original Assignee
Beijing Gridsum 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 Gridsum Technology Co Ltd filed Critical Beijing Gridsum Technology Co Ltd
Priority to CN201710537730.9A priority Critical patent/CN109241066B/en
Publication of CN109241066A publication Critical patent/CN109241066A/en
Application granted granted Critical
Publication of CN109241066B publication Critical patent/CN109241066B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/48Program initiating; Program switching, e.g. by interrupt
    • G06F9/4806Task transfer initiation or dispatching
    • G06F9/4843Task transfer initiation or dispatching by program, e.g. task dispatcher, supervisor, operating system
    • G06F9/4881Scheduling strategies for dispatcher, e.g. round robin, multi-level priority queues
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2209/00Indexing scheme relating to G06F9/00
    • G06F2209/48Indexing scheme relating to G06F9/48
    • G06F2209/483Multiproc

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention discloses a kind of request processing method and devices, can return to the first equipment in notifying processed successful first response of the first equipment first request, then handle again the first request after obtaining the first request that the first equipment is sent.After technical solution of the present invention, the response ready to receive being successfully processed to request in the short time of the equipment of request after the request is sent is sent, no longer needs to be waited, therefore The present invention reduces the waiting time for the equipment for sending request.

Description

Request processing method and device
Technical field
The present invention relates to technical field of information processing more particularly to a kind of request processing methods and device.
Background technique
With the development of science and technology, Internet technology has obtained extensive and deep application.
In many fields, certain equipment often needs to handle a large amount of requests of other equipment transmission and after request is successfully processed " being successfully processed " response is returned to the equipment for sending request.But for some reason, certain equipment Chang Wufa is in a short time Certain requests are successfully processed, this results in returning to " being successfully processed " response to the equipment for sending request in time.Such case Under, sending the equipment for not receiving " being successfully processed " response after requesting but will be waited for for a long time.
How to reduce the waiting time for the equipment for sending request is still one technology urgently to be resolved of those skilled in the art Problem.
Summary of the invention
In view of the above problems, it proposes on the present invention overcomes the above problem or at least be partially solved in order to provide one kind A kind of request processing method and device, the scheme for stating problem are as follows:
A kind of request processing method, comprising:
Obtain the first request of the first equipment transmission;
The first response is returned to first equipment, first response is for notifying described in first equipment first to ask Ask processed success;
First request is handled.
Optionally, after the first request that the first equipment of the acquisition is sent, first request is carried out described Before processing, the method also includes:
First request is put into request queue.
It is optionally, described that first request is handled, comprising:
A thread is selected to handle first request from multithreading.
Optionally, the method is applied in the second equipment, second equipment and first equipment communication connection, institute The second equipment and the communication connection of at least one data storage device are stated, carries the data storage device in first request The first device identification and for data update the first data;
It is described that first request is handled, comprising:
Obtain the versions of data of data storage device corresponding with first device identification and the data of storage;
The data that first data and the data storage device of acquisition store are compared, comparing result is obtained;
The versions of data for obtaining data storage device corresponding with first device identification under current time, determines this Whether the versions of data of acquisition is consistent with the versions of data that the last time obtains, if it is, will be described according to the comparing result First data are updated into data storage device corresponding with first device identification, and are and first device identification pair New versions of data is arranged in the data storage device answered;
Otherwise, return execute the versions of data for obtaining corresponding with first device identification data storage device and The step of data of storage.
Optionally, described to be updated first data to corresponding with first device identification according to the comparing result Data storage device in, comprising:
When the comparing result is the first result, first data are updated to corresponding with first device identification Data storage device in, and added for the first data in the data storage device corresponding with first device identification First identifier.
A kind of request processing unit, comprising: request obtaining unit, response return unit and requesting processing,
The request obtaining unit, for obtaining the first request of the first equipment transmission;
The response return unit, for returning to the first response to first equipment, first response is for notifying The first processed success of request described in first equipment;
The requesting processing, for handling first request.
Optionally, described device further include:
It requests into column unit, for after the first request that the request obtaining unit obtains that the first equipment is sent, Before the requesting processing handles first request, first request is put into request queue.
Optionally, the requesting processing is specifically used for:
A thread is selected to handle first request from multithreading.
Optionally, described device is applied in the second equipment, second equipment and first equipment communication connection, institute The second equipment and the communication connection of at least one data storage device are stated, carries the data storage device in first request The first device identification and for data update the first data;
The requesting processing, comprising: data acquiring unit, data comparison unit, version obtaining unit, edition comparison Unit and data updating unit,
The data acquiring unit, for obtaining the data version of data storage device corresponding with first device identification The data of this and storage;
The data comparison unit, for carrying out the data of the data storage device storage of first data and acquisition Comparison obtains comparing result;
The version obtaining unit is set for obtaining data storage corresponding with first device identification under current time Standby versions of data;
The edition comparison unit, the versions of data whether obtained with the last time for determining the versions of data that this is obtained Unanimously, if it is, triggering the data updating unit;Otherwise, the data acquiring unit is triggered;
The data updating unit is set for being updated first data to described first according to the comparing result It is standby to identify in corresponding data storage device, and new number is set for data storage device corresponding with first device identification According to version.
Optionally, the data updating unit, is specifically used for: when the comparing result is the first result, by described the One data are updated into data storage device corresponding with first device identification, and are described and first device identification The first data in corresponding data storage device add first identifier, store for data corresponding with first device identification New versions of data is arranged in equipment.
By above-mentioned technical proposal, a kind of request processing method and device provided by the invention can be set in acquisition first After the first request that preparation is sent, return to the first equipment in notifying the first equipment processed successful first sound of the first request It answers, then the first request is handled again.After technical solution of the present invention, the equipment of request is sent after the request is sent Short time in it is ready to receive to the response that has been successfully processed of request, no longer need to be waited, therefore The present invention reduces transmissions The waiting time of the equipment of request.
The above description is only an overview of the technical scheme of the present invention, in order to better understand the technical means of the present invention, And it can be implemented in accordance with the contents of the specification, and in order to allow above and other objects of the present invention, feature and advantage can It is clearer and more comprehensible, the followings are specific embodiments of the present invention.
Detailed description of the invention
By reading the following detailed description of the preferred embodiment, various other advantages and benefits are common for this field Technical staff will become clear.The drawings are only for the purpose of illustrating a preferred embodiment, and is not considered as to the present invention Limitation.And throughout the drawings, the same reference numbers will be used to refer to the same parts.In the accompanying drawings:
Fig. 1 shows a kind of flow diagram of request processing method provided in an embodiment of the present invention;
Fig. 2 shows the flow diagrams of another request processing method provided in an embodiment of the present invention;
Fig. 3 shows the flow diagram of another request processing method provided in an embodiment of the present invention;
Fig. 4 shows equipment communication scheme provided in an embodiment of the present invention;
Fig. 5 shows a kind of structural schematic diagram for requesting processing unit provided in an embodiment of the present invention.
Specific embodiment
Exemplary embodiments of the present disclosure are described in more detail below with reference to accompanying drawings.Although showing the disclosure in attached drawing Exemplary embodiment, it being understood, however, that may be realized in various forms the disclosure without should be by embodiments set forth here It is limited.On the contrary, these embodiments are provided to facilitate a more thoroughly understanding of the present invention, and can be by the scope of the present disclosure It is fully disclosed to those skilled in the art.
As shown in Figure 1, a kind of request processing method provided in an embodiment of the present invention, may include:
S100, the first request that the first equipment is sent is obtained;
Wherein, it is described first request type can there are many, more such as data acquisition request, data upload requests, data New request etc..
Wherein, the first equipment can be terminal device, such as computer, mobile phone, tablet computer.
S200, the first response is returned to first equipment, first response is for notifying described in first equipment The first processed success of request;
Wherein, step S200 can be set to described first after step S100 obtains the first request that the first equipment is sent It is standby to return to the first response, to inform that first request of the first equipment has been successfully processed in time, reduce the waiting time of the first equipment.
S300, first request is handled.
Wherein, the process that step S300 handles the first request can use side same as the prior art or different Formula.The process handled the first request step S300 is used side unlike the prior art by subsequent embodiment of the present invention Formula is described in detail.Optionally, step S300 of the present invention can be specifically included: select a thread to described from multithreading First request is handled.
It, can be with when obtaining multiple requests by the present invention in that improve request Concurrency processing capacity with multithreading Thread is selected to handle respectively each request in multithreading.
A kind of request processing method provided in an embodiment of the present invention, can be in the first request for obtaining the transmission of the first equipment Afterwards, it returns to the first equipment for notifying processed successful first response of the first equipment first request, then again to first Request is handled.After technical solution of the present invention, send in the short time of the equipment of request after the request is sent Receive the response that has been successfully processed of request, no longer need to be waited, thus The present invention reduces the equipment for sending request etc. To the time.
As shown in Fig. 2, another kind request processing method provided in an embodiment of the present invention, may include:
S100, the first request that the first equipment is sent is obtained;
S110, first request is put into request queue.
Wherein, which can be First Input First Output.
Wherein, step S110 can be executed between step S100 and step S300, it may be assumed that step S110 step S100 it It executes afterwards and step S110 is executed before step S300.The execution sequence present invention of step S110 and step S200 does not limit It is fixed.Step S110 can be executed before step S200, i.e., again to first after requesting successfully to be put into request queue by first Equipment returns to the first response, if step S110 does not request successfully to be put into request queue by first, the present invention can be again It executes step S110 or returns to the second response to first equipment, second response is for notifying first equipment again Send the first request.
Optionally, the present invention repeatedly does not request successfully to be put into request queue by first yet after (such as 3 times) execute step S110 When middle, the second response can be returned to first equipment again.
Certainly, step S110 can also be executed after step S200, it may be assumed that after obtaining the first request, i.e., to the first equipment The first response is returned, is put into request queue after the response of return first, then by first request.This scheme make user without It needs to wait for the first request and is successfully put into request queue, further reduce the waiting time of user.
S200, the first response is returned to first equipment, first response is for notifying described in first equipment The first processed success of request;
S310, a thread is selected to request to handle to first in the request queue from multithreading.
The present invention can be used multithreading and handle each request in request queue, can be with by the multithreading present invention Effectively improve request processing speed.
Wherein, embodiment shown in Fig. 1 is illustrated step S100 and step S200, is repeated no more.Step S310 is The optional specific executive mode of one kind of step S300.
In an alternative embodiment of the invention, as shown in figure 4, method shown in Fig. 1 can be applied in the second equipment 002, institute State the second equipment 002 and first equipment 001 communication connection, second equipment 002 and at least one data storage device 003 communicates to connect, and carries the first device identification of the data storage device in first request and updates for data The first data.As shown in figure 3, the step S300 in embodiment illustrated in fig. 1 may include:
The number of S301, the versions of data for obtaining data storage device 003 corresponding with first device identification and storage According to;
Wherein, the second equipment 002 can be request processing equipment, such as server.Each data storage device 003 can be with For a memory node, each memory node collectively forms a distributed memory system.
Optionally, the first data can be script, can store multiple examiners to one in each memory node The answer of examination question, such as: answer of multiple examiners to the first examination question is stored in the first memory node;It is deposited in second memory node Store up answer of multiple examiners to the second examination question;Answer of multiple examiners to third examination question is stored in third memory node, with This analogizes.
Wherein, the first equipment 001 is after getting the answer that examiner makes certain examination question, so that it may the determining and examination question Then the device identification of corresponding data storage device 003 generates first according to the answer of the determining device identification and acquisition Request Concurrency is sent in the second equipment 002.
S302, the data that the data storage device 003 of first data and acquisition stores are compared, is compared As a result;
Optionally, above-mentioned examination question can be the examination question without model answer, in this way, step S302 is available when comparing Answer in first request whether be most answer in answer that data storage device 003 stores comparing result.It is comparing When being as a result answer most in the answer of the storage of data storage device 003 for the answer in the first request, first can be determined Answer in request is effective answer;Otherwise, it determines the answer in the first request is invalid answer.
S303, the versions of data for obtaining data storage device 003 corresponding with first device identification under current time;
S304, determine whether the versions of data that this is obtained is consistent with the versions of data that the last time obtains, if it is, holding Row step S305;Otherwise, S301 is returned to step.
S305, first data are updated according to the comparing result and arrive data corresponding with first device identification It stores in equipment 003, and new versions of data is set for data storage device 003 corresponding with first device identification.
Wherein, data storage device 003 is every carries out a data update, and the present invention can be that a new number is arranged in it According to version, it is identified with the data to current version.
Wherein, step S305 can be specifically included:
When the comparing result is the first result, first data are updated to corresponding with first device identification Data storage device 003 in and it is several for first in the data storage device 003 corresponding with first device identification According to addition first identifier.
Wherein, the first result can be most in the answer of the storage of data storage device 003 for the answer in the first request Answer.First identifier can identify for effective answer.
Since the data of different editions would potentially result in the difference that data update result, the present invention is it needs to be determined that carry out Whether the version of data when update and the version for comparing the preceding data obtained to data are consistent, when consistent, the present invention Data update can just be carried out.Such as: answer and different data version when carrying out the comparison of script, in the first request The comparing result of script may be different.And the present invention needs to carry out before carrying out data update answer comparison first, Therefore the versions of data and the number of script when being updated for carrying out the script used when answer comparison are necessary to ensure that It is consistent according to version, it just can be carried out data update.This guarantees the accuracy for the comparing result of script that the present invention obtains, Avoid the erroneous judgement to answer in the first request.
As shown in figure 5, a kind of request processing unit provided in an embodiment of the present invention, may include: request obtaining unit 100, return unit 200 and requesting processing 300 are responded,
The request obtaining unit 100, for obtaining the first request of the first equipment transmission;
Wherein, it is described first request type can there are many, more such as data acquisition request, data upload requests, data New request etc..
Wherein, the first equipment can be terminal device, such as computer, mobile phone, tablet computer.
The response return unit 200, for returning to the first response to first equipment, first response is for leading to Know the first processed success of request described in first equipment;
The requesting processing 300, for handling first request.
Wherein, the requesting processing can be specifically used for:
A thread is selected to handle first request from multithreading.
It, can be with when obtaining multiple requests by the present invention in that improve request Concurrency processing capacity with multithreading Thread is selected to handle respectively each request in multithreading.
A kind of request processing unit provided in an embodiment of the present invention, can be in the first request for obtaining the transmission of the first equipment Afterwards, it returns to the first equipment for notifying processed successful first response of the first equipment first request, then again to first Request is handled.After technical solution of the present invention, send in the short time of the equipment of request after the request is sent Receive the response that has been successfully processed of request, no longer need to be waited, thus The present invention reduces the equipment for sending request etc. To the time.
Optionally, Fig. 5 shown device can also include:
It requests into column unit, for after the first request that the request obtaining unit 100 obtains that the first equipment is sent, Before the requesting processing 300 handles first request, first request is put into request queue.
Wherein, which can be First Input First Output.
In other embodiments of the present invention, Fig. 5 shown device can be applied in the second equipment 002 shown in Fig. 4, such as scheme Shown in 4, second equipment 002 and first equipment 001 communication connection, second equipment 002 and at least one data It stores equipment 003 to communicate to connect, the first device identification and use of the data storage device 003 is carried in first request In the first data that data update;
The requesting processing 300, may include: data acquiring unit, data comparison unit, version obtaining unit, Edition comparison unit and data updating unit,
The data acquiring unit, for obtaining the number of data storage device 003 corresponding with first device identification According to version and the data of storage;
Wherein, the second equipment 002 can be request processing equipment, such as server.Each data storage device 003 can be with For a memory node, each memory node collectively forms a distributed memory system.
Optionally, the first data can be script, can store multiple examiners to one in each memory node The answer of examination question, such as: answer of multiple examiners to the first examination question is stored in the first memory node;It is deposited in second memory node Store up answer of multiple examiners to the second examination question;Answer of multiple examiners to third examination question is stored in third memory node, with This analogizes.
Wherein, the first equipment 001 is after getting the answer that examiner makes certain examination question, so that it may the determining and examination question Then the device identification of corresponding data storage device 003 generates first according to the answer of the determining device identification and acquisition Request Concurrency is sent in the second equipment 002.
The data comparison unit, the data for storing the data storage device 003 of first data and acquisition It compares, obtains comparing result;
Optionally, above-mentioned examination question can be the examination question without model answer, in this way, data comparison unit can be with when comparing Obtain the answer in the first request whether be most answer in answer that data storage device 003 stores comparing result.? Comparing result is answer in the first request when being answer most in answer that data storage device 003 stores, can determine Answer in first request is effective answer;Otherwise, it determines the answer in the first request is invalid answer.
The version obtaining unit is set for obtaining data storage corresponding with first device identification under current time Standby 003 versions of data;
The edition comparison unit, the versions of data whether obtained with the last time for determining the versions of data that this is obtained Unanimously, if it is, triggering the data updating unit;Otherwise, the data acquiring unit is triggered;
The data updating unit is set for being updated first data to described first according to the comparing result It is standby to identify in corresponding data storage device 003, and be arranged for data storage device 003 corresponding with first device identification New versions of data.
Wherein, data storage device 003 is every carries out a data update, and the present invention can be that a new number is arranged in it According to version, it is identified with the data to current version.
Optionally, the data updating unit can be specifically used for: when the comparing result is the first result, by institute It states the first data to update into data storage device 003 corresponding with first device identification, and to be described with described first The first data in the corresponding data storage device 003 of device identification add first identifier, are and first device identification pair New versions of data is arranged in the data storage device 003 answered.
Wherein, the first result can be most in the answer of the storage of data storage device 003 for the answer in the first request Answer.First identifier can identify for effective answer.
Since the data of different editions would potentially result in the difference that data update result, the present invention is it needs to be determined that carry out Whether the version of data when update and the version for comparing the preceding data obtained to data are consistent, when consistent, the present invention Data update can just be carried out.Such as: answer and different data version when carrying out the comparison of script, in the first request The comparing result of script may be different.And the present invention needs to carry out before carrying out data update answer comparison first, Therefore the versions of data and the number of script when being updated for carrying out the script used when answer comparison are necessary to ensure that It is consistent according to version, it just can be carried out data update.This guarantees the accuracy for the comparing result of script that the present invention obtains, Avoid the erroneous judgement to answer in the first request.
The request processing unit includes processor and memory, above-mentioned request obtaining unit, response return unit, request Processing unit and request into column unit etc. as program unit storage in memory, by processor execution be stored in memory In above procedure unit realize corresponding function.
Include kernel in processor, is gone in memory to transfer corresponding program unit by kernel.Kernel can be set one Or more, request handled by adjusting kernel parameter.
Memory may include the non-volatile memory in computer-readable medium, random access memory (RAM) and/ Or the forms such as Nonvolatile memory, if read-only memory (ROM) or flash memory (flash RAM), memory include that at least one is deposited Store up chip.
The embodiment of the invention provides a kind of storage mediums, are stored thereon with program, real when which is executed by processor The existing request processing method.
The embodiment of the invention provides a kind of processor, the processor is for running program, wherein described program operation Request processing method described in Shi Zhihang.
The embodiment of the invention provides a kind of equipment, equipment include processor, memory and storage on a memory and can The program run on a processor, processor perform the steps of when executing program
Obtain the first request of the first equipment transmission;
The first response is returned to first equipment, first response is for notifying described in first equipment first to ask Ask processed success;
First request is handled.
Optionally, after the first request that the first equipment of the acquisition is sent, first request is carried out described Before processing, the method also includes:
First request is put into request queue.
It is optionally, described that first request is handled, comprising:
A thread is selected to handle first request from multithreading.
Optionally, the method is applied in the second equipment, second equipment and first equipment communication connection, institute The second equipment and the communication connection of at least one data storage device are stated, carries the data storage device in first request The first device identification and for data update the first data;
It is described that first request is handled, comprising:
Obtain the versions of data of data storage device corresponding with first device identification and the data of storage;
The data that first data and the data storage device of acquisition store are compared, comparing result is obtained;
The versions of data for obtaining data storage device corresponding with first device identification under current time, determines this Whether the versions of data of acquisition is consistent with the versions of data that the last time obtains, if it is, will be described according to the comparing result First data are updated into data storage device corresponding with first device identification, and are and first device identification pair New versions of data is arranged in the data storage device answered;
Otherwise, return execute the versions of data for obtaining corresponding with first device identification data storage device and The step of data of storage.
Optionally, described to be updated first data to corresponding with first device identification according to the comparing result Data storage device in, comprising:
When the comparing result is the first result, first data are updated to corresponding with first device identification Data storage device in, and added for the first data in the data storage device corresponding with first device identification First identifier.
Equipment herein can be server, PC, PAD, mobile phone etc..
Present invention also provides a kind of computer program products, when executing on data processing equipment, are adapted for carrying out just The program of beginningization there are as below methods step:
Obtain the first request of the first equipment transmission;
The first response is returned to first equipment, first response is for notifying described in first equipment first to ask Ask processed success;
First request is handled.
Optionally, after the first request that the first equipment of the acquisition is sent, first request is carried out described Before processing, the method also includes:
First request is put into request queue.
It is optionally, described that first request is handled, comprising:
A thread is selected to handle first request from multithreading.
Optionally, the method is applied in the second equipment, second equipment and first equipment communication connection, institute The second equipment and the communication connection of at least one data storage device are stated, carries the data storage device in first request The first device identification and for data update the first data;
It is described that first request is handled, comprising:
Obtain the versions of data of data storage device corresponding with first device identification and the data of storage;
The data that first data and the data storage device of acquisition store are compared, comparing result is obtained;
The versions of data for obtaining data storage device corresponding with first device identification under current time, determines this Whether the versions of data of acquisition is consistent with the versions of data that the last time obtains, if it is, will be described according to the comparing result First data are updated into data storage device corresponding with first device identification, and are and first device identification pair New versions of data is arranged in the data storage device answered;
Otherwise, return execute the versions of data for obtaining corresponding with first device identification data storage device and The step of data of storage.
Optionally, described to be updated first data to corresponding with first device identification according to the comparing result Data storage device in, comprising:
When the comparing result is the first result, first data are updated to corresponding with first device identification Data storage device in, and added for the first data in the data storage device corresponding with first device identification First identifier.
It should be understood by those skilled in the art that, embodiments herein can provide as method, system or computer program Product.Therefore, complete hardware embodiment, complete software embodiment or reality combining software and hardware aspects can be used in the application Apply the form of example.Moreover, it wherein includes the computer of computer usable program code that the application, which can be used in one or more, The computer program implemented in usable storage medium (including but not limited to magnetic disk storage, CD-ROM, optical memory etc.) produces The form of product.
The application is referring to method, the process of equipment (system) and computer program product according to the embodiment of the present application Figure and/or block diagram describe.It should be understood that every one stream in flowchart and/or the block diagram can be realized by computer program instructions The combination of process and/or box in journey and/or box and flowchart and/or the block diagram.It can provide these computer programs Instruct the processor of general purpose computer, special purpose computer, Embedded Processor or other programmable data processing devices to produce A raw machine, so that being generated by the instruction that computer or the processor of other programmable data processing devices execute for real The device for the function of being specified in present one or more flows of the flowchart and/or one or more blocks of the block diagram.
These computer program instructions, which may also be stored in, is able to guide computer or other programmable data processing devices with spy Determine in the computer-readable memory that mode works, so that it includes referring to that instruction stored in the computer readable memory, which generates, Enable the manufacture of device, the command device realize in one box of one or more flows of the flowchart and/or block diagram or The function of being specified in multiple boxes.
These computer program instructions also can be loaded onto a computer or other programmable data processing device, so that counting Series of operation steps are executed on calculation machine or other programmable devices to generate computer implemented processing, thus in computer or The instruction executed on other programmable devices is provided for realizing in one or more flows of the flowchart and/or block diagram one The step of function of being specified in a box or multiple boxes.
In a typical configuration, calculating equipment includes one or more processors (CPU), input/output interface, net Network interface and memory.
Memory may include the non-volatile memory in computer-readable medium, random access memory (RAM) and/ Or the forms such as Nonvolatile memory, such as read-only memory (ROM) or flash memory (flash RAM).Memory is computer-readable Jie The example of matter.
Computer-readable medium includes permanent and non-permanent, removable and non-removable media can be by any method Or technology come realize information store.Information can be computer readable instructions, data structure, the module of program or other data. The example of the storage medium of computer includes, but are not limited to phase change memory (PRAM), static random access memory (SRAM), moves State random access memory (DRAM), other kinds of random access memory (RAM), read-only memory (ROM), electric erasable Programmable read only memory (EEPROM), flash memory or other memory techniques, read-only disc read only memory (CD-ROM) (CD-ROM), Digital versatile disc (DVD) or other optical storage, magnetic cassettes, tape magnetic disk storage or other magnetic storage devices Or any other non-transmission medium, can be used for storage can be accessed by a computing device information.As defined in this article, it calculates Machine readable medium does not include temporary computer readable media (transitory media), such as the data-signal and carrier wave of modulation.
It should also be noted that, the terms "include", "comprise" or its any other variant are intended to nonexcludability It include so that the process, method, commodity or the equipment that include a series of elements not only include those elements, but also to wrap Include other elements that are not explicitly listed, or further include for this process, method, commodity or equipment intrinsic want Element.In the absence of more restrictions, the element limited by sentence "including a ...", it is not excluded that including element There is also other identical elements in process, method, commodity or equipment.
It will be understood by those skilled in the art that embodiments herein can provide as method, system or computer program product. Therefore, complete hardware embodiment, complete software embodiment or embodiment combining software and hardware aspects can be used in the application Form.It is deposited moreover, the application can be used to can be used in the computer that one or more wherein includes computer usable program code The shape for the computer program product implemented on storage media (including but not limited to magnetic disk storage, CD-ROM, optical memory etc.) Formula.
The above is only embodiments herein, are not intended to limit this application.To those skilled in the art, Various changes and changes are possible in this application.It is all within the spirit and principles of the present application made by any modification, equivalent replacement, Improve etc., it should be included within the scope of the claims of this application.

Claims (10)

1. a kind of request processing method characterized by comprising
Obtain the first request of the first equipment transmission;
The first response is returned to first equipment, first response is for notifying that the first request is described in first equipment It handles successfully;
First request is handled.
2. the method according to claim 1, wherein in first request for obtaining the transmission of the first equipment Afterwards, it is described to it is described first request handle before, the method also includes:
First request is put into request queue.
3. method according to claim 1 or 2, which is characterized in that described to handle first request, comprising:
A thread is selected to handle first request from multithreading.
4. method according to claim 1 or 2, which is characterized in that the method is applied in the second equipment, and described second Equipment and first equipment communication connection, second equipment and at least one data storage device communicate to connect, and described the The first data for carrying the first device identification of the data storage device in one request and being updated for data;
It is described that first request is handled, comprising:
Obtain the versions of data of data storage device corresponding with first device identification and the data of storage;
The data that first data and the data storage device of acquisition store are compared, comparing result is obtained;
The versions of data for obtaining data storage device corresponding with first device identification under current time, determines this acquisition Versions of data it is whether consistent with the versions of data that the last time obtains, if it is, according to the comparing result by described first Data are updated into data storage device corresponding with first device identification, and are corresponding with first device identification New versions of data is arranged in data storage device;
Otherwise, it returns and executes the versions of data and storage for obtaining data storage device corresponding with first device identification Data the step of.
5. according to the method described in claim 4, it is characterized in that, it is described according to the comparing result by first data more Newly into data storage device corresponding with first device identification, comprising:
When the comparing result is the first result, first data are updated and arrive number corresponding with first device identification According to the first data addition first in storage equipment, and in the data storage device corresponding with first device identification for described in Mark.
6. a kind of request processing unit characterized by comprising request obtaining unit, response return unit and request processing are single Member,
The request obtaining unit, for obtaining the first request of the first equipment transmission;
The response return unit, for returning to the first response to first equipment, first response is described for notifying The first processed success of request described in first equipment;
The requesting processing, for handling first request.
7. device according to claim 6, which is characterized in that described device further include:
It requests into column unit, for after the first request that the request obtaining unit obtains that the first equipment is sent, described Before requesting processing handles first request, first request is put into request queue.
8. device according to claim 6 or 7, which is characterized in that the requesting processing is specifically used for:
A thread is selected to handle first request from multithreading.
9. device according to claim 6 or 7, which is characterized in that described device is applied in the second equipment, and described second Equipment and first equipment communication connection, second equipment and at least one data storage device communicate to connect, and described the The first data for carrying the first device identification of the data storage device in one request and being updated for data;
The requesting processing, comprising: data acquiring unit, data comparison unit, version obtaining unit, edition comparison unit And data updating unit,
The data acquiring unit, for obtain data storage device corresponding with first device identification versions of data and The data of storage;
The data comparison unit, for carrying out the data of the data storage devices of first data and acquisition storage pair Than obtaining comparing result;
The version obtaining unit, for obtaining data storage device corresponding with first device identification under current time Versions of data;
The edition comparison unit, the versions of data one whether obtained with the last time for determining the versions of data that this is obtained It causes, if it is, triggering the data updating unit;Otherwise, the data acquiring unit is triggered;
The data updating unit arrives and the first equipment mark for being updated first data according to the comparing result Know in corresponding data storage device, and new data version is set for data storage device corresponding with first device identification This.
10. device according to claim 9, which is characterized in that the data updating unit is specifically used for: described right When than result being the first result, first data are updated to data storage device corresponding with first device identification In, and add first identifier for the first data in the data storage device corresponding with first device identification, be with New versions of data is arranged in the corresponding data storage device of first device identification.
CN201710537730.9A 2017-07-04 2017-07-04 Request processing method and device Active CN109241066B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710537730.9A CN109241066B (en) 2017-07-04 2017-07-04 Request processing method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710537730.9A CN109241066B (en) 2017-07-04 2017-07-04 Request processing method and device

Publications (2)

Publication Number Publication Date
CN109241066A true CN109241066A (en) 2019-01-18
CN109241066B CN109241066B (en) 2022-09-27

Family

ID=65083316

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710537730.9A Active CN109241066B (en) 2017-07-04 2017-07-04 Request processing method and device

Country Status (1)

Country Link
CN (1) CN109241066B (en)

Citations (17)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007329617A (en) * 2006-06-07 2007-12-20 Nippon Telegr & Teleph Corp <Ntt> Communication control process executing method and system, and program therefor
CN101789009A (en) * 2010-01-26 2010-07-28 恒生电子股份有限公司 Method for processing business data, device and system
CN102646072A (en) * 2012-02-28 2012-08-22 信雅达系统工程股份有限公司 Data management method
CN103237060A (en) * 2013-04-08 2013-08-07 北京小米科技有限责任公司 Method, device and system for data object acquisition
CN103617009A (en) * 2013-12-10 2014-03-05 北京奇虎科技有限公司 Method and device for writing data to disk through cache during starting up
CN104331306A (en) * 2014-10-14 2015-02-04 北京齐尔布莱特科技有限公司 Content updating method, equipment and system
CN104572845A (en) * 2014-12-12 2015-04-29 百度在线网络技术(北京)有限公司 File distribution method and device, equipment and system
CN104717260A (en) * 2013-12-16 2015-06-17 中国移动通信集团公司 Development resource updating and management method, device, system and related equipment
CN104813685A (en) * 2012-09-22 2015-07-29 谷歌公司 Subscription-notification mechanisms for synchronization of distributed states
CN104866290A (en) * 2014-02-24 2015-08-26 国际商业机器公司 Method and device for data transmission
CN105095489A (en) * 2015-08-18 2015-11-25 浪潮(北京)电子信息产业有限公司 Distributed file deletion method, device and system
US20150363271A1 (en) * 2014-06-16 2015-12-17 International Business Machines Corporation Restoring data in a hierarchical storage management system
CN105612502A (en) * 2013-11-06 2016-05-25 英特尔公司 Virtual retry queue
CN105812483A (en) * 2016-04-20 2016-07-27 努比亚技术有限公司 Method and server for updating application and mobile terminal
CN105988949A (en) * 2015-02-15 2016-10-05 阿里巴巴集团控股有限公司 Terminal equipment and data interactive processing method and system
CN106210045A (en) * 2016-07-11 2016-12-07 浪潮(北京)电子信息产业有限公司 A kind of SCST and data processing method thereof
US9563900B1 (en) * 2013-09-27 2017-02-07 Groupon, Inc. Method, apparatus, and computer program product for consumer tracking

Patent Citations (17)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007329617A (en) * 2006-06-07 2007-12-20 Nippon Telegr & Teleph Corp <Ntt> Communication control process executing method and system, and program therefor
CN101789009A (en) * 2010-01-26 2010-07-28 恒生电子股份有限公司 Method for processing business data, device and system
CN102646072A (en) * 2012-02-28 2012-08-22 信雅达系统工程股份有限公司 Data management method
CN104813685A (en) * 2012-09-22 2015-07-29 谷歌公司 Subscription-notification mechanisms for synchronization of distributed states
CN103237060A (en) * 2013-04-08 2013-08-07 北京小米科技有限责任公司 Method, device and system for data object acquisition
US9563900B1 (en) * 2013-09-27 2017-02-07 Groupon, Inc. Method, apparatus, and computer program product for consumer tracking
CN105612502A (en) * 2013-11-06 2016-05-25 英特尔公司 Virtual retry queue
CN103617009A (en) * 2013-12-10 2014-03-05 北京奇虎科技有限公司 Method and device for writing data to disk through cache during starting up
CN104717260A (en) * 2013-12-16 2015-06-17 中国移动通信集团公司 Development resource updating and management method, device, system and related equipment
CN104866290A (en) * 2014-02-24 2015-08-26 国际商业机器公司 Method and device for data transmission
US20150363271A1 (en) * 2014-06-16 2015-12-17 International Business Machines Corporation Restoring data in a hierarchical storage management system
CN104331306A (en) * 2014-10-14 2015-02-04 北京齐尔布莱特科技有限公司 Content updating method, equipment and system
CN104572845A (en) * 2014-12-12 2015-04-29 百度在线网络技术(北京)有限公司 File distribution method and device, equipment and system
CN105988949A (en) * 2015-02-15 2016-10-05 阿里巴巴集团控股有限公司 Terminal equipment and data interactive processing method and system
CN105095489A (en) * 2015-08-18 2015-11-25 浪潮(北京)电子信息产业有限公司 Distributed file deletion method, device and system
CN105812483A (en) * 2016-04-20 2016-07-27 努比亚技术有限公司 Method and server for updating application and mobile terminal
CN106210045A (en) * 2016-07-11 2016-12-07 浪潮(北京)电子信息产业有限公司 A kind of SCST and data processing method thereof

Also Published As

Publication number Publication date
CN109241066B (en) 2022-09-27

Similar Documents

Publication Publication Date Title
CN108985742A (en) Transaction processing method, device and block catenary system
CN110474820B (en) Flow playback method and device and electronic equipment
CN109582470A (en) A kind of data processing method and data processing equipment
CN106570097A (en) Sequence generating method and device
JP6975153B2 (en) Data storage service processing method and equipment
CN109145625A (en) Processing method, device and the block chain data-storage system of policy information
CN110727664A (en) Method and device for executing target operation on public cloud data
EP2778962A1 (en) Silo-aware databases
CN110362394B (en) Task processing method and device, storage medium and electronic device
CN109388644A (en) A kind of data-updating method and device
CN110069488A (en) A kind of date storage method, method for reading data and its device
CN110046034A (en) Task acquisition methods and device
CN109684381A (en) Data hot statistics method and device
CN108874375A (en) A kind of implementation method and device of timer
CN104407848B (en) A kind of data processing method and device
CN109614386B (en) Data processing method, device, server and computer readable storage medium
CN109241066A (en) Request processing method and device
CN110928941A (en) Data fragment extraction method and device
CN109558249B (en) Control method and device for concurrent operation
CN109582396A (en) A kind of task status processing method, device, system and storage medium
CN109062713A (en) A kind of calling efficiency method and device improving same command line interface
CN109101514A (en) Data lead-in method and device
CN108306961A (en) A kind of file block method for down loading and device
CN109561126A (en) A kind of method of data synchronization and device, storage medium, processor
CN109299125A (en) Database update method and device

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
CB02 Change of applicant information
CB02 Change of applicant information

Address after: 100080 No. 401, 4th Floor, Haitai Building, 229 North Fourth Ring Road, Haidian District, Beijing

Applicant after: BEIJING GRIDSUM TECHNOLOGY Co.,Ltd.

Address before: 100086 Cuigong Hotel, 76 Zhichun Road, Shuangyushu District, Haidian District, Beijing

Applicant before: BEIJING GRIDSUM TECHNOLOGY Co.,Ltd.

GR01 Patent grant
GR01 Patent grant