CN111355784A - Method, device, medium and electronic equipment for processing request information - Google Patents

Method, device, medium and electronic equipment for processing request information Download PDF

Info

Publication number
CN111355784A
CN111355784A CN202010104015.8A CN202010104015A CN111355784A CN 111355784 A CN111355784 A CN 111355784A CN 202010104015 A CN202010104015 A CN 202010104015A CN 111355784 A CN111355784 A CN 111355784A
Authority
CN
China
Prior art keywords
request
information
merging
rule
request information
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
CN202010104015.8A
Other languages
Chinese (zh)
Other versions
CN111355784B (en
Inventor
邬亮
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing ByteDance Network Technology Co Ltd
Original Assignee
Beijing ByteDance Network Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing ByteDance Network Technology Co Ltd filed Critical Beijing ByteDance Network Technology Co Ltd
Priority to CN202010104015.8A priority Critical patent/CN111355784B/en
Publication of CN111355784A publication Critical patent/CN111355784A/en
Application granted granted Critical
Publication of CN111355784B publication Critical patent/CN111355784B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

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
    • H04L67/63Routing a service request depending on the request content or context
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/66Arrangements for connecting between networks having differing types of switching systems, e.g. gateways

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The disclosure provides a method, an apparatus, a medium and an electronic device for processing request information. The method comprises the following steps: acquiring a plurality of first request messages; the first request information comprises a first request relation which is related to each other; merging the first request information based on a first request data merging rule and a first request relation description rule to generate second request information; and generating a second request message according to the second request message, and sending the second request message to an application program interface gateway of a server. A plurality of sent request messages are reduced to one in one information interaction process, so that the time consumption is effectively reduced, and the user experience is improved; and the load of the API gateway is reduced, and the throughput of the API gateway is improved.

Description

Method, device, medium and electronic equipment for processing request information
Technical Field
The present disclosure relates to the field of computer technologies, and in particular, to a method, an apparatus, a medium, and an electronic device for processing request information.
Background
An application program generally consists of a client and a server. The client sends a request to the server; the server acquires data from the database after receiving the request, processes the data and returns the processed data to the client; and the client updates the user interface according to the returned data.
Currently, client functionality is becoming more complex, and a user interface may contain multiple modules. In order to obtain data of multiple modules, in one information interaction process, a client needs to send a multi-request message to a server. However, there is a limit to the number of concurrent request messages by the client. When the number of simultaneously transmitted request messages exceeds the limit number, the exceeding request messages are temporarily blocked, and the transmitted request messages are transmitted after being returned. In addition, there may be dependencies between multiple request messages. When the request data of one request message is dependent on the response data of another request message, the request data needs to wait for the other request to return before being sent. That is, the request message for which the dependency exists must be transmitted serially. For a plurality of request messages exceeding the limit of the number of concurrent request messages or having dependency relationship, a plurality of request times need to be consumed, and a plurality of request times also need to be waited for corresponding user interface refreshing. If a plurality of request messages sent during the first screen rendering exceed the limit of the number of concurrent requests or have a dependency relationship, a relatively long screen blank time is caused, and the user experience is seriously damaged. The server generally adopts a micro-service architecture, that is, the service of the server is composed of a plurality of micro-services with single functions. The micro services provide services to the client through an Application Programming Interface (API) gateway.
The request message sent by the client passes through the API gateway, and the API gateway distributes the request message to each micro service. Because the current hardware function is very strong, the time consumption of reading and writing of the database and the service logic operation is very small. Moreover, the API gateway and the micro-service are usually deployed in the same computer room or a plurality of computer rooms which are relatively close to each other, and the request time from the API gateway to the micro-service is very short. Therefore, the time consuming bottleneck of the request message is mainly focused on the information transfer process between the client and the API gateway.
Disclosure of Invention
This summary is provided to introduce a selection of concepts in a simplified form that are further described below in the detailed description. This summary is not intended to identify key features or essential features of the claimed subject matter, nor is it intended to be used to limit the scope of the claimed subject matter.
An object of the present disclosure is to provide a method, an apparatus, a medium, and an electronic device for processing request information, which can solve at least one of the above-mentioned technical problems. The specific scheme is as follows:
according to a specific implementation manner of the present disclosure, in a first aspect, the present disclosure provides a method for processing request information, which is applied to a client, and includes:
acquiring a plurality of first request messages; the first request information comprises a first request relation which is related to each other;
merging the first request information based on a first request data merging rule and a first request relation description rule to generate second request information;
and generating a second request message according to the second request message, and sending the second request message to an application program interface gateway of a server.
According to a second aspect, the present disclosure provides an apparatus for processing request information, which is applied to a client, and includes:
a first request information acquiring unit, configured to acquire a plurality of first request information; the first request information comprises a first request relation which is related to each other;
a second request information generating unit, configured to merge the first request information based on the first request data merging rule and the first request relationship description rule, and generate second request information;
and the second request message generating unit is used for generating a second request message according to the second request message and sending the second request message to an application program interface gateway of the server.
According to a third aspect of the present disclosure, there is provided a method for processing request information, which is applied to an application program interface gateway of a server, and includes:
receiving a second request message;
analyzing the second request message based on a first request data merging rule and a first request relation description rule to acquire a plurality of first request messages and a plurality of first request relations;
analyzing each first request message to obtain corresponding application program microservices;
and sending corresponding first request information to the application program micro-service according to the first request relation sequence.
According to a fourth aspect of the present disclosure, an apparatus for processing request information is applied to an application program interface gateway of a server, including:
a second request message receiving unit, configured to receive a second request message;
a second request message analyzing unit, configured to analyze the second request message based on the first request data merge rule and the first request relationship description rule, and obtain a plurality of pieces of first request information and a plurality of first request relationships;
the acquisition application program micro-service unit is used for analyzing each piece of first request information and acquiring corresponding application program micro-service;
and the first request information sending unit is used for sending corresponding first request information to the application program microservices according to the first request relation sequence.
According to a fifth aspect, there is provided a computer readable storage medium having stored thereon a computer program which, when executed by a processor, implements the method of processing request information according to any one of the first aspect. According to a sixth aspect thereof, the present disclosure provides an electronic device, comprising: one or more processors; storage means for storing one or more programs which, when executed by the one or more processors, cause the one or more processors to carry out the method of processing request information according to any one of the first aspect.
According to a seventh aspect, there is provided a computer readable storage medium having stored thereon a computer program which, when executed by a processor, implements the method of processing request information according to any one of the third aspects.
According to an eighth aspect thereof, the present disclosure provides an electronic device, comprising: one or more processors; storage means for storing one or more programs which, when executed by the one or more processors, cause the one or more processors to implement the method of processing request information according to any one of the third aspects.
Compared with the prior art, the scheme of the embodiment of the disclosure at least has the following beneficial effects:
the disclosure provides a method, an apparatus, a medium and an electronic device for processing request information. A plurality of sent request messages are reduced to one in one information interaction process, so that the time consumption is effectively reduced, and the user experience is improved; and the load of the API gateway is reduced, and the throughput of the API gateway is improved.
Drawings
The above and other features, advantages and aspects of various embodiments of the present disclosure will become more apparent by referring to the following detailed description when taken in conjunction with the accompanying drawings. Throughout the drawings, the same or similar reference numbers refer to the same or similar elements. It should be understood that the drawings are schematic and that elements and features are not necessarily drawn to scale. In the drawings:
FIG. 1 shows a flow diagram of a method of processing request information according to an embodiment of the disclosure;
FIG. 2 illustrates a time diagram of a method of processing request information according to an embodiment of the disclosure;
FIG. 3 illustrates a first consolidated request information of a method of processing request information according to an embodiment of the present disclosure;
FIG. 4 illustrates first consolidated request relationship information for a method of processing request information according to an embodiment of the present disclosure;
fig. 5 illustrates second request information of a method of processing request information according to an embodiment of the present disclosure;
FIG. 6 illustrates a first response structure of a method of processing request information according to an embodiment of the disclosure;
FIG. 7 illustrates a block diagram of elements of an apparatus for processing request information, in accordance with an embodiment of the present disclosure;
FIG. 8 shows a flow diagram of a method of processing request information according to an embodiment of the disclosure;
FIG. 9 illustrates a block diagram of elements of an apparatus for processing request information according to an embodiment of the disclosure;
fig. 10 shows an electronic device connection structure schematic according to an embodiment of the present disclosure.
Detailed Description
Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While certain embodiments of the present disclosure are shown in the drawings, it is to be understood that the present disclosure may be embodied in various forms and should not be construed as limited to the embodiments set forth herein, but rather are provided for a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the disclosure are for illustration purposes only and are not intended to limit the scope of the disclosure.
It should be understood that the various steps recited in the method embodiments of the present disclosure may be performed in a different order, and/or performed in parallel. Moreover, method embodiments may include additional steps and/or omit performing the illustrated steps. The scope of the present disclosure is not limited in this respect.
The term "include" and variations thereof as used herein are open-ended, i.e., "including but not limited to". The term "based on" is "based, at least in part, on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". Relevant definitions for other terms will be given in the following description.
It should be noted that the terms "first", "second", and the like in the present disclosure are only used for distinguishing different devices, modules or units, and are not used for limiting the order or interdependence relationship of the functions performed by the devices, modules or units.
It is noted that references to "a", "an", and "the" modifications in this disclosure are intended to be illustrative rather than limiting, and that those skilled in the art will recognize that "one or more" may be used unless the context clearly dictates otherwise.
The names of messages or information exchanged between devices in the embodiments of the present disclosure are for illustrative purposes only, and are not intended to limit the scope of the messages or information.
Alternative embodiments of the present disclosure are described in detail below with reference to the accompanying drawings.
A first embodiment, namely, an embodiment of a method for processing request information, is provided for the present disclosure. The method is applied to the client.
The embodiments of the present disclosure will be described in detail below with reference to fig. 1 to 6. Please refer to fig. 1.
Step S101, a plurality of first request messages are acquired.
In general, multiple modules may be included in a user interface. In order to obtain data of multiple modules, in one information interaction process, a client needs to send multiple request messages to a server. And the content of each first request message may be different. The first request information comprises first request relations which are related mutually. Such as a series relationship or a dependency relationship.
Step S102, merging the first request information based on the first request data merging rule and the first request relation description rule, and generating second request information.
In order that a client combines a plurality of request messages into one request message in one information interaction process and an API gateway associated with a server can analyze the request message, the embodiment of the present disclosure designs a first request data combination rule and a first request relationship description rule in advance.
The first request data merging rule is used for defining a rule that the second request information describes the request data of the plurality of first request information in one information interaction process.
Since the client needs to send multiple request messages to the server, there may be a dependency relationship between the multiple request messages. When the request data of one request message is dependent on the response data of another request message, the request data needs to wait for the other request to return before being sent. Therefore, the embodiment of the present disclosure designs the first request relationship description rule in advance for the first request relationship. The first request relation description rule is used for defining a rule that the second request information describes a plurality of first request relations in one information interaction process.
The merging the first request information based on the first request data merging rule and the first request relation description rule to generate second request information comprises the following steps:
step S102-1, merging the first request information according to the first request data merging rule to generate first merging request information.
The first request information includes information described by a first request map data structure.
The first request mapping data structure includes a first request name and a first request structure.
The first request structure includes a first request method and a first request path. For example, the first request name is "api 1", and the first request structure is "{ method: 'POST', path: '/api _ path' }.
Further, the merging the first request information according to the first request data merging rule to generate first merged request information includes the following steps:
step S102-1-1, merging the first request mapping data structure according to the first request data merging rule to generate first merging request information.
Referring to fig. 3, the first merge request information includes a plurality of serially arranged information described by the first request map data structure.
Step S102-2, merging the first request relation according to the first request relation description rule to generate first merging request relation information.
The first request relationship includes information described by a first request relationship structure.
A first request relationship structure comprising: the first request pipe, the first request information, and the first request data map.
The first request pipe is a string with the symbol "|" representing a serial relationship and the symbol "" representing a parallel relationship. The pipe must start and end with the symbol "|". For example, "pipeline:'| api1| api2 |'" indicates that requests api1 and api2 are sent in sequence; "pipeline | api1, api2 |'" indicates that api1 and api2 are requested simultaneously; "pipeline:'| api1, api2| api3 |'" indicates that api1 and api2 are requested simultaneously first, and then api3 is requested.
The first request data maps a mapping data structure for describing data dependencies between the first request information.
A first request data map comprising: a first request mapping key and a first request mapping value.
The first request mapping key value is an access path of a dependent field of request data of a dependent request; the first request map value is an access path of a depended field of response data of a depended request, the access path being denoted by the symbol '.' and the request map value is a value of a dependency field of the depended request. For example, "{ ' api2.cname ': api1.name ' }" indicates that, when the request api2 is sent, "name" in the response data of the request api1 is assigned to the request data "cname" of the request api2.
Further, the merging the first request relationship according to the first request relationship description rule to generate first merged request relationship information includes the following steps:
step S102-2-1, merging the first request relation structure according to the first request relation description rule to generate first merging request relation information.
Referring to fig. 4, the first request relationship information includes information described by a plurality of first request relationship structures arranged in series.
And step S102-3, merging the first merging request information and the first merging request relation information to generate second request information.
The second request message includes a second request merge mapping data structure description message.
The second request merge mapping data structure comprises: the first request map data structure and the first request map data structure name, and the first request relationship structure name.
Referring to FIG. 5, for example, the first request map data structure has the name "reqDataMap"; the name of the first request relationship structure is "apiRelation"; the first request data is mapped to "dataMaps".
Step S103, generating a second request message according to the second request message, and sending the second request message to an application program interface gateway of a server.
A message refers to a way of interacting and communicating between software objects. The request message is a specific message that the sender sends in order to obtain specific data from the responder. Typically, the request message is encapsulated according to a communication protocol in the application environment. For example, in an internet environment, it is encapsulated according to the HTTP protocol.
Referring to FIG. 2, in the prior art, when an information interaction process is completed, the time consumed between a client and a gateway is the sum of t1-1, t1-2, t1-3 and t 1-4; the time required to be consumed between the gateway and the service end is the sum of t2-1, t2-2, t2-3 and t 2-4. The embodiment of the disclosure provides that a plurality of sent request messages are reduced to one in one information interaction process, and the time required to be consumed between a client and a gateway is the sum of t3-1 and t 3-2; the time required to be consumed between the gateway and the service end is the sum of t4-1, t4-2, t4-3 and t 4-4. Time consumption is effectively reduced between the client and the gateway, and user experience is improved; and the load of the API gateway is reduced, and the throughput of the API gateway is improved.
Corresponding to the first embodiment provided by the present disclosure, the present disclosure also provides a second embodiment, that is, an apparatus for processing request information. Since the second embodiment is basically similar to the first embodiment, the description is simple, and the relevant portions should be referred to the corresponding description of the first embodiment. The device embodiments described below are merely illustrative.
Fig. 7 illustrates an embodiment of an apparatus for processing request information provided by the present disclosure. Fig. 7 is a block diagram of units of an apparatus for processing request information according to an embodiment of the present disclosure.
Referring to fig. 7, the present disclosure provides an apparatus for processing request information, applied to a client, including: a unit 701 for acquiring first request information, a unit 702 for generating second request information, and a unit 703 for generating second request information.
A first request information obtaining unit 701, configured to obtain, by a client, a plurality of first request information; the first request information comprises a first request relation which is related to each other;
a second request information generating unit 702, configured to merge the first request information based on the first request data merging rule and the first request relationship description rule, and generate second request information;
a second request message generating unit 703 is configured to generate a second request message according to the second request message, and send the second request message to an application program interface gateway of the server.
Optionally, the unit 702 for generating second request information includes:
a first merge request information generation subunit, configured to merge the first request information according to the first request data merge rule, and generate first merge request information;
a first merge request relationship information generating subunit, configured to merge the first request relationship according to the first request relationship description rule, and generate first merge request relationship information;
and a second request information generating subunit, configured to combine the first combination request information and the first combination request relationship information, and generate second request information.
Optionally, the first request information includes information described by a first request mapping data structure;
in the generating the first merge request information subunit, the method includes:
a merge request data structure subunit, configured to merge the first request map data structure according to the first request data merge rule, and generate first merge request information; the first merge request information includes information described by a plurality of serially arranged first request map data structures.
Optionally, the first request relationship includes information described by a first request relationship structure;
in the generate first merge request relationship information subunit, the method includes:
a merge request relationship structure subunit, configured to merge the first request relationship structure according to the first request relationship description rule, and generate first merge request relationship information; the first merge request relationship information includes information described by a plurality of first request relationship structures arranged in series.
Optionally, the second request information includes information of a second request merge mapping data structure description;
the second request merge mapping data structure comprises: the first request mapping data structure and the name of the first request mapping data structure to which the first request mapping data structure belongs, and the first request relation structure and the name of the first request relation structure to which the first request relation structure belongs.
The embodiment of the disclosure provides that a plurality of sent request messages are reduced to one in one information interaction process, thereby effectively reducing time consumption and improving user experience; and the load of the API gateway is reduced, and the throughput of the API gateway is improved.
In association with the first embodiment provided by the present disclosure, the present disclosure also provides a third embodiment, which is an embodiment of another method of transmitting network data. Before the server side responds to the request message sent by the client side, the application program interface gateway of the server side is required to distribute the request message to the corresponding application program microservice for response processing according to the characteristics of the request message. The method is applied to an application program interface gateway of a server side.
The embodiments of the present disclosure will be described in detail with reference to the drawings, which are shown in fig. 8.
Step S801, a second request message is received.
The second request message is a message of the composite information sent by the client in the first embodiment of the present disclosure.
Step S802, analyzing the second request message based on the first request data merge rule and the first request relationship description rule, and obtaining a plurality of first request messages and a plurality of first request relationships.
The first request data merge rule and the first request relationship description rule are the same rules as the first request data merge rule and the first request relationship description rule in the first embodiment of the present disclosure, so as to analyze the second request message sent by the client according to the same rules.
The first request relationship is a relationship in which first request information is associated with each other. Such as a series relationship or a dependency relationship.
Referring to the first embodiment, the first request relationship includes information described by the first request relationship structure.
A first request relationship structure comprising: the first request pipe, the first request information, and the first request data map.
Since the second request message is obtained by combining the plurality of first request messages according to the plurality of first request relationships, the plurality of first request messages and the plurality of first request relationships that are the same as those in the first embodiment of the present disclosure can be obtained after the second request message is parsed.
Step S803, analyze each first request message, and obtain a corresponding application microservice.
Since each piece of first request information contains information of the accessed application micro-service, analysis of each piece of first request information enables acquisition of the application micro-service corresponding to each piece of first request information. For example, the first request information includes first request method information and first request path information, and the corresponding application microservices can be acquired according to the request method information and the request path information.
Optionally, please refer to the first embodiment, the first request information includes information described by the first request mapping data structure.
The first request mapping data structure includes a first request name and a first request structure.
The first request structure includes a first request method and a first request path.
Step S804, sending corresponding first request information to the application microserver according to the first request relationship sequence.
And the sequence sends corresponding first request information to the application program microserver, namely the corresponding first request information is sent to the server side according to the serial relation or the dependency relation sequence agreed by the first request relation.
Optionally, the method further comprises the following steps:
step S121, sequentially acquiring first response information generated in response to the first request information.
Since the first request information includes the first request relationship related to each other, the first response information also includes the first response relationship related to each other.
The first response information includes information described by the first response mapping data structure.
The first response mapping data structure includes a first response name and a first response structure.
The first response structure includes a first response data name and first response data. Please refer to fig. 6.
The first response relation includes information described by the first response relation structural body.
A first response relation structure comprising: the first response pipeline, the first response information, and the first response data map.
The first response data maps a mapping data structure for describing data dependencies between the first response information.
A first response data map comprising: a first response mapping key value and a first response mapping value.
Step S122, merging the first response information based on the first response data merging rule and the first response relationship description rule, and generating second response information.
The first response data merging rule is used for defining a rule that the second response information describes the response data of the plurality of first response information in one information interaction process. The first response data merge rule and the first response relation description rule are both pre-designed rules. The first response data merge rule may be the same as or different from the first request data merge rule.
The first response relation description rule is used for defining a rule that the second response information describes a plurality of first response relations in the information interaction process. The first response relation description rule may be the same as or different from the first request relation description rule.
The second response information includes information described by a second response merge map data structure.
The second response merge mapping data structure comprises: the first response mapping data structure and the first response mapping data structure, and the first response relationship structure.
The second response merge map data structure may be the same as or different from the second request merge map data structure.
Step S123, generating a second response message according to the second response message, and returning the second response message to the client.
Referring to fig. 2, the embodiment of the present disclosure provides that a plurality of request messages sent in one information interaction process are reduced to one, so that time consumption is effectively reduced, and user experience is improved; and the load of the API gateway is reduced, and the throughput of the API gateway is improved.
Corresponding to the third embodiment provided by the present disclosure, the present disclosure also provides a fourth embodiment, that is, another apparatus for transmitting network data. Since the fourth embodiment is basically similar to the third embodiment, the description is simple, and the related portions should be referred to the corresponding description of the third embodiment. The device embodiments described below are merely illustrative.
Referring to fig. 9, the present disclosure provides another apparatus for transmitting network data, which is applied to an application program interface gateway of a server, including: receive second request message unit 901, parse second request message unit 902, obtain application microservice unit 903, send first request message unit 904.
A receive second request message unit 901, configured to receive a second request message;
an analyze second request message unit 902, configured to analyze the second request message based on the first request data merge rule and the first request relationship description rule, and obtain a plurality of first request messages and a plurality of first request relationships;
an obtain application microservice unit 903, configured to analyze each piece of first request information and obtain a corresponding application microservice;
a send first request information unit 904, configured to send corresponding first request information to the application microservices according to the first request relationship sequence.
Optionally, the apparatus further comprises:
a first response information acquiring unit, configured to sequentially acquire first response information generated in response to the first request information; the first response information comprises a first response relation which is related to each other;
a second response information generating unit, configured to combine the first response information based on the first response data combining rule and the first response relationship description rule, and generate second response information;
and the second response message sending unit is used for generating a second response message according to the second response message and returning the second response message to the client.
Referring to fig. 2, the embodiment of the present disclosure provides that a plurality of request messages sent in one information interaction process are reduced to one, so that time consumption is effectively reduced, and user experience is improved; and the load of the API gateway is reduced, and the throughput of the API gateway is improved.
The present disclosure provides a fifth embodiment, which is an electronic device, configured to perform a method for processing request information, where the electronic device includes: at least one processor; and a memory communicatively coupled to the at least one processor; wherein,
the memory stores instructions executable by the one processor to cause the at least one processor to perform the method of processing request information as described in the first embodiment.
The disclosed embodiments provide a sixth embodiment, which is a computer storage medium for processing request information, the computer storage medium storing computer-executable instructions, the computer-executable instructions being capable of executing the method for processing request information as described in the first embodiment.
The present disclosure provides a seventh embodiment, that is, an electronic device, configured to process request information, where the electronic device includes: at least one processor; and a memory communicatively coupled to the at least one processor; wherein,
the memory stores instructions executable by the one processor to cause the at least one processor to perform the method of processing request information according to the third embodiment.
The present disclosure provides an eighth embodiment, which is a computer storage medium for processing request information, the computer storage medium storing computer-executable instructions, the computer-executable instructions being capable of executing the method for processing request information as described in the third embodiment.
Referring now to fig. 10, there is shown a schematic diagram of an electronic device suitable for use in implementing a fifth or seventh embodiment of the present disclosure. The terminal device in the embodiments of the present disclosure may include, but is not limited to, a mobile terminal such as a mobile phone, a notebook computer, a digital broadcast receiver, a PDA (personal digital assistant), a PAD (tablet computer), a PMP (portable multimedia player), a vehicle terminal (e.g., a car navigation terminal), and the like, and a stationary terminal such as a digital TV, a desktop computer, and the like. The electronic device shown in fig. 10 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present disclosure.
As shown in fig. 10, the electronic apparatus may include a processing device (e.g., a central processing unit, a graphic processor, etc.) 1001 that can perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM)1002 or a program loaded from a storage device 1008 into a Random Access Memory (RAM) 1003. In the RAM 1003, various programs and data necessary for the operation of the electronic apparatus are also stored. The processing device 1001, the ROM 1002, and the RAM 1003 are connected to each other by a bus 1004. An input/output (I/O) interface 1005 is also connected to bus 1004.
Generally, the following devices may be connected to the I/O interface 1005: input devices 1006 including, for example, a touch screen, touch pad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, etc.; an output device 1007 including, for example, a Liquid Crystal Display (LCD), a speaker, a vibrator, and the like; storage devices 1008 including, for example, magnetic tape, hard disk, and the like; and a communication device 1009. The communication apparatus 1009 may allow the electronic device to perform wireless or wired communication with other devices to exchange data. While fig. 10 illustrates an electronic device having various means, it is to be understood that not all illustrated means are required to be implemented or provided. More or fewer devices may alternatively be implemented or provided.
In particular, according to an embodiment of the present disclosure, the processes described above with reference to the flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program carried on a non-transitory computer readable medium, the computer program containing program code for performing the method illustrated by the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network through the communication means 1009, or installed from the storage means 1008, or installed from the ROM 1002. The computer program, when executed by the processing device 1001, performs the above-described functions defined in the methods of the embodiments of the present disclosure.
It should be noted that the computer readable medium in the present disclosure can be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present disclosure, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In contrast, in the present disclosure, a computer readable signal medium may comprise a propagated data signal with computer readable program code embodied therein, either in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: electrical wires, optical cables, RF (radio frequency), etc., or any suitable combination of the foregoing.
In some embodiments, the clients, servers may communicate using any currently known or future developed network protocol, such as HTTP (HyperText transfer protocol), and may be interconnected with any form or medium of digital data communication (e.g., a communications network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), the Internet (e.g., the Internet), and peer-to-peer networks (e.g., ad hoc peer-to-peer networks), as well as any currently known or future developed network.
The computer readable medium may be embodied in the electronic device; or may exist separately without being assembled into the electronic device.
Computer program code for carrying out operations for the present disclosure may be written in any combination of one or more programming languages, including but not limited to an object oriented programming language such as Java, Smalltalk, C + +, and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units described in the embodiments of the present disclosure may be implemented by software or hardware. Where the name of an element does not in some cases constitute a limitation on the element itself.
The functions described herein above may be performed, at least in part, by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field Programmable Gate Arrays (FPGAs), Application Specific Integrated Circuits (ASICs), Application Specific Standard Products (ASSPs), systems on a chip (SOCs), Complex Programmable Logic Devices (CPLDs), and the like.
In the context of this disclosure, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
The foregoing description is only exemplary of the preferred embodiments of the disclosure and is illustrative of the principles of the technology employed. It will be appreciated by those skilled in the art that the scope of the disclosure herein is not limited to the particular combination of features described above, but also encompasses other embodiments in which any combination of the features described above or their equivalents does not depart from the spirit of the disclosure. For example, the above features and (but not limited to) the features disclosed in this disclosure having similar functions are replaced with each other to form the technical solution.
Further, while operations are depicted in a particular order, this should not be understood as requiring that such operations be performed in the particular order shown or in sequential order. Under certain circumstances, multitasking and parallel processing may be advantageous. Likewise, while several specific implementation details are included in the above discussion, these should not be construed as limitations on the scope of the disclosure. Certain features that are described in the context of separate embodiments can also be implemented in combination in a single embodiment. Conversely, various features that are described in the context of a single embodiment can also be implemented in multiple embodiments separately or in any suitable subcombination.
Although the subject matter has been described in language specific to structural features and/or methodological acts, it is to be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or acts described above. Rather, the specific features and acts described above are disclosed as example forms of implementing the claims.

Claims (11)

1. A method for processing request information, which is applied to a client, is characterized by comprising the following steps:
acquiring a plurality of first request messages; the first request information comprises a first request relation which is related to each other;
merging the first request information based on a first request data merging rule and a first request relation description rule to generate second request information;
and generating a second request message according to the second request message, and sending the second request message to an application program interface gateway of a server.
2. The method of claim 1, wherein merging the first request information based on the first request data merging rule and the first request relation description rule to generate second request information comprises:
merging the first request information according to the first request data merging rule to generate first merging request information;
merging the first request relation according to the first request relation description rule to generate first merging request relation information;
and merging the first merging request information and the first merging request relation information to generate second request information.
3. The method of claim 2, wherein the first request information comprises information described by a first request map data structure;
the merging the first request information according to the first request data merging rule to generate first merged request information includes:
merging the first request mapping data structure according to the first request data merging rule to generate first merging request information; the first merge request information includes information described by a plurality of serially arranged first request map data structures.
4. The method of claim 3, wherein the first request relationship comprises information described by a first request relationship structure;
the merging the first request relationship according to the first request relationship description rule to generate first merged request relationship information includes:
merging the first request relation structural body according to the first request relation description rule to generate first merging request relation information; the first merge request relationship information includes information described by a plurality of first request relationship structures arranged in series.
5. The method of claim 4, wherein the second request message includes a second request merge mapping data structure description message;
the second request merge mapping data structure comprises: the first request map data structure and the first request map data structure name, and the first request relationship structure name.
6. An apparatus for processing request information, applied to a client, comprising:
a first request information acquiring unit, configured to acquire a plurality of first request information; the first request information comprises a first request relation which is related to each other;
a second request information generating unit, configured to merge the first request information based on the first request data merging rule and the first request relationship description rule, and generate second request information;
and the second request message generating unit is used for generating a second request message according to the second request message and sending the second request message to an application program interface gateway of the server.
7. A method for processing request information is applied to an application program interface gateway of a server side, and is characterized by comprising the following steps:
receiving a second request message;
analyzing the second request message based on a first request data merging rule and a first request relation description rule to acquire a plurality of first request messages and a plurality of first request relations;
analyzing each first request message to obtain corresponding application program microservices;
and sending corresponding first request information to the application program micro-service according to the first request relation sequence.
8. The method of claim 7, further comprising:
sequentially acquiring first response information generated in response to the first request information; the first response information comprises a first response relation which is related to each other;
merging the first response information based on the first response data merging rule and the first response relation description rule to generate second response information;
and generating a second response message according to the second response message, and returning the second response message to the client.
9. An apparatus for processing request information, applied to an application program interface gateway of a server, comprising:
a second request message receiving unit, configured to receive a second request message;
a second request message analyzing unit, configured to analyze the second request message based on the first request data merge rule and the first request relationship description rule, and obtain a plurality of pieces of first request information and a plurality of first request relationships;
the acquisition application program micro-service unit is used for analyzing each piece of first request information and acquiring corresponding application program micro-service;
and the first request information sending unit is used for sending corresponding first request information to the application program microservices according to the first request relation sequence.
10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the method according to any one of claims 1 to 5, 7 to 8.
11. An electronic device, comprising:
one or more processors;
storage means for storing one or more programs which, when executed by the one or more processors, cause the one or more processors to carry out the method of any one of claims 1 to 5, 7 to 8.
CN202010104015.8A 2020-02-20 2020-02-20 Method, device, medium and electronic equipment for processing request information Active CN111355784B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010104015.8A CN111355784B (en) 2020-02-20 2020-02-20 Method, device, medium and electronic equipment for processing request information

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010104015.8A CN111355784B (en) 2020-02-20 2020-02-20 Method, device, medium and electronic equipment for processing request information

Publications (2)

Publication Number Publication Date
CN111355784A true CN111355784A (en) 2020-06-30
CN111355784B CN111355784B (en) 2022-10-25

Family

ID=71194014

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010104015.8A Active CN111355784B (en) 2020-02-20 2020-02-20 Method, device, medium and electronic equipment for processing request information

Country Status (1)

Country Link
CN (1) CN111355784B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113467909A (en) * 2021-06-29 2021-10-01 北京房江湖科技有限公司 Time consuming method and apparatus for compressing concurrent requests
CN114374650A (en) * 2022-01-05 2022-04-19 北京理房通支付科技有限公司 Notification sending method based on routing middleware, storage medium and electronic equipment

Citations (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6115744A (en) * 1996-07-30 2000-09-05 Bea Systems, Inc. Client object API and gateway to enable OLTP via the internet
US7092399B1 (en) * 2001-10-16 2006-08-15 Cisco Technology, Inc. Redirecting multiple requests received over a connection to multiple servers and merging the responses over the connection
CN101232538A (en) * 2007-12-28 2008-07-30 华为技术有限公司 Apparatus and method for merging business data
CN102081633A (en) * 2009-11-27 2011-06-01 阿里巴巴集团控股有限公司 JavaScript file management method, device and system
CN102546794A (en) * 2011-12-30 2012-07-04 华为技术有限公司 Method for directly communicating browser client with back-end server as well as gateway and communication system
CN103327033A (en) * 2013-07-16 2013-09-25 星云融创(北京)信息技术有限公司 Method and device for improving accessing speed of network resource
US20140108596A1 (en) * 2012-10-17 2014-04-17 Wal-Mart Stores, Inc. Http parallel processing router
CN104346285A (en) * 2013-08-06 2015-02-11 华为技术有限公司 Memory access processing method, device and system
US20150358385A1 (en) * 2014-06-04 2015-12-10 Canon Kabushiki Kaisha Method and device for processing web requests
US10069928B1 (en) * 2015-01-21 2018-09-04 Amazon Technologies, Inc. Translating requests/responses between communication channels having different protocols
US20190191004A1 (en) * 2017-05-23 2019-06-20 Hitachi ,Ltd. System and method to reduce network traffic and load of host servers
CN110032388A (en) * 2019-04-04 2019-07-19 阿里巴巴集团控股有限公司 A kind of building of delta file, publication, method for down loading and device
US10445151B1 (en) * 2016-09-14 2019-10-15 Google Llc Distributed API accounting

Patent Citations (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6115744A (en) * 1996-07-30 2000-09-05 Bea Systems, Inc. Client object API and gateway to enable OLTP via the internet
US7092399B1 (en) * 2001-10-16 2006-08-15 Cisco Technology, Inc. Redirecting multiple requests received over a connection to multiple servers and merging the responses over the connection
CN101232538A (en) * 2007-12-28 2008-07-30 华为技术有限公司 Apparatus and method for merging business data
CN102081633A (en) * 2009-11-27 2011-06-01 阿里巴巴集团控股有限公司 JavaScript file management method, device and system
CN102546794A (en) * 2011-12-30 2012-07-04 华为技术有限公司 Method for directly communicating browser client with back-end server as well as gateway and communication system
US20140108596A1 (en) * 2012-10-17 2014-04-17 Wal-Mart Stores, Inc. Http parallel processing router
CN103327033A (en) * 2013-07-16 2013-09-25 星云融创(北京)信息技术有限公司 Method and device for improving accessing speed of network resource
CN104346285A (en) * 2013-08-06 2015-02-11 华为技术有限公司 Memory access processing method, device and system
US20150358385A1 (en) * 2014-06-04 2015-12-10 Canon Kabushiki Kaisha Method and device for processing web requests
US10069928B1 (en) * 2015-01-21 2018-09-04 Amazon Technologies, Inc. Translating requests/responses between communication channels having different protocols
US10445151B1 (en) * 2016-09-14 2019-10-15 Google Llc Distributed API accounting
US20190191004A1 (en) * 2017-05-23 2019-06-20 Hitachi ,Ltd. System and method to reduce network traffic and load of host servers
CN110032388A (en) * 2019-04-04 2019-07-19 阿里巴巴集团控股有限公司 A kind of building of delta file, publication, method for down loading and device

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
许凯: "《移动边缘计算技术在高铁通信网络中的应用》", 《通讯世界》 *

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113467909A (en) * 2021-06-29 2021-10-01 北京房江湖科技有限公司 Time consuming method and apparatus for compressing concurrent requests
CN113467909B (en) * 2021-06-29 2022-03-15 贝壳找房(北京)科技有限公司 Time consuming method and apparatus for compressing concurrent requests
CN114374650A (en) * 2022-01-05 2022-04-19 北京理房通支付科技有限公司 Notification sending method based on routing middleware, storage medium and electronic equipment
CN114374650B (en) * 2022-01-05 2024-02-13 北京理房通支付科技有限公司 Notification sending method based on routing middleware, storage medium and electronic equipment

Also Published As

Publication number Publication date
CN111355784B (en) 2022-10-25

Similar Documents

Publication Publication Date Title
CN112311656B (en) Message aggregation and display method and device, electronic equipment and computer readable medium
CN111355784B (en) Method, device, medium and electronic equipment for processing request information
CN111881216A (en) Data acquisition method and device based on shared template
CN110377273B (en) Data processing method, device, medium and electronic equipment
CN111858381A (en) Application program fault tolerance capability test method, electronic device and medium
CN113126985A (en) Method, device, electronic equipment and computer readable medium for page rendering
CN112181733A (en) Service request processing method, device, equipment and storage medium
CN111752644A (en) Interface simulation method, device, equipment and storage medium
CN112418389A (en) Data processing method and device, electronic equipment and computer readable storage medium
CN115102992A (en) Data distribution method and device, electronic equipment and computer readable medium
CN112230986A (en) Project file generation method and device, electronic equipment and computer readable medium
CN112100205A (en) Data processing method, device, equipment and computer readable medium
CN111580890A (en) Method, apparatus, electronic device, and computer-readable medium for processing features
CN110730251A (en) Method, device, medium and electronic equipment for analyzing domain name
CN115994120B (en) Data file merging method, device, electronic equipment and computer readable medium
CN116755889B (en) Data acceleration method, device and equipment applied to server cluster data interaction
CN111294611B (en) Video insertion method and device, electronic equipment and computer readable storage medium
CN113472565B (en) Method, apparatus, device and computer readable medium for expanding server function
CN111324512B (en) Method, apparatus, electronic device, and computer-readable medium for generating text
CN115550160A (en) Configuration information sending method, configuration information updating method and service request processing method
CN113721833A (en) Method for storing information, method, device, equipment and medium for acquiring information
CN112596753A (en) Dependency package installation method and device, electronic equipment and computer readable medium
CN115412538A (en) Network request information processing method, device, equipment and storage medium
CN114816396A (en) UI component library calling method and device, electronic equipment and computer readable medium
CN118069758A (en) Distributed database data changing method and device, electronic equipment and medium

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