CN108965450A - Service request response method, device, computer equipment and storage medium - Google Patents

Service request response method, device, computer equipment and storage medium Download PDF

Info

Publication number
CN108965450A
CN108965450A CN201810848309.4A CN201810848309A CN108965450A CN 108965450 A CN108965450 A CN 108965450A CN 201810848309 A CN201810848309 A CN 201810848309A CN 108965450 A CN108965450 A CN 108965450A
Authority
CN
China
Prior art keywords
data
task
block chain
client
target service
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
CN201810848309.4A
Other languages
Chinese (zh)
Other versions
CN108965450B (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.)
Jiangxi Greedy Play Information Technology Co Ltd
Original Assignee
Jiangxi Greedy Play Information 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 Jiangxi Greedy Play Information Technology Co Ltd filed Critical Jiangxi Greedy Play Information Technology Co Ltd
Priority to CN201810848309.4A priority Critical patent/CN108965450B/en
Publication of CN108965450A publication Critical patent/CN108965450A/en
Application granted granted Critical
Publication of CN108965450B publication Critical patent/CN108965450B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/60Scheduling or organising the servicing of application requests, e.g. requests for application data transmissions using the analysis and optimisation of the required network resources

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer And Data Communications (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The present invention relates to a kind of service request response method, system, computer equipment and storage mediums.The described method includes: obtaining the service request that client is sent, the service identification information of target service data is carried in the service request;The corresponding data return type task of the service request and non-data return type task are determined according to the service identification information;Before handling the non-data return type task, the target service data are obtained according to the data return type task, the target service data are returned into the client.Period of reservation of number can be reduced using this method.

Description

Service request response method, device, computer equipment and storage medium
Technical field
The present invention relates to network technique fields, more particularly to a kind of service request response method, device, computer equipment And storage medium.
Background technique
With the development of the network information technology, the service application by the relevant technologies of network information platform progress is also more next It is more, such as network about vehicle, network rent a house etc..And with the fast development of these application of net, it is interacted with server Client device it is also more and more.In addition, being often mingled with a lot of other attached function in the corresponding function of tonic chord of a service request Can, for example, returning again to logging state after going inquiry database to extract user related information when requesting and logging in;It is pushed away in request When recommending list, model content is associated with user, and association thumbs up non-model itself number such as user, comment user, concern user The number of users of the model, sum etc. of leaving a message are paid close attention to according to perhaps needing dynamic to calculate in table.
In traditional mode, the response to service request is by the way of direct synchronous calculate, and this mode is from client End is sent to the service request of server, and function of tonic chord data could be returned to clothes by generally requiring to expend the more time in server Business end, period of reservation of number are longer.
Summary of the invention
Based on this, it is necessary in view of the above technical problems, provide a kind of service request that can reduce period of reservation of number Response method, device, computer equipment and storage medium.
A kind of service request response method, which comprises
The service request that client is sent is obtained, the service identification letter of target service data is carried in the service request Breath;
Determine that the corresponding data return type task of the service request and non-data return according to the service identification information Type task;
Before handling the non-data return type task, the target service is obtained according to the data return type task The target service data are returned to the client by data.
It is above-mentioned in one of the embodiments, that the target service data are obtained according to the data return type task, The target service data are returned into the client, comprising:
According to the data return type task into the block chain pre-established with the client have most it is short communicate away from From block chain node send data return instruction, the data return instruction, which is used to indicate, receives the data return instruction Block chain node the target service data, and the target service data that will be inquired are inquired in data are locally stored Return to the client.
It is above-mentioned in one of the embodiments, that the target service data are obtained according to the data return type task, The target service data are returned into the client, further includes:
The mesh is not inquired in data are locally stored in the block chain node for being currently received the data return instruction When marking business datum, to described in the transmission of the connected block chain link point for the block chain node for being currently received the data return instruction Data return instruction.
Above-mentioned service request response method in one of the embodiments, further includes:
The quantity that the non-data returns to task is obtained, the block chain of quantity described in the block chain pre-established is distributed to Node carries out parallel processing.
The block chain node for handling the non-data return task in one of the embodiments, divides processing locality result It is dealt into the block chain;Each block chain node in the block chain will handle the block chain of the non-data return task The processing locality result of node is saved after being summarized.
It includes that data calculating task and data save task that the non-data, which returns to task, in one of the embodiments,; The block chain node acquisition data to be saved that data save task are received, target is saved into data distribution into block chain;It connects The block chain node for receiving calculating task treats calculating data progress data and local computing is calculated as a result, by local computing knot Fruit is dealt into block chain.
It is described before handling the non-data return type task in one of the embodiments, it is returned according to the data Hollow task obtains the target service data, the target service data is returned to the client, comprising: by asynchronous Main thread where non-data return type task from the data return type task is moved to task queue by mode of operation, in root Obtain the target service data according to the data return type task, by the target service data return to the client it Afterwards, the non-data return type task in the task queue is handled.
A kind of service request responding device, described device include:
Request receiving module carries target industry in the service request for obtaining the service request of client transmission The service identification information for data of being engaged in;
Assessment of tasks module, for determining the corresponding data return type of the service request according to the service identification information Task and non-data return type task;
Task processing and control module, for being returned according to the data before handling the non-data return type task Type task obtains the target service data, and the target service data are returned to the client.
A kind of computer equipment can be run on a memory and on a processor including memory, processor and storage Computer program, the processor perform the steps of when executing the computer program
The service request that client is sent is obtained, the service identification letter of target service data is carried in the service request Breath;
Determine that the corresponding data return type task of the service request and non-data return according to the service identification information Type task;
Before handling the non-data return type task, the target service is obtained according to the data return type task The target service data are returned to the client by data.
A kind of computer readable storage medium, is stored thereon with computer program, and the computer program is held by processor It is performed the steps of when row
The service request that client is sent is obtained, the service identification letter of target service data is carried in the service request Breath;
Determine that the corresponding data return type task of the service request and non-data return according to the service identification information Type task;
Before handling the non-data return type task, the target service is obtained according to the data return type task The target service data are returned to the client by data.
Above-mentioned service request response method, device, computer equipment and storage medium, due to getting client transmission Service request after, can be first according to the service identification information of the target service data carried in the service request, described in differentiation The corresponding data return type task of service request and non-data return type task, handle the non-data return type task it Before, the target service data are obtained according to the data return type task, the target service data are returned into the visitor Family end, that is to say, that just directly by the target industry after getting target service data according to the data return type task Business data return to the client, without returning again to client after waiting whole non-data return type task processing to complete End, it is possible to reduce the waiting time of user.
Detailed description of the invention
Fig. 1 is the applied environment figure of service request response method in one embodiment;
Fig. 2 is the flow diagram of service request response method in one embodiment;
Fig. 3 is the applied environment figure of service request response method in another embodiment;
Fig. 4 is the flow diagram of service request response method in another embodiment;
Fig. 5 is the flow diagram of service request response method in another embodiment;
Fig. 6 is the structural block diagram of service request responding device in one embodiment;
Fig. 7 is the internal structure chart of computer equipment in one embodiment.
Specific embodiment
In order to make the objectives, technical solutions, and advantages of the present invention clearer, with reference to the accompanying drawings and embodiments, right The present invention is further elaborated.It should be appreciated that specific embodiment described herein is only used to explain the present invention, not For limiting the present invention.
Service request response method provided by the invention, can be applied in application environment as shown in Figure 1, including terminal 101 and server 102.Terminal 101 can be communicated by network with server 102.Wherein, terminal 102 can with but it is unlimited Then various personal computers, laptop, smart phone, tablet computer and portable wearable device, server 102 can To be realized with the independent server either server cluster that forms of multiple servers.
Corresponding client software is installed, which can be pre-installed in above-mentioned terminal in terminal 101 101, it is also possible to after terminal 101 starts, is downloaded and installs from third party device or network server.Wherein, third Method, apparatus is not construed as limiting in embodiment.Specifically, the client software of terminal 101, can be used for realizing terminal 101 and server Interaction between 102.It is illustrated for client software is installed in terminal 101 in embodiment.In the examples below, eventually The client software installed in end 101 is known as client.In the embodiment of the present invention, be processing non-data return type task it Before, the target service data are first obtained according to data return type task, target service data are returned into client.Relative to Traditional target service data that just return when all having handled all tasks return to client, when can shorten the waiting of user Between.
In one embodiment, as shown in Fig. 2, providing a kind of service request response method, it is applied to Fig. 1 in this way In server for be illustrated, comprising the following steps:
Step S201: the service request that client is sent is obtained, carries target service data in the service request Service identification information;
In the embodiment of the present invention, client be may operate in the terminal of Fig. 1;Target industry described in the embodiment of the present invention The service identification information of business data can be understood as the mark for distinguishing the target service data and other data and believe Breath, the identification information can be the title of target service data or type information of target service data etc..
Step S202: the corresponding data return type task of the service request and non-is determined according to the service identification information Data return type task;
In the embodiment of the present invention, data return type task can be understood as needing to carry out appointing for data return to client The task of business namely the corresponding request function of tonic chord data of the service request, non-data return type task can be understood as being not required to The corresponding processing task of auxiliary function that the task namely the service request of data return are carried out to client, for example, one It is a little only to need in the task that server local carries out data preservation or data calculate.
Specifically, server determines that the service request manages task everywhere in corresponding according to the service request, according to institute It states service identification information to distinguish reason task everywhere in service request correspondence, obtain and the service identification information This is determined as data return type task with the matched processing task of the service identification information by the processing task matched, will be described The remaining processing task in addition to data return type task everywhere in service request is corresponding in reason task is determined as non-data Return type task.
Step S203: before handling the non-data return type task, institute is obtained according to the data return type task Target service data are stated, the target service data are returned into the client;
Specifically, server first obtains the target service data according to the data return type task, getting After stating target service data, the target service data are first returned into the client, by the target service data Return to the client and then the processing non-data return type task.
In above-mentioned service request response method, since after the service request for getting client transmission, meeting is first according to institute The service identification information for stating the target service data carried in service request distinguishes the corresponding data return type of the service request Task and non-data return type task, before handling the non-data return type task, according to the data return type task The target service data are obtained, the target service data are returned into the client, that is to say, that first according to After data return type task gets target service data, the target service data are just returned into the client, without It needs to return again to client after waiting whole non-data return type task processing to complete, it is possible to reduce period of reservation of number.
As shown in fig.3, being the application environment schematic diagram of the realization service request response method in another embodiment.Using Environment schematic includes electronic device 301, terminal 302 and block chain 303.Electronic device 301 can be logical by network, near field The suitable technology such as letter technology and terminal 302 carry out data interaction.Block chain 303 includes distributed multiple block chain nodes, Each block chain node can be an independent network server respectively, and being also possible to any number of block chain nodes is one Independent network server, or whole block chain nodes and electronic device 301 are an independent network server together.
Terminal 302 includes but is not limited to that any one can pass through keyboard, mouse, remote controler, touch tablet or sound with user The modes such as control equipment carry out the electronic product of human-computer interaction, for example, personal computer, tablet computer, smart phone, individual digital Assistant (Personal Digital Assistant, PDA), game machine, Interactive Internet TV (Internet Protocol Television, IPTV), intellectual wearable device etc..Corresponding client software is installed, the client in terminal 302 Software can be pre-installed in above-mentioned terminal 302, be also possible to after terminal 302 starts, from third party device or network service Device is downloaded and installs.Wherein, third party device is not construed as limiting in embodiment.Specifically, the client of terminal 302 is soft Part can be used for realizing the interaction between terminal 302 and electronic device 301.To install client software in terminal 302 in embodiment For be illustrated.In the examples below, the client software installed in terminal 302 is known as client.
Electronic device 301 be it is a kind of can according to the instruction for being previously set or store, automatic progress numerical value calculating and/or The equipment of information processing.Electronic device 301 can be computer, be also possible to single network server, multiple network servers The server cluster of composition or the cloud being made of a large amount of hosts or network server based on cloud computing, wherein cloud computing are One kind of distributed computing, a super virtual computer consisting of a loosely coupled set of computers.
In the present embodiment, electronic device 301 is include but are not limited to can be in communication with each other depositing for connection by system bus Store up equipment 3011, processing equipment 3012 and network interface 3013.It should be pointed out that Fig. 3 is illustrated only with component 3011- 3013 electronic device 301, this is only to show component related with the embodiment of the present invention, as needed, can be substituted Implement more or less component.
Wherein, storage equipment 3011 includes the readable storage medium storing program for executing of memory and at least one type.Inside save as electronic device 301 operation provides caching;Readable storage medium storing program for executing can for such as flash memory, hard disk, multimedia card, card-type memory it is non-volatile Storage medium.In some embodiments, readable storage medium storing program for executing can be the internal storage unit of electronic device 301, such as the electricity The hard disk of sub-device 301;In further embodiments, which is also possible to the outside of electronic device 301 The plug-in type hard disk being equipped in storage equipment, such as electronic device 301, intelligent memory card (Smart Media Card, SMC), Secure digital (SecureDigital, SD) card, flash card (Flash Card) etc..In the present embodiment, storage equipment 3011 can Read operating system and types of applications software that storage medium is installed on electronic device 301 commonly used in storage, such as the application one The program code etc. of service request responding device 3010 in embodiment.In addition, storage equipment 3011 can be also used for temporarily Store the Various types of data that has exported or will export.
Processing equipment 3012 may include one or more microprocessor, microcontroller, number in some embodiments Processor etc..Processing equipment 3012 is commonly used in the operation of control electronic device 1, such as executes and carry out data with terminal device 2 Interact or communicate relevant control and processing etc..In the present embodiment, processing set processing equipment 3012 for run store set The program code stored in standby 3011 or processing data, such as operation service request responding device 3010 etc..
Network interface 3013 may include radio network interface or wired network interface, is somebody's turn to do and network interface 3013 is commonly used in Communication connection is established between electronic device 301 and other electronic equipments.In the present embodiment, network interface 13 is mainly used for will be electric Sub-device 301 is connected with one or more terminals 302, establishes data between electronic device 301 and one or more terminals 302 Transmission channel and communication connection.
Service request responding device 3010 includes the computer-readable instruction that at least one is stored in storage equipment 3011, At least one computer-readable instruction can equipment 3012 processed execute, to realize that the service request of each embodiment of the application is rung Induction method.As described in subsequent, at least one computer-readable instruction is different according to the function that its each section is realized, can be drawn For different logic modules.
In one embodiment, it when the equipment 12 processed of service request responding device 3010 executes, realizes following operation: obtaining The service request that client is sent carries the service identification information of target service data in the service request;According to described Service identification information determines the corresponding data return type task of the service request and non-data return type task;According to the number With the client there is the block chain node of most short communication distance to send into the block chain pre-established according to return type task Data return instruction, the data return instruction are used to indicate the block chain node for receiving the data return instruction in local The target service data are inquired in storing data, and the target service data inquired are returned into the client.
In one embodiment, as shown in figure 4, providing a kind of service request response method, it is applied to Fig. 3 in this way In electronic device for be illustrated, specifically by be applied to Fig. 3 in service request responding device for be illustrated, have Body, it is above-mentioned that the target service data are obtained according to the data return type task, the target service data are returned To the client, may include: according to the data return type task into the block chain pre-established with the client Block chain node with most short communication distance sends data return instruction, and the data return instruction, which is used to indicate, receives institute The block chain node for stating data return instruction inquires the target service data, and the institute that will be inquired in data are locally stored It states target service data and returns to the client.
As shown in figure 4, the service request response method of the present embodiment may comprise steps of:
Step S401: the service request that client is sent is obtained, carries target service data in the service request Service identification information;
Step S402: the corresponding data return type task of the service request and non-is determined according to the service identification information Data return type task;
Step S403: before handling the non-data return type task, according to the data return type task to preparatory With the client there is the block chain node of most short communication distance to send data return instruction, the number in the block chain of foundation Be used to indicate according to return instruction receive the data return instruction block chain node inquired in data are locally stored described in Target service data, and the target service data inquired are returned into the client.
Generally, the mark of the service identification information or data return type task can be carried by sending data return instruction Know information
Specifically, the available operation client the corresponding IP of terminal (agreement interconnected between network, Internet Protocol) address information, it will be in the corresponding IP address information of terminal that the client be run and block chain The IP address letter of each block chain node is compared, and has most short communication distance with the client according to comparison result is determining Block chain node.Wherein, determine that communication distance distance can be by the way of it arbitrarily may be implemented based on IP address information.It connects The block chain node for receiving the data return instruction inquires corresponding account book in data are locally stored, and obtains after being decrypted Target service data are returned to the client immediately by the target service data.
In the present embodiment, obtained by instructing the block chain node that there is most short communication distance with the client to execute data It takes and returns to operation, the service request response time can be further saved, promote service request response efficiency.Meanwhile the present invention It in embodiment, is realized based on distributed block chain, it, can be significant when the same time needing to handle a large amount of service request Improve treatment effeciency.
It is above-mentioned in one of the embodiments, that the target service data are obtained according to the data return type task, The target service data are returned into the client, can also include: to be currently received the data return instruction When block chain node does not inquire the target service data in data are locally stored, refer to the data return is currently received The connected block chain link point of the block chain node of order sends the data return instruction.
Here, the block chain link point that is connected refers to the block in same block chain and being currently received the data return instruction The block chain node of chain node direct neighbor.Those skilled in the art return it should be appreciated that being currently received the data The block chain node of instruction can be with the client have most short communication distance block chain node, but be also not necessarily limited to be with The client has the block chain node of most short communication distance.For example, having the area of most short communication distance with the client Block chain node is block chain node k, and the adjacent node of block chain node k is block chain node k+1, the phase of block chain node k+1 Neighbors is block chain node k+2, and so on.It is not inquired in block chain node k and does not inquire institute in data are locally stored When stating target service data, send the data return instruction to block chain node k+1, at this time be currently received the data The block chain node of return instruction is block chain node k, i.e., has the block chain node of most short communication distance with the client, When block chain node k+1 is not inquired and do not inquired the target service data in data are locally stored, to block chain node k + 2 send the data return instruction, and the block chain node for being currently received the data return instruction at this time is block chain link Point k+1.
When there are multiple connected block chain link points, it can be to any one block chain link point that is connected and send the data Return instruction, to indicate that the block chain link point that is connected inquires the target service data in data are locally stored, and will inquiry To the target service data return to the client.It is also possible to respectively to described in multiple connected block chain link points transmissions Data return instruction, to indicate that this multiple connected block chain link point inquires the target service number respectively in data are locally stored According to, and the connected block chain link point by most inquiring the target service data fastly the target service data are returned to it is described Client.
In one embodiment, as shown in figure 5, providing a kind of service request response method, it is applied to Fig. 3 in this way In electronic device for be illustrated, comprising the following steps:
Step S501: the service request that client is sent is obtained, carries target service data in the service request Service identification information;
Step S502: the corresponding data return type task of the service request and non-is determined according to the service identification information Data return type task;
Step S503: had most into the block chain pre-established with the client according to the data return type task The block chain node of short communication distance sends data return instruction, and the data return instruction, which is used to indicate, receives the data The block chain node of return instruction inquires the target service data, and the target that will be inquired in data are locally stored Business datum returns to the client;
Step S504: the quantity that the non-data returns to task is obtained, the block chain of quantity described in block chain is distributed to Node carries out parallel processing.
Wherein, after non-data return task is distributed to block chain node, the area that the non-data returns to task is handled Processing locality result is distributed in block chain by block chain node, and each block chain node in block chain will handle the non-data The processing locality result of the block chain node of return task is saved after being summarized.
For example, for include block chain node 1, block chain node 2, block chain node 3 ..., block chain node n Block chain has m non-data to return to task, can m block chain according to some preset rules or at random into block chain Node distributes non-data and returns to task, and the m processing non-data returns to the block chain node of task respectively by processing locality knot Fruit is distributed in block chain.Then, n block chain node in block chain is returned according to this m processing non-data respectively The processing locality result that the block chain node of task is distributed is saved after being summarized.Summarized results is usually summarized one The form of a account book is saved, and the account book is encrypted before summarizing, and is saved to encrypted account book.
In the present embodiment, the block chain link point by being distributed to quantity described in block chain, which carries out parallel processing, to be promoted Treatment effeciency.But the processing mode for returning to task to non-data is not limited to the mode of this mean allocation, for example, it is also possible to collect In to 1 or non-data described in multiple block chain node processings return task.
It includes that data calculating task and data save task that the non-data, which returns to task, in one of the embodiments,; The block chain node acquisition data to be saved that data save task are received, target is saved into data distribution into block chain;It connects The block chain node for receiving calculating task treats calculating data progress data and local computing is calculated as a result, by local computing knot Fruit is dealt into block chain.
It is above-mentioned before handling the non-data return type task in one of the embodiments, according to the data The step of return type task obtains the target service data, and the target service data are returned to the client, can be with It include: to be moved to the main thread where non-data return type task from the data return type task by asynchronous operation mode Task queue is obtaining the target service data according to the data return type task, the target service data is being returned After the client, the non-data return type task in the task queue is handled.
The scheme of the present embodiment, the main thread where non-data return type task from the data return type task is mobile To task queue, the task in main thread can be made to handle completion as early as possible, shorten the waiting time of user.
It should be understood that although each step in the flow chart of Fig. 2,4 and 5 is successively shown according to the instruction of arrow, But these steps are not that the inevitable sequence according to arrow instruction successively executes.Unless expressly state otherwise herein, these There is no stringent sequences to limit for the execution of step, these steps can execute in other order.Moreover, in Fig. 2,4 and 5 At least part step may include that perhaps these sub-steps of multiple stages or stage are not necessarily same to multiple sub-steps One moment executed completion, but can execute at different times, and the execution in these sub-steps or stage sequence is also not necessarily Be successively carry out, but can at least part of the sub-step or stage of other steps or other steps in turn or Alternately execute.
In one embodiment, as shown in fig. 6, providing a kind of service request responding device, comprising: request receiving module 601, assessment of tasks module 602 and task processing and control module 603, in which:
Request receiving module 601 carries target in the service request for obtaining the service request of client transmission The service identification information of business datum;
Assessment of tasks module 602, for determining that the corresponding data of the service request are returned according to the service identification information Hollow task and non-data return type task;
Task processing and control module 603, for being returned according to the data before handling the non-data return type task Hollow task obtains the target service data, and the target service data are returned to the client.
Task processing and control module 603 can be according to the data return type task to pre- in one of the embodiments, With the client there is the block chain node of most short communication distance to send data return instruction in the block chain first established, it is described Data return instruction, which is used to indicate, to be received the block chain node of the data return instruction and inquires institute in data are locally stored Target service data are stated, and the target service data inquired are returned into the client.
Task processing and control module 603 can also be returned being currently received the data in one of the embodiments, When the block chain node of instruction does not inquire the target service data in data are locally stored, to being currently received the data The connected block chain link point of the block chain node of return instruction sends the data return instruction.
Task processing and control module 603 is also used to obtain the non-data and returns to task in one of the embodiments, Quantity, the block chain link point for being distributed to quantity described in the block chain pre-established carry out parallel processing.
The block chain node for handling the non-data return task in one of the embodiments, divides processing locality result It is dealt into the block chain;Each block chain node in the block chain will handle the block chain of the non-data return task The processing locality result of node is saved after being summarized.
It includes that data calculating task and data save task that the non-data, which returns to task, in one of the embodiments,; The block chain node acquisition data to be saved that data save task are received, target is saved into data distribution into block chain;It connects The block chain node for receiving calculating task treats calculating data progress data and local computing is calculated as a result, by local computing knot Fruit is dealt into block chain.
Non-data is returned to type by asynchronous operation mode by task processing and control module 603 in one of the embodiments, Main thread where task from the data return type task is moved to task queue, obtains according to the data return type task The target service data are taken, after the target service data are returned to the client, are handled in the task queue Non-data return type task.
Specific about service request responding device limits the limit that may refer to above for service request response method Fixed, details are not described herein.Modules in above-mentioned service request responding device can fully or partially through software, hardware and its Combination is to realize.Above-mentioned each module can be embedded in the form of hardware or independently of in the processor in computer equipment, can also be with It is stored in the memory in computer equipment in a software form, in order to which processor calls the above modules of execution corresponding Operation.
In one embodiment, a kind of computer equipment is provided, which can be server, internal junction Composition can be as shown in Figure 7.The computer equipment include by system bus connect processor, memory, network interface and Database.Wherein, the processor of the computer equipment is for providing calculating and control ability.The memory packet of the computer equipment Include non-volatile memory medium, built-in storage.The non-volatile memory medium is stored with operating system, computer program and data Library.The built-in storage provides environment for the operation of operating system and computer program in non-volatile memory medium.The calculating The database of machine equipment is used for storage service request response data.The network interface of the computer equipment is used for and external terminal It is communicated by network connection.To realize a kind of service request response method when the computer program is executed by processor.
It will be understood by those skilled in the art that structure shown in Fig. 7, only part relevant to the present invention program is tied The block diagram of structure does not constitute the restriction for the computer equipment being applied thereon to the present invention program, specific computer equipment It may include perhaps combining certain components or with different component layouts than more or fewer components as shown in the figure.
In one embodiment, a kind of computer equipment is provided, including memory, processor and storage are on a memory And the computer program that can be run on a processor, processor perform the steps of when executing computer program
The service request that client is sent is obtained, the service identification letter of target service data is carried in the service request Breath;
Determine that the corresponding data return type task of the service request and non-data return according to the service identification information Type task;
Before handling the non-data return type task, the target service is obtained according to the data return type task The target service data are returned to the client by data.
In one embodiment, it is described according to data return type task acquisition to execute computer program realization for processor The target service data when target service data are returned to the step of the client, implement following steps: There is into the block chain pre-established with the client block of most short communication distance according to the data return type task Chain node sends data return instruction, and the data return instruction is used to indicate the block chain for receiving the data return instruction Node inquires the target service data in data are locally stored, and the target service data inquired are returned to institute State client.
In one embodiment, it is described according to data return type task acquisition to execute computer program realization for processor The target service data when target service data are returned to the step of the client, specifically also realize following step It is rapid: not inquire the target service in data are locally stored in the block chain node for being currently received the data return instruction When data, the data are sent to the connected block chain link point for the block chain node for being currently received the data return instruction and are returned It refers to enable.
In one embodiment, the acquisition non-data is also performed the steps of when processor executes computer program to return The quantity for the task of returning, the block chain link point for being distributed to quantity described in the block chain pre-established carry out parallel processing.
In one embodiment, processing locality result is distributed to by the block chain node for handling the non-data return task In the block chain;Each block chain node in the block chain will handle the block chain node of the non-data return task Processing locality result summarized after saved.
In one embodiment, it includes that data calculating task and data save task that the non-data, which returns to task,;It receives The block chain node for saving task to data obtains data to be saved, and target is saved data distribution into block chain;It receives The block chain node of calculating task treats calculating data progress data and local computing is calculated as a result, local computing result is sent out Into block chain.
In one embodiment, it is described in the processing non-data return type task to execute computer program realization for processor Before, the target service data are obtained according to the data return type task, the target service data is returned to described When the step of client, specifically also perform the steps of
The main thread where non-data return type task from the data return type task is moved by asynchronous operation mode Task queue is moved, the target service data are being obtained according to the data return type task, by the target service data After returning to the client, the non-data return type task in the task queue is handled.
In one embodiment, a kind of computer readable storage medium is provided, computer program is stored thereon with, is calculated Machine program performs the steps of when being executed by processor
The service request that client is sent is obtained, the service identification letter of target service data is carried in the service request Breath;
Determine that the corresponding data return type task of the service request and non-data return according to the service identification information Type task;
Before handling the non-data return type task, the target service is obtained according to the data return type task The target service data are returned to the client by data.
In one embodiment, computer program, which is executed by processor, realizes and described is obtained according to the data return type task The target service data are taken, when the target service data are returned to the step of the client, implement following step It is rapid: there is into the block chain pre-established with the client area of most short communication distance according to the data return type task Block chain node sends data return instruction, and the data return instruction is used to indicate the block for receiving the data return instruction Chain node inquires the target service data in data are locally stored, and the target service data inquired are returned to The client.
In one embodiment, computer program, which is executed by processor, realizes and described is obtained according to the data return type task The target service data are taken, when the target service data are returned to the step of the client, are specifically also realized following Step: the target industry is not inquired in data are locally stored in the block chain node for being currently received the data return instruction When data of being engaged in, the data are sent to the connected block chain link point for the block chain node for being currently received the data return instruction Return instruction.
In one embodiment, it is described non-that acquisition is also performed the steps of when computer program is executed by processor realization Data return to the quantity of task, and the block chain link point for being distributed to quantity described in the block chain pre-established carries out parallel processing.
In one embodiment, processing locality result is distributed to by the block chain node for handling the non-data return task In the block chain;Each block chain node in the block chain will handle the block chain node of the non-data return task Processing locality result summarized after saved.
In one embodiment, it includes that data calculating task and data save task that the non-data, which returns to task,;It receives The block chain node for saving task to data obtains data to be saved, and target is saved data distribution into block chain;It receives The block chain node of calculating task treats calculating data progress data and local computing is calculated as a result, local computing result is sent out Into block chain.
It is described in the processing non-data return type times to be executed by processor realization for computer program in one embodiment Before business, the target service data are obtained according to the data return type task, the target service data are returned into institute When stating the step of client, specifically also perform the steps of
The main thread where non-data return type task from the data return type task is moved by asynchronous operation mode Task queue is moved, the target service data are being obtained according to the data return type task, by the target service data After returning to the client, the non-data return type task in the task queue is handled.
Those of ordinary skill in the art will appreciate that realizing all or part of the process in above-described embodiment method, being can be with Relevant hardware is instructed to complete by computer program, the computer program can be stored in a non-volatile computer In read/write memory medium, the computer program is when being executed, it may include such as the process of the embodiment of above-mentioned each method.Wherein, To any reference of memory, storage, database or other media used in each embodiment provided by the present invention, Including non-volatile and/or volatile memory.Nonvolatile memory may include read-only memory (ROM), programming ROM (PROM), electrically programmable ROM (EPROM), electrically erasable ROM (EEPROM) or flash memory.Volatile memory may include Random access memory (RAM) or external cache.By way of illustration and not limitation, RAM is available in many forms, Such as static state RAM (SRAM), dynamic ram (DRAM), synchronous dram (SDRAM), double data rate sdram (DDRSDRAM), enhancing Type SDRAM (ESDRAM), synchronization link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic ram (DRDRAM) and memory bus dynamic ram (RDRAM) etc..
Each technical characteristic of above embodiments can be combined arbitrarily, for simplicity of description, not to above-described embodiment In each technical characteristic it is all possible combination be all described, as long as however, the combination of these technical characteristics be not present lance Shield all should be considered as described in this specification.
The embodiments described above only express several embodiments of the present invention, and the description thereof is more specific and detailed, but simultaneously It cannot therefore be construed as limiting the scope of the patent.It should be pointed out that coming for those of ordinary skill in the art It says, without departing from the inventive concept of the premise, various modifications and improvements can be made, these belong to protection of the invention Range.Therefore, the scope of protection of the patent of the invention shall be subject to the appended claims.

Claims (10)

1. a kind of service request response method, which is characterized in that the described method includes:
The service request that client is sent is obtained, the service identification information of target service data is carried in the service request;
Determine that the corresponding data return type task of the service request and non-data return type are appointed according to the service identification information Business;
Before handling the non-data return type task, the target service number is obtained according to the data return type task According to the target service data are returned to the client.
2. service request response method according to claim 1, which is characterized in that described to be appointed according to the data return type Business obtains the target service data, and the target service data are returned to the client, comprising:
There is most short communication distance with the client into the block chain pre-established according to the data return type task Block chain node sends data return instruction, and the data return instruction is used to indicate the area for receiving the data return instruction Block chain node inquires the target service data in data are locally stored, and the target service data inquired are returned To the client.
3. service request response method according to claim 2, which is characterized in that described according to the data return type Task obtains the target service data, and the target service data are returned to the client, further includes:
The target industry is not inquired in data are locally stored in the block chain node for being currently received the data return instruction When data of being engaged in, the data are sent to the connected block chain link point for the block chain node for being currently received the data return instruction Return instruction.
4. according to claim 1 to service request response method described in 3 any one, which is characterized in that the method is also wrapped It includes:
The quantity that the non-data returns to task is obtained, the block chain node of quantity described in the block chain pre-established is distributed to Carry out parallel processing.
5. service request response method according to claim 4, which is characterized in that handle the non-data and return to task Processing locality result is distributed in the block chain by block chain node;Each block chain node in the block chain will be handled The processing locality result that the non-data returns to the block chain node of task is saved after being summarized.
6. service request response method according to claim 5, which is characterized in that it includes number that the non-data, which returns to task, Task is saved according to calculating task and data;The block chain node acquisition data to be saved that data save task are received, by target Data distribution is saved into block chain;The block chain node for receiving calculating task is treated calculating data progress data and is calculated Local computing is as a result, local computing result is dealt into block chain.
7. service request response method according to claim 1, which is characterized in that described to handle the non-data return Before type task, the target service data are obtained according to the data return type task, the target service data are returned To the client, comprising:
The main thread where non-data return type task from the data return type task is moved to by asynchronous operation mode Task queue is obtaining the target service data according to the data return type task, the target service data is being returned After the client, the non-data return type task in the task queue is handled.
8. a kind of service request responding device, which is characterized in that described device includes:
Request receiving module carries target service number in the service request for obtaining the service request of client transmission According to service identification information;
Assessment of tasks module, for determining the corresponding data return type task of the service request according to the service identification information With non-data return type task;
Task processing and control module, for being appointed before handling the non-data return type task according to the data return type Business obtains the target service data, and the target service data are returned to the client.
9. a kind of computer equipment including memory, processor and stores the meter that can be run on a memory and on a processor Calculation machine program, which is characterized in that the processor realizes any one of claims 1 to 7 institute when executing the computer program The step of stating method.
10. a kind of computer readable storage medium, is stored thereon with computer program, which is characterized in that the computer program The step of method described in any one of claims 1 to 7 is realized when being executed by processor.
CN201810848309.4A 2018-07-27 2018-07-27 Service request response method, device, computer equipment and storage medium Active CN108965450B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810848309.4A CN108965450B (en) 2018-07-27 2018-07-27 Service request response method, device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810848309.4A CN108965450B (en) 2018-07-27 2018-07-27 Service request response method, device, computer equipment and storage medium

Publications (2)

Publication Number Publication Date
CN108965450A true CN108965450A (en) 2018-12-07
CN108965450B CN108965450B (en) 2021-05-28

Family

ID=64465458

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810848309.4A Active CN108965450B (en) 2018-07-27 2018-07-27 Service request response method, device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN108965450B (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111190727A (en) * 2019-11-19 2020-05-22 腾讯科技(深圳)有限公司 Asynchronous memory destructuring method and device, computer equipment and storage medium
CN111367868A (en) * 2018-12-26 2020-07-03 北京奇虎科技有限公司 Method and device for processing file acquisition request
CN112529470A (en) * 2020-12-25 2021-03-19 深圳前海微众银行股份有限公司 Task execution method, device, equipment and storage medium of website robot
CN114489513A (en) * 2022-02-11 2022-05-13 上海驻云信息科技有限公司 Data return method and system based on local disk transfer

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1901477A (en) * 2006-07-12 2007-01-24 华为技术有限公司 Searching method and its system for equipment traffic data
CN1984115A (en) * 2006-06-09 2007-06-20 华为技术有限公司 System and method for determining content supplier priority level
US20160191663A1 (en) * 2010-06-29 2016-06-30 At&T Intellectual Property I, L.P. Prioritization of protocol messages at a server
CN107315786A (en) * 2017-06-12 2017-11-03 腾讯科技(深圳)有限公司 Business datum storage method and device
CN107451227A (en) * 2017-07-21 2017-12-08 网宿科技股份有限公司 Paging query method and device

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1984115A (en) * 2006-06-09 2007-06-20 华为技术有限公司 System and method for determining content supplier priority level
CN1901477A (en) * 2006-07-12 2007-01-24 华为技术有限公司 Searching method and its system for equipment traffic data
US20160191663A1 (en) * 2010-06-29 2016-06-30 At&T Intellectual Property I, L.P. Prioritization of protocol messages at a server
CN107315786A (en) * 2017-06-12 2017-11-03 腾讯科技(深圳)有限公司 Business datum storage method and device
CN107451227A (en) * 2017-07-21 2017-12-08 网宿科技股份有限公司 Paging query method and device

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111367868A (en) * 2018-12-26 2020-07-03 北京奇虎科技有限公司 Method and device for processing file acquisition request
CN111367868B (en) * 2018-12-26 2023-12-29 三六零科技集团有限公司 File acquisition request processing method and device
CN111190727A (en) * 2019-11-19 2020-05-22 腾讯科技(深圳)有限公司 Asynchronous memory destructuring method and device, computer equipment and storage medium
CN111190727B (en) * 2019-11-19 2023-06-09 腾讯科技(深圳)有限公司 Asynchronous memory destructor method and device, computer equipment and storage medium
CN112529470A (en) * 2020-12-25 2021-03-19 深圳前海微众银行股份有限公司 Task execution method, device, equipment and storage medium of website robot
CN112529470B (en) * 2020-12-25 2024-03-19 深圳前海微众银行股份有限公司 Task execution method, device and equipment of website robot and storage medium
CN114489513A (en) * 2022-02-11 2022-05-13 上海驻云信息科技有限公司 Data return method and system based on local disk transfer

Also Published As

Publication number Publication date
CN108965450B (en) 2021-05-28

Similar Documents

Publication Publication Date Title
CN108924250A (en) Service request processing method, device and computer equipment based on block chain
CN109040227A (en) Service request response method, device and computer equipment based on block chain
CN108965450A (en) Service request response method, device, computer equipment and storage medium
CN108848039B (en) Server, message distribution method and storage medium
CN104040521B (en) Biological characteristic cloud communication and data move
CN109951547B (en) Transaction request parallel processing method, device, equipment and medium
CN106933871A (en) Short linking processing method, device and short linked server
CN108173905B (en) Resource allocation method and device and electronic equipment
CN103997521B (en) A kind of file operation method based on router, device and router
CN108960797B (en) Block generation and verification method, device, equipment and storage medium
CN107154013A (en) Additional card, content delivery network server and execution method for image procossing
CN112199442A (en) Distributed batch file downloading method and device, computer equipment and storage medium
CN106572146A (en) Message sending method and message sending device
WO2014110929A1 (en) Method, device, and system for uploading data
CN107370684A (en) Business current-limiting method and business current-limiting apparatus
CN115408715A (en) Heterogeneous data processing system, method and equipment based on block chain and IPFS
CN109508243A (en) Service request processing method, device, computer equipment and storage medium
CN111813517B (en) Task queue allocation method and device, computer equipment and medium
CN112422450A (en) Computer equipment, and flow control method and device for service request
CN108234551A (en) A kind of data processing method and device
CN105204861A (en) Registry re-directing method and device
CN103164409A (en) Network advertisement show type post test method and network advertisement show type post test system
CN110022341A (en) A kind of data transmission method and relevant device
CN116911572A (en) Page automation assembly method, system, computer equipment and storage medium
CN110650546A (en) File transmission method, device, storage medium and terminal

Legal Events

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