CN110162415A - For handling method, server, device and the storage medium of request of data - Google Patents
For handling method, server, device and the storage medium of request of data Download PDFInfo
- Publication number
- CN110162415A CN110162415A CN201910369290.XA CN201910369290A CN110162415A CN 110162415 A CN110162415 A CN 110162415A CN 201910369290 A CN201910369290 A CN 201910369290A CN 110162415 A CN110162415 A CN 110162415A
- Authority
- CN
- China
- Prior art keywords
- data
- request
- application program
- sent
- server
- 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
Links
Classifications
-
- A—HUMAN NECESSITIES
- A63—SPORTS; GAMES; AMUSEMENTS
- A63F—CARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
- A63F13/00—Video games, i.e. games using an electronically generated display having two or more dimensions
- A63F13/85—Providing additional services to players
- A63F13/87—Communicating with other players during game play, e.g. by e-mail or chat
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements 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/46—Multiprogramming arrangements
- G06F9/54—Interprogram communication
- G06F9/546—Message passing systems or structures, e.g. queues
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L51/00—User-to-user messaging in packet-switching networks, transmitted according to store-and-forward or real-time protocols, e.g. e-mail
- H04L51/04—Real-time or near real-time messaging, e.g. instant messaging [IM]
- H04L51/046—Interoperability with other network applications or services
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Theoretical Computer Science (AREA)
- Multimedia (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Information Transfer Between Computers (AREA)
Abstract
Method, server, device and the storage medium that present disclose provides a kind of for handling request of data.The described method includes: the data content in request of data is sent to the first application program, and return to the transmission result of the request of data;In lists by request of data storage, so that the data content in the request of data is sent to the second application program;Wherein, the return for sending result is sent to the asynchronous progress of the second application program with the data content in the request of data.It in lists include: to store the request of data in lists in the form of class, parameter and function by request of data storage, wherein, the class indicates the type of request of data, and the parameter list shows the data content in request of data, the processing that the function representation will carry out the parameter.
Description
Technical field
This disclosure relates to data request processing field, it is specifically related to a kind of method for handling request of data, service
Device, device and storage medium.
Background technique
For same user, there may be multiple application programs that identical function may be implemented, for example, for game
One application program and the second application program for serving the game, first application program and the second application program are for example
To realize chat feature, that is, user can carry out chat communication in the first application program for game, can also be second
Chat communication is carried out in application program.To make the chat content of user in the first application program and phase one in the second application program
It causes, needs server that the chat content in the chat request received is sent to the first application program and then be sent to the
Two application programs.Said sequence carries out ground, identical chat content is sent to the treatment process presence of different application programs
The problem of data processing delay.Particularly, in the biggish situation of data volume of chat request to be treated, delay issue is more
Add phenomenon generation that is serious, and may result in server process confusion.
Summary of the invention
Present disclose provides a kind of methods for handling request of data, answer for realizing in difference with the same function
With the data content being sent asynchronously between program in request of data.
According to the one side of the disclosure, a kind of method for handling request of data is provided, comprising: will be in request of data
Data content be sent to the first application program, and return to the transmission result of the request of data;The request of data is stored
In lists, so that the data content in the request of data is sent to the second application program;Wherein, the transmission result
Return with the request of data in data content be sent to the asynchronous progress of the second application program.
It in lists include: by the request of data by request of data storage according to some embodiments of the present disclosure
It is stored in the form of class, parameter and function in lists, wherein the class indicates that the type of request of data, the parameter indicate
Data content in request of data, the processing that the function representation will carry out the parameter.
According to some embodiments of the present disclosure, the method also includes: the class requested based on the data, according to the number
The parameter of the request of data is handled according to the function of request.
According to some embodiments of the present disclosure, the data content in the request of data is sent to via first server
First application program;And the data content in the request of data is sent to the second application program via second server.
According to some embodiments of the present disclosure, the method also includes: by the first server by the data in list
Request is sent to the second server.
According to some embodiments of the present disclosure, the method also includes: number is received from the first application program of the first equipment
According to request, wherein the data content in request of data is sent to the first application program, and returns to the transmission of the request of data
Result includes: that the data content in request of data is sent to the first application program of the second equipment, and to first equipment
The first application program return to the transmission result of the request of data;The data content being stored in the request of data of list is used for
It is sent to the second application program of second equipment.
According to some embodiments of the present disclosure, the method also includes: the data content in request of data is sent to institute
State the second application program of the first equipment.
According to another aspect of the present disclosure, it additionally provides a kind of for handling the server of request of data, comprising: processing is single
Member is configured to for request of data to be sent to the first application program, and returns to the transmission result of the request of data;It is single with storage
Member is configured to store the request of data in lists, so that the data content in the request of data is sent to the
Two application programs;Wherein, the return for sending result is sent to the second application with the data content in the request of data
The asynchronous progress of program.
According to some embodiments of the present disclosure, the storage unit is by the request of data with the shape of class, parameter and function
Formula stores in lists, wherein the class indicates the type of request of data, and the parameter list shows in the data in request of data
Hold, the processing that the function representation will carry out the parameter.
According to some embodiments of the present disclosure, the processing unit is configured to the class requested based on the data, according to
The function of the request of data handles the parameter of the request of data.
According to some embodiments of the present disclosure, the processing unit is configured to for the request of data in list being sent to separately
One server.
According to some embodiments of the present disclosure, the server further includes receiving unit, is configured to from the first equipment
One application program receives request of data, and the data content in request of data is sent to the first of the second equipment by the processing unit
Application program, and return to the first application program of first equipment transmission result of the request of data, wherein it is stored in
Data content in the request of data of list is used to be sent to the second application program of second equipment.
According to some embodiments of the present disclosure, the processing unit is configured to send the data content in request of data
To the second application program of first equipment.
According to the another aspect of the disclosure, additionally provide a kind of for handling the device of request of data, comprising: one or more
A processor;With one or more memories, wherein be stored with computer-readable code, the computer in the memory
Readable code executes the method as described above for handling request of data when being run by one or more of processors.
According to the another aspect of the disclosure, a kind of computer readable storage medium is additionally provided, is stored thereon with instruction, institute
Instruction is stated when being executed by processor, so that the processor executes the method for handling request of data as described above.
The method for handling request of data that the disclosure provides, may be implemented will be in the data in received request of data
Appearance is sent to after the first application program directly to return and send as a result, then storing the request of data in lists, to be used for
Data content in the request of data is sent to the second application program so that it is described send result return with it is described
Request of data is sent to the second application program and asynchronously carries out, to avoid the delay issue of data request processing, even if in number
It can be carried out in an orderly manner according to the processing that in the biggish situation of the data volume of request, also can guarantee request of data.
Detailed description of the invention
In order to illustrate more clearly of the embodiment of the present disclosure or technical solution in the prior art, to embodiment or will show below
There is attached drawing needed in technical description to be briefly described, it should be apparent that, the accompanying drawings in the following description is only this
Disclosed some embodiments for those of ordinary skill in the art without creative efforts, can be with
It obtains other drawings based on these drawings.
Fig. 1 shows the flow chart of the method for handling request of data according to the embodiment of the present disclosure;
Fig. 2 shows the schematic diagrames requested according to the storing data in sequence list of the embodiment of the present disclosure;
Fig. 3 shows the schematic diagram of the framework of the processing chat request according to the embodiment of the present disclosure;
Fig. 4 shows the logical flow chart of the processing chat request according to the embodiment of the present disclosure;
Fig. 5 shows the schematic diagram of the chat interface of the application program according to the embodiment of the present disclosure;
Fig. 6 shows the schematic block diagram of the server for handling request of data according to the embodiment of the present disclosure;
Fig. 7 shows the schematic diagram of the device for handling request of data according to the embodiment of the present disclosure;
Fig. 8 shows the schematic diagram of the framework of the exemplary computer device according to the embodiment of the present disclosure;
Fig. 9 shows the schematic diagram of the storage medium according to the embodiment of the present disclosure.
Specific embodiment
Below in conjunction with the attached drawing in the embodiment of the present disclosure, the technical solution in the embodiment of the present disclosure is carried out clear, complete
Site preparation description.Obviously, described embodiment is only the embodiment of disclosure a part, instead of all the embodiments.It is based on
Embodiment in the disclosure, those of ordinary skill in the art's every other reality obtained under the premise of being not necessarily to creative work
Example is applied, the range of disclosure protection is belonged to.
" first ", " second " used in the disclosure and similar word are not offered as any sequence, quantity or again
The property wanted, and be used only to distinguish different component parts.Equally, the similar word such as " comprising " or "comprising" means this
Element or object before word are covered the element for appearing in the word presented hereinafter or object and its are equal, and are not excluded for other
Element or object." connection " either the similar word such as " connected " is not limited to physics or mechanical connection, but
It may include electrical connection, it is either direct or indirect.
Flow chart has been used to be used to the step of illustrating method according to an embodiment of the present disclosure in the disclosure.It should be understood that
It is not necessarily accurately to carry out in sequence the step of above or below.On the contrary, can be handled according to inverted order or simultaneously various
Step.It is also possible to during other operations are added to these, or remove a certain step from these processes or count step.
It for multiple application programs of identical function may be implemented, such as is both the first application program for realizing chat feature
With the second application program, in the application scenarios for sending chat request to first and second application program, first server
Can be received from user include chat content chat request, the chat content is then sent to the of another user
One application program.In order to enable also can receive the chat content in the second application program of another user, usually
The chat request is transmitted to second server by first server, and will be in the chat request by the second server
Chat content be sent to the second application program of another user.It is completed in response to second server and sends out chat content
The second application program is given, first server returns to the user for sending chat request and sends result.
In the treatment process of above-mentioned chat request, first server needs that second server is waited to complete after sending
Return to the transmission result.In other words, after first server needs to wait always the transmission processing of second server to complete,
It just returns and sends result.It returns to send result and may be considered first server and completes processing for the chat request
Feedback.There is data processing delay in this, so that the processing of chat request may block.Particularly, it is needing
In the biggish situation of the data volume of the chat request of processing, for example, server receives a large amount of chat request, above-mentioned delay is asked
Topic will be more serious, for example, first server may be larger due to treating capacity and fail that chat request is transmitted to the in time
Two servers are even lost so as to cause chat content received in the second application program delay, lag.Alternatively, second service
Device since treating capacity is larger may also fail that the chat content in chat request is sent to the second application program in time, lead
It causes first server to be constantly in wait state, can not return and send as a result, simultaneously so that transmission chat request uses the head of a household
The result to be sent such as time.Above-mentioned delay will lead to the phenomenon of server process confusion, even more so that the chat of application program takes
It is engaged in unavailable, this greatly reduces the user experience of application program.
Present disclose provides a kind of methods for handling request of data, for asynchronously handling request of data, to avoid
As described above data request processing lag, obstruction and so on.
Fig. 1 shows the flow chart of the method for handling request of data according to the embodiment of the present disclosure.As shown in Figure 1,
In step S101, the data content in request of data is sent to the first application program, and return to the transmission of the request of data
As a result.The request of data may be such that the request that first server handles data, wherein may include in data
Hold, and instruction relevant to the processing (such as, sending), address date (such as, the address information of recipient) etc..It is described
Send result be used to indicate first server processing status information, such as can be sends successfully, send unsuccessfully or send out
Send the prompt such as delay.According in disclosed method, the data content in the request of data is being sent to the first application
After program, the transmission result of the request of data is directly returned to the user for sending the request of data.
According to some embodiments of the present disclosure, the method can also include: to connect from the first application program of the first equipment
It receives request of data and the data content in the request of data is then sent to the first application program of the second equipment.Wherein,
First equipment can correspond to the first user, and second equipment can correspond to second user.In other words, by first
User sends request of data to first server, and the data content in the request of data is sent to the by first server
The first application program of two users.The first application program of first user and the first application program of second user for example may be used
To be the identical application program being separately operable in the first equipment of the first user and the second equipment of second user.It needs to infuse
Meaning, first user can have first equipment, it is possible to have multiple first equipment, herein with no restrictions.
For example, the request of data can be chat request as described above.For example, the first of the first user applies
Program can send chat request to first server, for being chatted by the first server by include in the chat request
(such as, " hello for its content!") it is sent to the first application program of second user.The first application program of first user and
First application program of second user can be achieved on the program of chat feature.According in disclosed method, first service
Device is asked after the first application program that the chat content of the chat request is sent to second user to the data are sent
Such as transmission that the first user asked directly returns to the chat request successfully sends result.It should be noted that described
Request of data for example can also be any type of requests such as message informing, activity description push, herein will be with chat request
Specific example as request of data is illustrated the method for handling request of data, and the request of data is simultaneously unlimited
It is formed on chat request.
Then, in step S102, in lists by request of data storage, so that the data content in the request of data
It is sent to the second application program.
Second application program can be different from first application program but may be implemented and the first application program
The application program of identical function.For example, first application program can be game application, and game function may be implemented
Can, and can also realize chat feature, for example, game user can carry out chat discussion in the game application.
Second application program can be the game aid application program corresponding to the game, such as community application may be implemented
Function, and the function of chat also may be implemented, game user can also chat discussion in the game aid application program.
In addition, second application program is also can correspond to the small routine of the game.For example, in order to preferably promote the trip
Play, can also develop the small routine for serving the game.The small routine can refer in application program operably journey
Sequence has the characteristics that use can be run without downloading and installation.The small routine for serving the game also may be implemented to chat
Function.For example, user can receive the chat content of the small routine from other game users in the small routine, it can also
To receive the chat content from the game application or game aid application program.It can be with thus, it is possible to have
Realize multiple application programs of chat feature, that is, game application, game aid application program and small routine can use
Chat content in chat request is separately sent in the multiple application program by server, so that described can be real
Chat content in multiple application programs of existing chat feature is consistent.In this way, user is not necessarily between multiple application programs
Switching can view consistent on the interface of the interface of game application or game aid application program and small routine
Chat content.
The list is the storage organization that can store request of data, such as can be sequence list.The sequence list
It is the list stored sequentially in time, the storage characteristics with first in, first out.It is arranged for example, being stored in sequence earliest
Request of data in table is sent to the second application program at first, it is possible thereby to guarantee to handle the sequence of request of data in time
Property, improve the stability of processing request of data.It should be noted that in addition to the sequence of the above-mentioned storage characteristics with first in, first out
List, the list can also guarantee to handle the succession of request of data in time using other modes, for example, can adopt
The mode of index of reference.For example, after by request of data storage in lists, unique sequence can be distributed it and compiled
Number, and the data content in the request of data is sequentially sent to the second application program according to the serial number.
According to some embodiments of the present disclosure, the request of data is stored in list in the form of class, parameter and function
In.Wherein, the class (Class) indicates the type of request of data, can refer to Object-oriented Programming Design (OOP, Object-
Oriented Programming) realize Information encapsulation basis.For example, the class can be a kind of user defined type,
Class Type can be claimed into.In other words, the class can be used to indicate that current data request type, for example, chat, information,
Activity etc. can also define other classes according to practical application request.
The parameter list shows the data content in request of data, such as can be chatting for text, picture or video format
Its content.In addition, the parameter can also include other data needed for handling the request of data, for example, may include number
According to the address information etc. of the recipient of request.
The processing that the function representation will carry out the parameter.For example, the function may include three elements: definition
Domain, codomain and correspondence rule.Wherein, correspondence rule is the core of function, for identifying the substantive characteristics of functional relation.That is, institute
Stating function can be used to implement specific feature operation.For example, in the application scenarios of chat request, the function can be by
Chat content in the parameter is sent to the application program of second user, and the function can also be the address of verification recipient
Information etc..In addition, the function, which can also be, reads the operation such as data, storing data, in other words, defined function can be passed through
To realize corresponding function.
According to some embodiments of the present disclosure, the method for handling request of data can also include: based on described
The class of request of data is handled the parameter of the request of data according to the function of the request of data.For example, in institute
Stating request of data is in the application scenarios of chat request, and the class can be chat class, and the parameter can be such as that " hello!"
Chat content, the function can send, then, the class requested based on the data, according to the function pair of the request of data
The parameter of the request of data, which carries out processing, may is that the class based on chat, and data content is sent to application program.
Fig. 2 shows the schematic diagrames requested according to the storing data in sequence list of the embodiment of the present disclosure.As described above,
Request of data can be stored in the sequence list in the form of class, parameter and function.
As shown in Fig. 2, can store the currently received request of data 1 from user 1 in the sequence list, and with class
1, the form of function 1 and parameter 1 stores.Then, it can receive the request of data 2 from user 2, and with class 2, function 2 and ginseng
The form of number 2 stores.It is then possible to received request of data is sequentially stored in the sequence list, for example, class 3, letter
Number 3 and parameter 3 and class 4, function 4 and parameter 4, and so on.
For example, in the application scenarios that the request of data is chat request, request of data 1 shown in Figure 2 can
To be chat request 1 that user 1 sends to first server, wherein class 1 is chat class, or referred to as chat-type, parameter 1
Be user 1 need first server send chat content 1 (such as, " hello!"), and the parameter 1 can also include connecing
The address of debit, function 1 are to send.For as described above with class 1, parameter 1, the chat request 1 of the form of function 1, first
Server can " hello by the chat content!" it is sent to the recipient of such as the first user.Request of data 2 in Fig. 2 can
To be chat request 2 that user 2 sends to first server, wherein class 2 is chat class, and parameter 2 is that user 2 needs the first clothes
Being engaged in, (such as, " I is KK to the chat content 2 that device is sent."), and the parameter 2 can also include the address of recipient, function 2
It is to send.For as described above with class 2, parameter 2, the chat request 2 of the form of function 2, first server can will be described
" I is KK to chat content." it is sent to recipient.Other chat requests and 2 class of above-mentioned chat request 1 or chat request in Fig. 2
Seemingly.
In addition, the request of data in the application can also be the other types in addition to class of chatting, for example, message informing class
Equal any types.It for example, can be by the request of data in the case where the class of the request of data is message informing class
Referred to as message informing is requested, wherein the content that the parameter can be message informing (such as, " please updates upgrading as early as possible.") with
And the address information of recipient.The function can be transmission, " please update upgrading as early as possible for realizing by content." be sent to it is all
Such as the recipient of the first user.In addition, requesting for the message informing, the function can also include the ground of verification recipient
Location information.In this example, receive message informing request server can also address information to first user into
Row checking treatment, for example, verify the address information whether necessary being.
It should be noted that the first server is receiving chatting for the first user according in disclosed method
After its request, step S101 can be carried out first, i.e., the chat content in chat request is sent to the first of second user
Then application program carries out step S102 again, i.e., store chat request in lists in the form of class, parameter, function.Or
Person, the first server can also first carry out step S102, by the chat request received in the form of class, parameter, function
Storage in lists, then carries out step S101 again, i.e., the chat content in chat request is sent to the first of second user
Chat content is sent to first application program for example, the chat class can be based on as described above by application program.
Alternatively, the first server can also carry out the step S101 and S102 simultaneously.That is, the first server is about step
The execution sequence of S101 and S102 does not constitute the limitation for the disclosure.
As shown in Figure 1, the method for handling request of data may be used also after by request of data storage in lists
To include step S103, the request of data in list is sent to second server by first server.For example, the data are asked
It asks and second server is sent to by first server in the form of class, parameter, function.According to the embodiment of the present disclosure, the data
Data content in request can be sent to the second application program via second server.
For example, in the application scenarios that the request of data is chat request, the first server be can be merely
Its server, can receive from the first application program (such as game aid application program) of the first user includes chat content
Chat request.After receiving the chat request, the chat content can be transmitted to second by the chat server
The first application program (such as game aid application program) of user.Then, the chat server can be used to described first
First application program at family returns to the transmission of the chat request as a result, for example sending successfully, is used to indicate the chat content
It has been successfully sent to the first application program of the second user.
Then, the chat server can will be stored in sequence with the chat request in the form of class, function, parameter
In list (or referred to as sequential queue).Specifically, the class of the chat request is chat class, function is to send, and parameter can be with
It is that chat content " is very glad and your successful match, my game ID is Jeason, welcomes to that me is looked for play.".In addition, the ginseng
Number can also include the address information of the recipient of chat content, for example, the address information etc. of second user.Wherein, described to deposit
The second application program that the chat content in the chat request in sequence list is used to be sent to the second user is stored up, it is all
Such as small routine.
Then, the chat request stored in sequence list for example can be sequentially sent to second service by chat server
Device.In the case where second application program is small routine, the second server can be small routine server.Such as,
The chat request of storage is sent to small routine server by chat server in the form of class, parameter, function.For example, described chat
The chat request stored in the sequence list can be sent to the small routine in a manner of timed task and taken by its server
Business device.In addition, the chat server can also in other manners send out the request of data stored in the sequence list
Small routine server is given, for example, this is not restricted with the transmission of aperiodic method.Then, by small routine server come pair
Received chat request is handled, and the processing can be the class based on the chat request, according to the chat request
Function handles the parameter of the chat request.The small routine server as second server asks the chat
The processing asked is similar with processing of the chat server as first server to the chat request, and details are not described herein.Example
Such as, the chat content in the chat request " is very glad and your successful match, my game ID is by the small routine server
Jeason welcomes to that me is looked for play." it is sent to the small routine of second user.
According to the embodiment of the present disclosure, the method for handling request of data can also include by first server and
Two servers respectively carry out logical process to the request of data, operation needed for can be the processing request of data.
For example, the logical process can be format conversion, i.e., the data content in request of data is converted into recipient and supported
Format, can also be safety check, that is, whether determine in the data content comprising sensitive word.The chat server and small
Program servers can carry out logical process as described above to the chat request respectively according to actual needs.
According to the embodiment of the present disclosure, the method for handling request of data can also include by the number in request of data
The second application program of first equipment is sent to according to content.For example, also there are the feelings of the second application program in the first user
Under condition, the chat content in the chat request can also be sent to the first use by such as small routine, the small routine server
The small routine at family, so that the first user can also view its chat sent in the first application program in small routine
Content.
In addition, the method for handling request of data according to the disclosure can also be according to the request of data in sequence list
Quantity increase or reduce the number of first server and second server.For example, the request of data in sequence list
A fairly large number of situation under, the number of first server and second server can be increased, suitably to handle more quickly
Request of data in sequence list, thereby guarantees that the scalability of data request processing, while also saving the cost of hardware.
In method for handling request of data shown in FIG. 1 according to the embodiment of the present disclosure, first server is returned
Back to the transmission result and second server progress asynchronous for the processing of the request of data of the first user.Citing comes
It says, the chat server will be sent to the of second user from the received chat request of the first application program of the first user
After one application program, i.e., to the first user return send as a result, and and be not to wait for small routine server for the chat request
Processing operation, in other words, the chat server can be different with processing of the small routine server for the chat request
Step carries out, this is beneficial to be avoided the above-mentioned delay issue during data request processing.
Fig. 3 shows the schematic diagram of the framework of the processing chat request according to the embodiment of the present disclosure, and Fig. 4 is shown according to this
The logical flow chart of the processing chat request of open embodiment.Hereinafter, will be in conjunction with Fig. 3 and Fig. 4, to according to the embodiment of the present disclosure
Method for handling request of data is described in detail.It should be noted that institute by taking chat request as an example in Fig. 3 and Fig. 4
The method of stating is illustrated, and the request of data can also be message informing, activity description push, information show etc. it is any other
The request of data of type.
As shown in figure 3, the first user can take in the game aid application program as the first application program to chat
Business device sends the chat request for being directed to second user.It should be noted that the first user can also in game application or
The chat request is sent in other applications, herein only showing using game aid application program as the first application program
Example.
After the chat request that chat server receives that the first user is sent by game aid application program, Ke Yizhi
Chat content in chat request is sent to the game aid application program of second user by ground connection, is then returned to the first user
It sends as a result, with the transmission state of the first user of informing chat request, for example, sending successfully.
The chat request is also stored in sequence list by chat server in the form of class, function and parameter.It is described
Sequence list can store in the chat server, can also be stored in the equipment independently of chat server, herein
With no restriction.
Then, the chat request in sequence list can be sent to the small routine clothes corresponding to small routine by chat server
It is engaged in device, and the chat content in the chat request is sent to by the small routine server small routine of second user.
Specifically, as shown in figure 4, the first user can send chat request in game aid application program, and by chatting
Its server receives the chat request.
The chat server can first carry out the chat request a series of after receiving the chat request
Logical process, for example, it may be the format conversion of chat content as described above, judge chat content sensibility etc. and handling.
Then, chat server can send the chat content in the chat request to the game aid application program of second user
In, allow second user to view the chat content in the chat request in its game aid application program.Then,
Chat server can will send result and return to the first user, such as the first application program of the first user.
As described above, the chat server sends the transmission result to the first user and small routine server will be described
Chat request is sent to the asynchronous progress of small routine.In other words, the chat server of stating is without waiting for small routine server
Processing result and directly to the first user return send result.It is described to chat after sending the transmission result to the first user
Its server can carry out subsequent processing operation, that is, the chat server asks the chat with small routine server
The processing asked asynchronous can carry out.
The information for corresponding to the chat request is also stored in sequence list by chat server.Then, chatting service
Chat request in sequence list sequentially can be sent to small routine server by device, for example, the transmission of the chat request
Operation can be realized by way of timed task, that is, chat server periodically sends out the chat request in sequence list
Give the small routine server.According to the embodiment of the present disclosure, can be deposited in sequence list in the form of class, function and parameter
Store up the chat request.
The small routine server can also carry out a series of above-mentioned logical process to the chat request, and described will chat
Chat content in its request is sent to the small routine of second user.So that second user can also be looked into small routine
See the chat content, that is, for second user, the chat content viewed in game aid application program and small routine
It is consistent.In addition, in the case where the first user also has the second application program of such as small routine, the small routine service
Chat content in the chat request can also be sent to the small routine of the second user by device.
As a result, due to the return of the transmission result for the first application program and the data content quilt in the request of data
It is sent to the asynchronous progress of the second application program, to be avoided that processing delay issue as described above.
May be implemented no matter user from the interface of which application program, looks into according to the method for the processing request of data of the disclosure
The chat content seen all is consistent, without switching between multiple application programs.Fig. 5 is shown according to the embodiment of the present disclosure
Application program chat interface schematic diagram, chat interface illustrated in fig. 5 can be the small routine client by second user
Hold the chat list of display.Wherein, first chat content be " be very glad and your successful match, my game ID is Jeason,
Welcome to that me is looked for play.".This chat content can be the first user and be sent to second user by small routine.Article 2
Chat content is " to be very glad and your successful match, my game ID is Jeason, welcomes to that me is looked for play.", it can also be at this
There is " from game " remarks below chat content, for indicating that this chat content is that the first user passes through game application hair
Give second user.Article 3 chat content is " to be very glad and your successful match, my game ID is Jeason, is welcomed to
Me is looked for play.", and remarks have " from game aid ", for indicating that this chat content is the first user below the message
Second user is sent to by game aid application program.
During the data request processing shown in figs. 3 and 4, chat request is being transmitted to second by chat server
After the first application program of user, it can will directly send result and return to the first user, without waiting small routine service
The processing result of device, in other words, chat server complete the processing of the chat request after returning to transmission result.
Then, the chat request being stored in sequence list can be sent to small routine server by chat server, to pass through little Cheng
Sequence server handles the chat request, such as the chat content in chat request is sent to the little Cheng of second user
Sequence.
According to the method for handling request of data of the disclosure, will be applied from the first of the first equipment by first server
Data content in the received request of data of program is sent to the first application program of the second equipment, and will directly send result
Return to the first application program of the first equipment.And by first server by the request of data with the shape of class, parameter and function
Formula is stored in sequence list, and then, the request of data in sequence list can also be sent to second service by first server
Device, and the data content in request of data is sent to by second server the second application program of second user.Wherein, described
The return and the data content in the request of data for sending result are sent to the asynchronous progress of the second application program.
It is stored and request of data phase according to the method for handling request of data of the disclosure by the build order list
Then information in sequence list can be sent to second server, so that first server and second by the information of pass
Processing between server asynchronously carries out, block to avoid synchronizing information, forwarding and so on.For example, can be to avoid
In the biggish situation of data volume from game aid application program or the chat request of game application, it may go out
The phenomenon that processing such as existing synchronizing information, forwarding are blocked and information delay resulting from, entanglement even result in entire chat
Unavailable equal problem of its service, this guarantees the treatment process of game application and game aid application program not by
The influence of third party's interactive operation (for example, chatting operation of small routine), ensures the high efficiency and reliability of whole system.
According to another aspect of the present disclosure, it additionally provides a kind of for handling the server of request of data.Fig. 6 shows root
According to the schematic block diagram of the server for handling request of data of the embodiment of the present disclosure.
As shown in fig. 6, the server 1000 for handling request of data may include processing unit 1010 and storage
Unit 1020.
The processing unit 1010 can be configured to for request of data to be sent to the first application program, and return to the data
The transmission result of request.The storage unit 1020 is configured to store the request of data in lists, so that the number
The second application program is sent to according to the data content in request;Wherein, the return and the request of data for sending result
In data content be sent to the asynchronous progress of the second application program.
According to some embodiments of the present disclosure, the storage unit 1020 is by the request of data with class, parameter and function
Form storage in lists, wherein the class indicates the type of request of data, and the parameter list shows the data in request of data
Content, the processing that the function representation will carry out the parameter.
According to some embodiments of the present disclosure, the processing unit 1010 is configured to the class requested based on the data,
The parameter of the request of data is handled according to the function of the request of data.
According to some embodiments of the present disclosure, the processing unit 1010 is configured to send the request of data in list
To another server.
According to some embodiments of the present disclosure, the server can also include receiving unit (not shown), be configured to from
First application program of the first equipment receives request of data.The processing unit 1010 sends the data content in request of data
To the first application program of the second equipment, and return to the first application program of first equipment transmission of the request of data
As a result, wherein the data content being stored in the request of data of list applies journey for being sent to the second of second equipment
Sequence.
According to some embodiments of the present disclosure, the processing unit 1010 is configured to the data content in request of data
It is sent to the second application program of first equipment.
According to the another aspect of the disclosure, additionally provide a kind of for handling the device of request of data.Fig. 7 shows basis
The schematic diagram of the device 2000 for handling request of data of the embodiment of the present disclosure.
As shown in fig. 7, described device 2000 may include one or more processors 2010, and one or more memories
2020.Wherein, computer-readable code is stored in the memory 2020, the computer-readable code is when by one
Or multiple processors 2010 can execute the method as described above for handling request of data when running.
According to the method or apparatus of the embodiment of the present disclosure can also by means of it is shown in Fig. 8 calculate equipment 3000 framework come
It realizes.As shown in figure 8, calculating equipment 3000 may include bus 3010, one or more CPU3020, read-only memory (ROM)
3030, random access memory (RAM) 3040, the communication port 3050 for being connected to network, input output assembly 3060, hard disk
3070 etc..The storage equipment in equipment 3000 is calculated, such as ROM 3030 or hard disk 3070 can store the use of disclosure offer
The program performed by the processing of the method for processing request of data and/or the various data that use of communication or file and CPU refers to
It enables.Calculating equipment 3000 can also include user interface 3080.Certainly, framework shown in Fig. 8 is only exemplary, and is being realized not
With equipment when, according to actual needs, it is convenient to omit one or more components in calculating equipment shown in Fig. 8.
According to the another aspect of the disclosure, a kind of computer readable storage medium is additionally provided.Fig. 9 is shown according to this public affairs
The schematic diagram 4000 for the storage medium opened.
As shown in figure 9, being stored with computer-readable instruction 4010 in the computer storage medium 4020.When the calculating
When machine readable instruction 4010 is run by processor, it can execute and be used for referring to what the figures above described according to the embodiment of the present disclosure
The method for handling request of data.The computer readable storage medium includes but is not limited to such as volatile memory and/or non-
Volatile memory.The volatile memory for example may include random access memory (RAM) and/or caches
Device (cache) etc..The nonvolatile memory for example may include read-only memory (ROM), hard disk, flash memory etc..
It will be appreciated by those skilled in the art that a variety of variations and modifications can occur in content disclosed by the disclosure.For example,
Various equipment described above or component can also pass through one in software, firmware or three by hardware realization
A little or whole combinations is realized.
In addition, although the disclosure is made that various references to certain units in system according to an embodiment of the present disclosure,
However, any amount of different units can be used and be operated on client and/or server.The unit is only explanation
Property, and different units can be used in the different aspect of the system and method.
Those of ordinary skill in the art will appreciate that all or part of step in the above method can be referred to by program
Related hardware is enabled to complete, described program can store in computer readable storage medium, such as read-only memory, disk or CD
Deng.Optionally, one or more integrated circuits can be used also to realize in all or part of the steps of above-described embodiment.Accordingly
Ground, each module/unit in above-described embodiment can take the form of hardware realization, can also use the shape of software function module
Formula is realized.The disclosure is not restricted to the combination of the hardware and software of any particular form.
Unless otherwise defined, all terms (including technical and scientific term) used herein have leads with belonging to the disclosure
The identical meanings that the those of ordinary skill in domain is commonly understood by.It is also understood that those of definition term such as in usual dictionary
The meaning consistent with their meanings in the context of the relevant technologies should be interpreted as having, without application idealization or
The meaning of extremely formalization explains, unless being clearly defined herein.
It is illustrative of the present disclosure above, and is not considered as limitation ot it.Notwithstanding the several of the disclosure
Exemplary embodiment, but those skilled in the art will readily appreciate that, before without departing substantially from the teaching of the disclosure and advantage
Many modifications can be carried out to exemplary embodiment by putting.Therefore, all such modifications are intended to be included in claims institute
Within the scope of the disclosure of restriction.It should be appreciated that being illustrative of the present disclosure above, and it should not be considered limited to disclosed spy
Determine embodiment, and the model in the appended claims is intended to encompass to the modification of the disclosed embodiments and other embodiments
In enclosing.The disclosure is limited by claims and its equivalent.
Claims (15)
1. a kind of method for handling request of data, comprising:
Data content in request of data is sent to the first application program, and returns to the transmission result of the request of data;
In lists by request of data storage, so that the data content in the request of data is sent to the second application
Program;
Wherein, it is asynchronous with the data content in the request of data to be sent to the second application program for the return for sending result
It carries out.
2. according to the method described in claim 1, in lists including: by the data by request of data storage wherein
Request is stored in lists in the form of class, parameter and function, wherein the class indicates the type of request of data, the parameter
Indicate the data content in request of data, the processing that the function representation will carry out the parameter.
3. according to the method described in claim 2, further include: the class requested based on the data, according to the request of data
Function handles the parameter of the request of data.
4. according to the method described in claim 1, wherein,
Data content in the request of data is sent to the first application program via first server;And
Data content in the request of data is sent to the second application program via second server.
5. according to the method described in claim 4, further include: the request of data in list is sent to by the first server
The second server.
6. according to the method described in claim 1, further include:
Request of data is received from the first application program of the first equipment, wherein the data content in request of data is sent to the
One application program, and the transmission result for returning to the request of data includes:
Data content in request of data is sent to the first application program of the second equipment, and to the first of first equipment
Application program returns to the transmission result of the request of data;
The data content being stored in the request of data of list is used to be sent to the second application program of second equipment.
7. according to the method described in claim 6, further include:
Data content in request of data is sent to the second application program of first equipment.
8. a kind of for handling the server of request of data, comprising:
Processing unit is configured to for request of data to be sent to the first application program, and returns to the transmission result of the request of data;
With
Storage unit is configured to store the request of data in lists, so that the data content in the request of data
It is sent to the second application program;
Wherein, it is asynchronous with the data content in the request of data to be sent to the second application program for the return for sending result
It carries out.
9. server according to claim 8, wherein the storage unit is by the request of data with class, parameter and letter
Several form storages are in lists, wherein the class indicates the type of request of data, and the parameter list shows the number in request of data
According to content, the function representation will be to the processing of parameter progress.
10. server according to claim 9, the processing unit is configured to the class requested based on the data, presses
The parameter of the request of data is handled according to the function of the request of data.
11. server according to claim 8, the processing unit is configured to for the request of data in list being sent to
Another server.
12. server according to claim 8 further includes receiving unit, it is configured to apply journey from the first of the first equipment
Sequence receives request of data, and the data content in request of data is sent to the first of the second equipment using journey by the processing unit
Sequence, and return to the first application program of first equipment transmission result of the request of data;
Wherein, the data content being stored in the request of data of list applies journey for being sent to the second of second equipment
Sequence.
13. server according to claim 12, the processing unit is configured to the data content in request of data
It is sent to the second application program of first equipment.
14. a kind of for handling the device of request of data, comprising:
One or more processors;With
One or more memories, wherein computer-readable code, the computer-readable code are stored in the memory
When being run by one or more of processors, executes and asked as of any of claims 1-7 for handling data
The method asked.
15. a kind of computer readable storage medium is stored thereon with instruction, described instruction is when being executed by processor, so that institute
It states processor and executes such as the method for any of claims 1-7 for handling request of data.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910369290.XA CN110162415B (en) | 2019-05-05 | 2019-05-05 | Method, server, device and storage medium for processing data request |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910369290.XA CN110162415B (en) | 2019-05-05 | 2019-05-05 | Method, server, device and storage medium for processing data request |
Publications (2)
Publication Number | Publication Date |
---|---|
CN110162415A true CN110162415A (en) | 2019-08-23 |
CN110162415B CN110162415B (en) | 2023-09-01 |
Family
ID=67633703
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910369290.XA Active CN110162415B (en) | 2019-05-05 | 2019-05-05 | Method, server, device and storage medium for processing data request |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN110162415B (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111586128A (en) * | 2020-04-28 | 2020-08-25 | 百度在线网络技术(北京)有限公司 | Method, device and equipment for acquiring applet data and storage medium |
Citations (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2001184292A (en) * | 1999-10-15 | 2001-07-06 | Sony Corp | Device and method for offering service, device and method for processing information, and program storage medium |
US6535929B1 (en) * | 1996-07-02 | 2003-03-18 | Sun Microsystems, Inc. | Universal communication mechanism for applications running in a multitasking environment |
CN103118077A (en) * | 2013-01-15 | 2013-05-22 | 百度在线网络技术(北京)有限公司 | Cross equipment content transmission method, system and client-side |
US20140143832A1 (en) * | 2012-11-16 | 2014-05-22 | Nintendo Co., Ltd. | Information processing system, information processing apparatus, storage medium and information processing method |
CN103973545A (en) * | 2014-04-22 | 2014-08-06 | 腾讯科技(深圳)有限公司 | Processing method, device and system of instant message |
CN107133112A (en) * | 2017-04-28 | 2017-09-05 | 维沃移动通信有限公司 | A kind of asynchronous process fsync method and mobile terminal |
CN107528885A (en) * | 2017-07-17 | 2017-12-29 | 阿里巴巴集团控股有限公司 | A kind of service request processing method and device |
CN108259479A (en) * | 2017-12-28 | 2018-07-06 | 广州启生信息技术有限公司 | Business data processing method, client and computer readable storage medium |
US20190102305A1 (en) * | 2016-12-21 | 2019-04-04 | EMC IP Holding Company LLC | Method and electronic device for accessing data |
-
2019
- 2019-05-05 CN CN201910369290.XA patent/CN110162415B/en active Active
Patent Citations (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6535929B1 (en) * | 1996-07-02 | 2003-03-18 | Sun Microsystems, Inc. | Universal communication mechanism for applications running in a multitasking environment |
JP2001184292A (en) * | 1999-10-15 | 2001-07-06 | Sony Corp | Device and method for offering service, device and method for processing information, and program storage medium |
US20140143832A1 (en) * | 2012-11-16 | 2014-05-22 | Nintendo Co., Ltd. | Information processing system, information processing apparatus, storage medium and information processing method |
CN103118077A (en) * | 2013-01-15 | 2013-05-22 | 百度在线网络技术(北京)有限公司 | Cross equipment content transmission method, system and client-side |
CN103973545A (en) * | 2014-04-22 | 2014-08-06 | 腾讯科技(深圳)有限公司 | Processing method, device and system of instant message |
US20190102305A1 (en) * | 2016-12-21 | 2019-04-04 | EMC IP Holding Company LLC | Method and electronic device for accessing data |
CN107133112A (en) * | 2017-04-28 | 2017-09-05 | 维沃移动通信有限公司 | A kind of asynchronous process fsync method and mobile terminal |
CN107528885A (en) * | 2017-07-17 | 2017-12-29 | 阿里巴巴集团控股有限公司 | A kind of service request processing method and device |
CN108259479A (en) * | 2017-12-28 | 2018-07-06 | 广州启生信息技术有限公司 | Business data processing method, client and computer readable storage medium |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111586128A (en) * | 2020-04-28 | 2020-08-25 | 百度在线网络技术(北京)有限公司 | Method, device and equipment for acquiring applet data and storage medium |
CN111586128B (en) * | 2020-04-28 | 2023-06-09 | 百度在线网络技术(北京)有限公司 | Method, device, equipment and storage medium for acquiring applet data |
US11677838B2 (en) | 2020-04-28 | 2023-06-13 | Baidu Online Network Technology (Beijing) Co., Ltd. | Acquisition method, apparatus, device and storage medium for applet data |
Also Published As
Publication number | Publication date |
---|---|
CN110162415B (en) | 2023-09-01 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN106899680B (en) | The fragment treating method and apparatus of multi-tiling chain | |
US11409719B2 (en) | Co-locating microservice persistence containers within tenant-specific database | |
CN109395400B (en) | Cross-game chat information processing method and device, electronic equipment and storage medium | |
CN106850746B (en) | The method and device of smooth service upgrading | |
CN104598257B (en) | The method and apparatus of remote application operation | |
CN105550576B (en) | The method and apparatus communicated between container | |
CN108304247A (en) | The method and apparatus of access camera, server, readable storage medium storing program for executing | |
CN106385329B (en) | Processing method, device and the equipment of resource pool | |
CN106663033B (en) | System and method for supporting a wraparound domain and proxy model and updating service information for cross-domain messaging in a transactional middleware machine environment | |
CN105208047B (en) | Inserting method and server on distribution system services device | |
CN107547250A (en) | The method and apparatus that database is disposed in cloud computing management platform | |
CN109076024A (en) | data control method and terminal device | |
CN108365961A (en) | The response method and server that interface call method and terminal device, interface call | |
CN109634720B (en) | Method, system and device for sharing FPGA (field programmable Gate array) board card by multiple virtual machines | |
CN108933829A (en) | A kind of load-balancing method and device | |
CN105681426B (en) | Heterogeneous system | |
CN104601666B (en) | Log services method and cloud platform | |
CN105095220B (en) | A kind of browser implementation method, terminal and virtualization agent device | |
WO2021051881A1 (en) | Vpp cluster management method and device, computer device and storage medium | |
CN107480117A (en) | Automate the restoration methods and device of page table list data | |
CN109819023A (en) | Distributed transaction processing method and Related product | |
CN108829402A (en) | The more extractions of root and system of application program, storage medium and processor | |
CN103561089B (en) | Virtual machine desktop log-in, Apparatus and system | |
CN107888663A (en) | A kind of method of distribution of document, equipment and computer-readable medium | |
CN105119944B (en) | Application starting method and related 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 | ||
GR01 | Patent grant | ||
GR01 | Patent grant |