CN113608994A - Request processing method and system - Google Patents

Request processing method and system Download PDF

Info

Publication number
CN113608994A
CN113608994A CN202110737911.2A CN202110737911A CN113608994A CN 113608994 A CN113608994 A CN 113608994A CN 202110737911 A CN202110737911 A CN 202110737911A CN 113608994 A CN113608994 A CN 113608994A
Authority
CN
China
Prior art keywords
target
environment
test environment
client
identifier
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.)
Pending
Application number
CN202110737911.2A
Other languages
Chinese (zh)
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.)
Tianjin May 8th Home Freight Service Co ltd
Original Assignee
Tianjin May 8th Home Freight Service 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 Tianjin May 8th Home Freight Service Co ltd filed Critical Tianjin May 8th Home Freight Service Co ltd
Priority to CN202110737911.2A priority Critical patent/CN113608994A/en
Publication of CN113608994A publication Critical patent/CN113608994A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3696Methods or tools to render software testable
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/34Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment
    • G06F11/3409Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment for performance assessment
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • 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
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer And Data Communications (AREA)

Abstract

The embodiment of the application provides a request processing method and a request processing system. The gateway receives an environment acquisition request sent by a target client; searching a target test environment identifier corresponding to the target client address in the environment acquisition request; combining the target test environment identifier with the environment acquisition request to obtain a second environment acquisition request; based on the target test environment identification, sending the second environment acquisition request to a corresponding target server so that the target server can return a corresponding target test environment based on the second environment acquisition request; providing the target test environment to the target client. According to the technical scheme, the corresponding test environment identification can be determined in the gateway based on the client address, so that the target test environment identification is sent to the corresponding target server, and the test efficiency is improved.

Description

Request processing method and system
Technical Field
The embodiment of the application relates to the technical field of data processing, in particular to a request processing method and system.
Background
In the process of program development, an internet company tests functions contained in a program before the program is online, a user (the user herein refers to a tester performing the test) deploys test environments in at least one server respectively, the test environments refer to hardware configurations for testing the program functions, such as a processor, and software configurations, such as an operating system and interface information of a database, so as to obtain data of the database required for the test, wherein the hardware configurations can be simulated by using a software tool, therefore, the test environments can be stored in the servers, each test environment sets a test environment domain name according to the server where the test environment is located, and a client can send an environment request to a corresponding server by receiving the test environment domain name input by the user, so as to request the corresponding test environment from the server, in order to test the corresponding function.
When the required testing environment changes, the user needs to modify the corresponding testing environment domain name at the corresponding position of the client, the operation is complicated, and the client and the server are responsible for different personnel, so the personnel at the server end need to inform the client personnel of the corresponding interface information of the testing environment domain name after the change, a large amount of communication cost is wasted, and the testing efficiency is low.
Disclosure of Invention
The embodiment of the application provides a request processing method and system, which are used for solving the problems of complex operation and low test efficiency in the process of replacing a test environment in the prior art.
In a first aspect, an embodiment of the present application provides a request processing method, applied to a gateway, including:
receiving a first environment acquisition request sent by a target client;
searching the corresponding relation between the client address and the test environment identification, and determining the target test environment identification corresponding to the target client address in the first environment acquisition request;
sending a second environment obtaining request containing the target testing environment identifier to a target server corresponding to the target testing environment identifier so that the target server can return the target testing environment corresponding to the target testing environment identifier;
providing the target test environment to the target client.
In a second aspect, an embodiment of the present application provides a request processing method, applied to a target client, including:
sending a first environment acquisition request to a gateway so that the gateway can search the corresponding relation between a client address and a test environment identifier and determine a target test environment identifier corresponding to a target client address in the first environment acquisition request; sending a second environment obtaining request containing the target testing environment identifier to a target server corresponding to the target testing environment identifier so that the target server can return the target testing environment corresponding to the target testing environment identifier; providing the target test environment to the target client;
receiving the target test environment.
In a third aspect, an embodiment of the present application provides a request processing method, applied to a target server, including:
receiving a second environment acquisition request which is sent by a gateway and contains a target test environment identifier;
and returning the target test environment corresponding to the target test environment identifier to the gateway so that the gateway provides the target test environment to a target client.
In a fourth aspect, an embodiment of the present application provides a request processing system, including: at least one client, a gateway and at least one server;
the gateway is configured to: receiving a first environment acquisition request sent by a target client; searching the corresponding relation between the client address and the test environment identification, and determining the target test environment identification corresponding to the target client address in the first environment acquisition request; sending a second environment obtaining request containing the target testing environment identifier to a target server corresponding to the target testing environment identifier so that the target server can return the target testing environment corresponding to the target testing environment identifier; providing the target test environment to the target client.
The target client is to: sending a first environment acquisition request to a gateway so that the gateway searches the corresponding relation between a client address and a test environment identifier, determining that a target test environment identifier corresponding to a target client address in the first environment acquisition request sends a second environment acquisition request containing the target test environment identifier to a target server corresponding to the target test environment identifier, so that the target server returns a target test environment corresponding to the target test environment identifier, and providing the target test environment to the target client; providing the target test environment to the target client.
The target server is used for receiving a second environment acquisition request which is sent by the gateway and contains a target test environment identifier; and returning the target test environment corresponding to the target test environment identifier to the gateway so that the gateway provides the target test environment to a target client.
In the embodiment of the application, a gateway receives a first environment acquisition request sent by a target client; searching the corresponding relation between the client address and the test environment identification, and determining a target test environment identification corresponding to the target client address in the first environment acquisition request; sending a second environment obtaining request containing the target testing environment identification to a target server corresponding to the target testing environment identification so that the target server can return the target testing environment corresponding to the target testing environment identification; and providing the target test environment to the target client. According to the embodiment of the application, the corresponding relation between the client address and the test environment identifier is determined in the gateway, so that the second environment acquisition request is sent to the target server corresponding to the target test environment identifier. Therefore, in the process of replacing the target test environment, the domain name of the test environment does not need to be manually modified at the client, and the second environment acquisition request can be sent to the target test environment only by updating the corresponding relation between the client address and the test environment in the gateway, so that the operation is simple and convenient, and the test efficiency is effectively improved.
These and other aspects of the present application will be more readily apparent from the following description of the embodiments.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative efforts.
FIG. 1 is a flow diagram illustrating one embodiment of a request processing method provided herein;
FIG. 2 is a flow diagram illustrating another embodiment of a request processing method provided herein;
FIG. 3 is a flow diagram illustrating another embodiment of a request processing method provided herein;
FIG. 4 is a schematic diagram illustrating an embodiment of a request processing apparatus provided in the present application;
FIG. 5 is a schematic diagram illustrating an architecture of another embodiment of a request processing apparatus provided in the present application;
FIG. 6 is a schematic diagram illustrating an architecture of yet another embodiment of a request processing apparatus provided by the present application;
FIG. 7 is a schematic structural diagram of a computing device corresponding to the request processing apparatus provided in the embodiment shown in FIG. 4;
FIG. 8 is a schematic structural diagram of a computing device corresponding to the request processing apparatus provided in the embodiment shown in FIG. 5;
fig. 9 is a schematic structural diagram of a computing device corresponding to the request processing apparatus provided in the embodiment shown in fig. 6.
Detailed Description
In order to make the technical solutions better understood by those skilled in the art, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application.
In some of the flows described in the specification and claims of this application and in the above-described figures, a number of operations are included that occur in a particular order, but it should be clearly understood that these operations may be performed out of order or in parallel as they occur herein, the number of operations, e.g., 101, 102, etc., merely being used to distinguish between various operations, and the number itself does not represent any order of performance. Additionally, the flows may include more or fewer operations, and the operations may be performed sequentially or in parallel. It should be noted that, the descriptions of "first", "second", etc. in this document are used for distinguishing different messages, devices, modules, etc., and do not represent a sequential order, nor limit the types of "first" and "second" to be different.
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
Aiming at the problem that the test environment is relatively complicated to change in the prior art, the inventor invents that in the prior art, a code needs to be manually written at a client in the process of accessing the corresponding test environment based on a domain name of the test environment, the code comprises the domain name of the test environment and interface information corresponding to a server where the domain name of the test environment is located, the client further sends an environment acquisition request to a gateway corresponding to the client, and the gateway sends the environment acquisition request to the server corresponding to the test environment based on the domain name of the test environment. However, when the testing environment needs to be changed, the code written before needs to be changed, the changed testing environment can be requested, the changed content includes interface information corresponding to the server where the domain name of the testing environment domain name is located, the operation is complex, and the interface information needs the server responsible personnel to inform the client responsible personnel, which causes the problems of high communication cost and low testing efficiency.
In view of the above, the inventor proposes a request processing method and system, in which a gateway receives a first environment acquisition request sent by a target client; searching the corresponding relation between the client address and the test environment identification, and determining a target test environment identification corresponding to the target client address in the first environment acquisition request; sending a second environment acquisition request to a target server corresponding to the target test environment identifier so that the target server returns a target test environment corresponding to the second environment acquisition request; and providing the target test environment to the target client. The method and the device have the advantages that the corresponding relation between the client address and the test environment identification is determined in the gateway, so that the environment acquisition request can be sent to the corresponding target server based on the client address, and the corresponding test environment identification is determined based on the client address, so that even if the test environment needs to be changed, the environment request can be sent to the corresponding server only by maintaining the corresponding relation between the dynamic test environment identification and the client address at the gateway, the code of the client does not need to be changed, the operation is simple and convenient, and the test efficiency is improved.
Fig. 1 shows a flowchart of an embodiment of a request processing method provided by the present application, where the technical solution of the present embodiment is executed by a gateway, where in the embodiment of the present application, the gateway may be an intermediate device that implements interconnection between a client and a container. As shown in fig. 1, the method includes:
101. and receiving a first environment acquisition request sent by a target client.
In an optional embodiment, the target client receives an input operation of a user at the target client, where the input content corresponding to the input operation may include a gateway domain name and interface information corresponding to a gateway, and generates a corresponding code based on the gateway domain name and the interface information corresponding to the gateway, so that in a process that the target client requests a target test environment, a first environment acquisition request may be first sent to the gateway corresponding to the gateway domain name.
Optionally, the first environment acquisition request includes: a target client address.
102. And searching the corresponding relation between the client address and the test environment identifier, and determining the target test environment identifier corresponding to the target client address in the first environment acquisition request.
The target client address may be an Internet Protocol (IP) address of the target client.
Optionally, the correspondence between the client address and the test environment identifier is determined as follows: providing a plurality of test environment identifications; determining a selected test environment identifier based on a selection request sent by any client for the plurality of test environment identifiers; and establishing a corresponding relation between the selected test environment identification and the client address of any client.
Wherein the plurality of test environment identifications are sent to the gateway by the at least one server. The environment test identification may be a number, letter, or any identification that can be used to uniquely distinguish the test environment.
The plurality of test environment identifiers can be displayed on a display page corresponding to the gateway for selection by a user. Correspondingly, the selection request may be generated by the client based on a selection operation of the user for any test environment identifier and sent to the gateway, and the gateway may establish a corresponding relationship based on an address of the client in the selection request and the test environment identifier.
Optionally, a database may be provided in the gateway, and the database is used for storing the correspondence between the test environment identifier and the client address.
In an alternative embodiment, providing a plurality of test environment identifications includes: displaying a plurality of information carriers bearing different test environment identifications; determining the selected testing environment identifier based on a selection request sent by any client for the plurality of testing environment identifiers comprises: and receiving a selection request sent by any client based on the test environment identification obtained from any information carrier, and determining the selected test environment identification.
The information carrier can be a bar code, a two-dimensional code, a three-dimensional code or other graphic codes, and the client can obtain the corresponding test environment identifier from the information carrier by scanning the information carrier.
The display method of the information carrier can be realized by receiving the touch operation of the user on the preset button and displaying a plurality of information carriers bearing different test environment identifications.
Correspondingly, the selection operation may be a scanning operation of the client for any information carrier.
In another optional embodiment, the above process of establishing correspondence between the selected test environment identifier and the client address of any client may be implemented as: aiming at the triggering operation of a user on a display page, displaying a plurality of test environment identifications on the display page, wherein the plurality of test environment identifications correspond to a plurality of test environments in a gateway database; displaying a two-dimensional code corresponding to any one of the plurality of test environment identifiers on a display page based on a selection operation of a user for the test environment identifier, for example, a touch operation, wherein the two-dimensional code stores information corresponding to the test environment identifier; and receiving the code scanning operation of the client and the client address sent by the client, and further establishing the corresponding relation between the client address and the test environment identifier.
It should be noted that the test environment required by the current test of the target client may be different from the test environment required by the next test, and therefore, the corresponding relationship between the client address and the test environment identifier in the database is updated in real time, and when the gateway receives a selection request sent by any client based on the test environment identifier obtained from any information carrier, the corresponding relationship between the client address and the test environment identifier in the database is updated based on the corresponding relationship between the client address and the test environment identifier corresponding to the selection operation.
Optionally, one test environment identifier in the correspondence between the client address and the test environment identifier may correspond to at least one client address.
103. And sending a second environment obtaining request containing the target testing environment identifier to a target server corresponding to the target testing environment identifier so that the target server returns the target testing environment corresponding to the target testing environment identifier.
Because the first environment obtaining request is sent to the gateway by the client, the first environment obtaining request does not include a target testing environment identifier which needs to be requested, namely, the environment obtaining request is only sent to the target server through the gateway, and the target server does not return the corresponding target testing environment based on the environment obtaining request.
Therefore, in an optional embodiment, sending the second environment obtaining request to the target server corresponding to the target testing environment identifier for the target server to return the target testing environment corresponding to the second environment obtaining request includes: adding a target test environment identifier at the message head of the first environment acquisition request to obtain a second environment acquisition request; and sending a second environment acquisition request to the target server corresponding to the target test environment identifier so that the target server returns the target test environment corresponding to the target test environment identifier.
Optionally, because the first environment obtaining request is generally a Hypertext Transfer Protocol (HTTP) request message, a target testing environment identifier may be added to a header of the environment obtaining request, so as to obtain a second environment obtaining request, and after the second environment obtaining request is sent to the target server, the target server may return the corresponding target testing environment based on the target testing environment identifier in the second environment obtaining request.
In an optional embodiment, the gateway database may store a corresponding relationship between the test environment identifier and the server, where the corresponding relationship may be a corresponding relationship between the test environment identifier and the server identifier, a corresponding relationship between the test environment identifier and a domain name of the server, or a corresponding relationship between the test environment identifier and an IP address of the server. Further, the gateway searches the corresponding relation between the test environment identifier and the server, and determines a target server corresponding to the target test environment identifier, so that the second environment acquisition request is sent to the target server.
Further, in the database of the gateway, a corresponding relationship between the test environment identifier and the test environment domain name may also be stored correspondingly, and optionally, the establishing of the corresponding relationship between the test environment domain name and the test environment identifier may be implemented as follows: receiving at least one test environment identifier sent by at least one server; respectively generating a testing environment domain name corresponding to at least one testing environment identifier; and correspondingly storing the test environment identification and the test environment domain name.
The domain name of the test environment may be obtained by combining the identifier of the test environment with the domain name of the server where the test environment is located.
In an optional embodiment, after a user has set up a test environment in any server, the server sends a test environment identifier corresponding to the test environment to the gateway, and the gateway generates a test environment domain name based on the test environment identifier and the domain name of the server where the test environment is located, for example, the test environment identifier of the newly set up test environment is xinzeng, the server domain name is www.fuwuqi1.com, and the generated test environment domain name is www.fuwuqi1.com/xinzeng. Further, the testing environment domain name is stored in a database of the gateway.
The generation process of any test environment domain name is consistent with the above process, and is not described herein again.
Optionally, sending the second environment obtaining request including the target testing environment identifier to the target server corresponding to the target testing environment identifier further includes: searching the corresponding relation between the testing environment identification and the testing environment domain name, and determining a target testing environment domain name corresponding to the target testing environment identification; and determining the address of the target server corresponding to the domain name of the target test environment. Further, sending the second environment obtaining request to the target server corresponding to the target testing environment identifier includes: and sending a second environment acquisition request to a target server corresponding to the target server address so that the target server returns a target test environment corresponding to the target test environment identifier.
Because the testing environment domain name includes the testing environment identifier or the related parameter of the testing environment identifier, after the gateway determines the target testing environment identifier corresponding to the target client address, the gateway can determine the target testing environment domain name corresponding to the target testing environment identifier in the database based on the target testing environment identifier.
Further, since the target testing environment domain name includes a domain name of a target server where the target testing environment is located, the target testing environment domain name may be sent to a corresponding domain name resolution server, so as to obtain a corresponding IP address, so that the second environment obtaining request is sent to the target server based on the IP address.
104. And providing the target test environment to the target client.
Optionally, after providing the target test environment to the target client, the method further includes: receiving an operating environment corresponding to at least one associated function associated with the target test function sent by the target server, wherein the target test function is determined based on the second environment acquisition request; and sending the operating environment corresponding to the at least one correlation function to the target client, so that the target client tests the target test function in the target test environment by combining the operating environment corresponding to the at least one correlation function and the at least one correlation function.
Generally, a test task only tests a certain target test function of a program, and the testing of the target test function requires that at least one associated function associated with the target test function in the program is run simultaneously to determine whether the target test function meets the requirement. Therefore, the client needs at least one associated function and an operating environment corresponding to the at least one associated function to test the target test function.
The second environment acquisition request includes: a target test function and at least one associated function. The target test function and the at least one associated function may each be implemented by code, and the target test function and the at least one associated function may constitute a program, which may be stored on the target client.
Correspondingly, the process of sending the second environment obtaining request to the gateway by the target client may be implemented as follows: the target client receives a trigger operation of a user, a plurality of controls can be displayed on the target client, the controls are used for representing a plurality of functions corresponding to the controls, the selection operation of the user for any one of the controls is detected, the function corresponding to the control is determined as a target test function, and a first environment acquisition request including the target test function is sent to the gateway.
The at least one server further stores a plurality of operating environments corresponding to the plurality of functions, and the gateway database further stores a corresponding relationship between at least one associated function and at least one operating environment identifier, so that after receiving the first environment acquisition request, the gateway further includes: determining an operating environment identifier corresponding to at least one correlation function, generating at least one corresponding operating environment acquisition request by combining the at least one correlation function and the respective corresponding operating environment identifier, and sending the at least one operating environment acquisition request to the respective corresponding server so as to acquire at least one operating environment.
And finally, the gateway sends the running environment corresponding to the at least one correlation function to the target client, and the target client runs the corresponding correlation function in the at least one running environment and the target test function in the target test environment according to the running sequence of the target test function and the at least one correlation function in the program to finish the test of the target test function.
In an alternative embodiment, a process corresponds to a flow of merchandise purchases, comprising: the method comprises four functions of payment, collection, delivery and receipt, wherein when the collection function is tested, the functions are operated in respective operation environments or target test environments according to the sequence of payment, collection, delivery and receipt, so that the payment function is tested.
In the embodiment of the application, a gateway receives a first environment acquisition request sent by a target client; searching the corresponding relation between the client address and the test environment identification, and determining a target test environment identification corresponding to the target client address in the first environment acquisition request; sending a second environment acquisition request to a target server corresponding to the target test environment identifier so that the target server returns a target test environment corresponding to the second environment acquisition request; and providing the target test environment to the target client. According to the embodiment of the application, the corresponding relation between the client address and the test environment identifier is determined in the gateway, so that the second environment acquisition request is sent to the target server corresponding to the target test environment identifier. Therefore, in the process of replacing the target test environment, the domain name of the test environment does not need to be manually modified at the client, and the second environment acquisition request can be sent to the target test environment only by updating the corresponding relation between the client address and the test environment in the gateway, so that the operation is simple and convenient, and the test efficiency is effectively improved.
Fig. 2 shows a flowchart of another embodiment of the request processing method provided in the present application, wherein the technical scheme of the present embodiment is executed by the target client. As shown in fig. 2, the method includes:
201. sending a first environment acquisition request to a gateway so that the gateway can search the corresponding relation between the client address and the test environment identifier and determine a target test environment identifier corresponding to the target client address in the first environment acquisition request; sending a second environment obtaining request containing the target testing environment identification to a target server corresponding to the target testing environment identification so that the target server can return the target testing environment corresponding to the target testing environment identification; and providing the target test environment to the target client.
202. A target test environment is received.
For the detailed execution process of the request processing method provided in this embodiment, reference may be made to the description in the other embodiments, which is not repeated herein.
Fig. 3 is a flowchart illustrating another embodiment of a request processing method provided by the present application, wherein the technical solution of the present embodiment is executed by a target server. As shown in fig. 3, the method includes:
301. and receiving a second environment acquisition request which is sent by the gateway and contains the target test environment identifier.
302. And returning the target test environment corresponding to the target test environment identification to the gateway so that the gateway provides the target test environment to the target client.
For the detailed execution process of the request processing method provided in this embodiment, reference may be made to the description in the other embodiments, which is not repeated herein.
Optionally, the present application further provides a request processing system, including: at least one client, a gateway, and at least one server.
The gateway is used for: receiving a first environment acquisition request sent by a target client; searching the corresponding relation between the client address and the test environment identification, and determining a target test environment identification corresponding to the target client address in the first environment acquisition request; sending a second environment obtaining request containing the target testing environment identification to a target server corresponding to the target testing environment identification so that the target server can return the target testing environment corresponding to the target testing environment identification; and providing the target test environment to the target client.
The target client is used for: sending a first environment acquisition request to a gateway so that the gateway can search the corresponding relation between the client address and the test environment identification, determining that a target test environment identification corresponding to a target client address in the first environment acquisition request sends a second environment acquisition request containing the target test environment identification to a target server corresponding to the target test environment identification, so that the target server can return a target test environment corresponding to the target test environment identification, and providing the target test environment to the target client; and providing the target test environment to the target client.
The target server is used for receiving a second environment acquisition request which is sent by the gateway and contains a target test environment identifier; and returning the target test environment corresponding to the target test environment identification to the gateway so that the gateway provides the target test environment to the target client.
For the detailed execution process of the request processing system provided in this embodiment, reference may be made to the description in the other embodiments, which is not repeated herein.
Fig. 4 is a schematic structural diagram illustrating an embodiment of a request processing apparatus provided in the present application, where the apparatus is applied to a gateway, and as shown in fig. 4, the apparatus includes: a receiving module 41, a searching module 42, a sending module 43 and a providing module 44;
the receiving module 41 is configured to receive a first environment obtaining request sent by a target client.
The searching module 42 is configured to search for a corresponding relationship between the client address and the test environment identifier, and determine a target test environment identifier corresponding to the target client address in the first environment obtaining request.
A sending module 43, configured to send a second environment obtaining request including the target testing environment identifier to a target server corresponding to the target testing environment identifier, so that the target server returns the target testing environment corresponding to the target testing environment identifier.
A providing module 44, configured to provide the target test environment to the target client.
Optionally, the sending module 43 is specifically configured to add the target test environment identifier to the header of the message of the first environment acquisition request to obtain a second environment acquisition request; and sending the second environment acquisition request to a target server corresponding to the target test environment identifier so that the target server returns the target test environment corresponding to the target test environment identifier.
Optionally, the sending module 43 is further specifically configured to search for a corresponding relationship between the test environment identifier and the test environment domain name, and determine a target test environment domain name corresponding to the target test environment identifier; determining a target server address corresponding to the target test environment domain name; the sending the second environment obtaining request to the target server corresponding to the target testing environment identifier includes: and sending the second environment acquisition request to a target server corresponding to the target server address.
Optionally, the search module 42 is specifically configured to provide a plurality of test environment identifiers; determining a selected test environment identifier based on a selection request sent by any client for the plurality of test environment identifiers; and establishing a corresponding relation between the selected test environment identification and the client address of any client.
Optionally, the search module 42 is further specifically configured to display a plurality of information carriers bearing different test environment identifiers; the determining the selected testing environment identifier based on the selection request sent by any client for the plurality of testing environment identifiers comprises: and receiving a selection request sent by any client based on the test environment identification obtained from any information carrier, and determining the selected test environment identification.
Optionally, the sending module 43 is further specifically configured to receive at least one test environment identifier sent by at least one server; respectively generating a testing environment domain name corresponding to the at least one testing environment identifier; and correspondingly storing the testing environment identification and the testing environment domain name.
Optionally, the receiving module 41 is specifically configured to receive an operating environment corresponding to at least one related function that is related to a target test function and sent by at least one server, where the target test function is determined based on the second environment obtaining request.
Optionally, the sending module 43 is further specifically configured to send the operating environment corresponding to the at least one associated function to the target client, so that the target client tests the target test function in the target test environment in combination with the operating environment corresponding to the at least one associated function and the at least one associated function.
The request processing apparatus shown in fig. 4 may execute the request processing method shown in the embodiment shown in fig. 1, and the implementation principle and the technical effect are not described again. The specific manner in which each module and unit of the request processing apparatus in the above embodiments perform operations has been described in detail in the embodiments related to the method, and will not be elaborated herein.
Fig. 5 is a schematic structural diagram illustrating another embodiment of a request processing apparatus provided in the present application, where the apparatus is applied to a target client, and as shown in fig. 5, the apparatus includes: a transmitting module 51 and a receiving module 52;
a sending module 51, configured to send a first environment obtaining request to a gateway, so that the gateway searches for a correspondence between a client address and a test environment identifier, and determines a target test environment identifier corresponding to a target client address in the first environment obtaining request; sending a second environment obtaining request containing the target testing environment identifier to a target server corresponding to the target testing environment identifier so that the target server can return the target testing environment corresponding to the target testing environment identifier; providing the target test environment to the target client.
A receiving module 52, configured to receive the target test environment.
The request processing apparatus shown in fig. 5 may execute the request processing method shown in the embodiment shown in fig. 2, and the implementation principle and the technical effect are not described again. The specific manner in which each module and unit of the request processing apparatus in the above embodiments perform operations has been described in detail in the embodiments related to the method, and will not be elaborated herein.
Fig. 6 is a schematic structural diagram illustrating a further embodiment of a request processing apparatus provided in the present application, where the apparatus is applied to a target server, and as shown in fig. 6, the apparatus includes: a receiving module 61 and a return module 62;
the receiving module 61 is configured to receive a second environment obtaining request that includes the target testing environment identifier and is sent by the gateway.
A returning module 62, configured to return the target testing environment corresponding to the target testing environment identifier to the gateway, so that the gateway provides the target testing environment to the target client.
The request processing apparatus shown in fig. 6 may execute the request processing method shown in the embodiment shown in fig. 3, and the implementation principle and the technical effect are not described again. The specific manner in which each module and unit of the request processing apparatus in the above embodiments perform operations has been described in detail in the embodiments related to the method, and will not be elaborated herein.
In one possible design, the request processing apparatus of the embodiment shown in fig. 4 may be implemented as a computing device, which may include a storage component 701, a processing component 702, and a display component 703 as shown in fig. 7;
the storage component 701 stores one or more computer instructions for the processing component 702 to invoke for execution.
The processing component is to:
receiving a first environment acquisition request sent by a target client;
searching the corresponding relation between the client address and the test environment identification, and determining the target test environment identification corresponding to the target client address in the first environment acquisition request;
sending a second environment obtaining request containing the target testing environment identifier to a target server corresponding to the target testing environment identifier so that the target server can return the target testing environment corresponding to the target testing environment identifier;
providing the target test environment to the target client.
Among other things, the processing component 702 may include one or more processors to execute computer instructions to perform all or some of the steps of the methods described above. Of course, the processing elements may also be implemented as one or more Application Specific Integrated Circuits (ASICs), Digital Signal Processors (DSPs), Digital Signal Processing Devices (DSPDs), Programmable Logic Devices (PLDs), Field Programmable Gate Arrays (FPGAs), controllers, micro-controllers, microprocessors or other electronic components configured to perform the above-described methods.
The storage component 701 is configured to store various types of data to support operations at the terminal. The memory components may be implemented by any type or combination of volatile or non-volatile memory devices such as Static Random Access Memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic or optical disks.
The display component 703 may be an Electroluminescent (EL) element, a liquid crystal display or a microdisplay with a similar structure, or a retina-directed display or similar laser scanning display.
Of course, a computing device may also necessarily include other components, such as input/output interfaces, communication components, and so forth.
The input/output interface provides an interface between the processing components and peripheral interface modules, which may be output devices, input devices, etc.
The communication component is configured to facilitate wired or wireless communication between the computing device and other devices, and the like.
The computing device may be a physical device or an elastic computing host provided by a cloud computing platform, and the computing device may be a cloud server, and the processing component, the storage component, and the like may be a basic server resource rented or purchased from the cloud computing platform.
In another possible design, the request processing apparatus of the embodiment shown in fig. 5 may be implemented as a computing device, which may include a storage component 801, a processing component 802, and a display component 803, as shown in fig. 8;
the storage component 801 stores one or more computer instructions for execution invoked by the processing component 802.
The processing component is to:
sending a first environment acquisition request to a gateway so that the gateway can search the corresponding relation between a client address and a test environment identifier and determine a target test environment identifier corresponding to a target client address in the first environment acquisition request; sending a second environment obtaining request containing the target testing environment identifier to a target server corresponding to the target testing environment identifier so that the target server can return the target testing environment corresponding to the target testing environment identifier; providing the target test environment to the target client;
receiving the target test environment.
The processing component 802 may include one or more processors executing computer instructions to perform all or some of the steps of the methods described above. Of course, the processing elements may also be implemented as one or more Application Specific Integrated Circuits (ASICs), Digital Signal Processors (DSPs), Digital Signal Processing Devices (DSPDs), Programmable Logic Devices (PLDs), Field Programmable Gate Arrays (FPGAs), controllers, micro-controllers, microprocessors or other electronic components configured to perform the above-described methods.
The storage component 801 is configured to store various types of data to support operations at the terminal. The memory components may be implemented by any type or combination of volatile or non-volatile memory devices such as Static Random Access Memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic or optical disks.
The display component 803 may be an Electroluminescent (EL) element, a liquid crystal display or a microdisplay with similar structure, or a retina-directed display or similar laser scanning display.
Of course, a computing device may also necessarily include other components, such as input/output interfaces, communication components, and so forth.
The input/output interface provides an interface between the processing components and peripheral interface modules, which may be output devices, input devices, etc.
The communication component is configured to facilitate wired or wireless communication between the computing device and other devices, and the like.
The computing device may be a physical device or an elastic computing host provided by a cloud computing platform, and the computing device may be a cloud server, and the processing component, the storage component, and the like may be a basic server resource rented or purchased from the cloud computing platform.
In another possible design, the request processing apparatus of the embodiment shown in fig. 6 may be implemented as a computing device, which may include a storage component 901, a processing component 902, and a display component 903 as shown in fig. 9;
the storage component 901 stores one or more computer instructions for the processing component 902 to invoke for execution.
The processing component is to:
receiving a second environment acquisition request which is sent by a gateway and contains a target test environment identifier;
and returning the target test environment corresponding to the target test environment identifier to the gateway so that the gateway provides the target test environment to a target client.
Among other things, the processing component 902 may include one or more processors to execute computer instructions to perform all or some of the steps of the methods described above. Of course, the processing elements may also be implemented as one or more Application Specific Integrated Circuits (ASICs), Digital Signal Processors (DSPs), Digital Signal Processing Devices (DSPDs), Programmable Logic Devices (PLDs), Field Programmable Gate Arrays (FPGAs), controllers, micro-controllers, microprocessors or other electronic components configured to perform the above-described methods.
The storage component 901 is configured to store various types of data to support operations at the terminal. The memory components may be implemented by any type or combination of volatile or non-volatile memory devices such as Static Random Access Memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic or optical disks.
The display element 903 may be an Electroluminescent (EL) element, a liquid crystal display or a microdisplay with a similar structure, or a retina-directed display or similar laser scanning type display.
Of course, a computing device may also necessarily include other components, such as input/output interfaces, communication components, and so forth.
The input/output interface provides an interface between the processing components and peripheral interface modules, which may be output devices, input devices, etc.
The communication component is configured to facilitate wired or wireless communication between the computing device and other devices, and the like.
The computing device may be a physical device or an elastic computing host provided by a cloud computing platform, and the computing device may be a cloud server, and the processing component, the storage component, and the like may be a basic server resource rented or purchased from the cloud computing platform.
The embodiment of the present application further provides a computer-readable storage medium, which stores a computer program, and when the computer program is executed by a computer, the method for processing a request according to the embodiment shown in fig. 1 may be implemented.
An embodiment of the present application further provides a computer-readable storage medium, which stores a computer program, and when the computer program is executed by a computer, the method for processing a request according to the embodiment shown in fig. 2 may be implemented.
An embodiment of the present application further provides a computer-readable storage medium, which stores a computer program, and when the computer program is executed by a computer, the method for processing a request according to the embodiment shown in fig. 3 may be implemented.
The processing components referred to in the respective embodiments above may include one or more processors executing computer instructions to perform all or part of the steps of the methods described above. Of course, the processing elements may also be implemented as one or more Application Specific Integrated Circuits (ASICs), Digital Signal Processors (DSPs), Digital Signal Processing Devices (DSPDs), Programmable Logic Devices (PLDs), Field Programmable Gate Arrays (FPGAs), controllers, micro-controllers, microprocessors or other electronic components configured to perform the above-described methods.
The storage component is configured to store various types of data to support operations at the terminal. The memory components may be implemented by any type or combination of volatile or non-volatile memory devices such as Static Random Access Memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic or optical disks.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described systems, apparatuses and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
The above-described embodiments of the apparatus are merely illustrative, and the units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment. One of ordinary skill in the art can understand and implement it without inventive effort.
Through the above description of the embodiments, those skilled in the art will clearly understand that each embodiment can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware. With this understanding in mind, the above-described technical solutions may be embodied in the form of a software product, which can be stored in a computer-readable storage medium such as ROM/RAM, magnetic disk, optical disk, etc., and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the methods described in the embodiments or some parts of the embodiments.
Finally, it should be noted that: the above embodiments are only used to illustrate the technical solutions of the present application, and not to limit the same; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions in the embodiments of the present application.

Claims (10)

1. A request processing method applied to a gateway, the method comprising:
receiving a first environment acquisition request sent by a target client;
searching the corresponding relation between the client address and the test environment identification, and determining the target test environment identification corresponding to the target client address in the first environment acquisition request;
sending a second environment obtaining request containing the target testing environment identifier to a target server corresponding to the target testing environment identifier so that the target server can return the target testing environment corresponding to the target testing environment identifier;
providing the target test environment to the target client.
2. The method of claim 1, wherein sending a second environment obtaining request to a target server corresponding to the target testing environment identifier for the target server to return a target testing environment corresponding to the second environment obtaining request comprises:
adding the target test environment identifier to the message header of the first environment acquisition request to obtain a second environment acquisition request;
and sending the second environment acquisition request to a target server corresponding to the target test environment identifier so that the target server returns the target test environment corresponding to the target test environment identifier.
3. The method of claim 2, further comprising, before sending a second environment obtaining request containing the target testing environment identifier to a target server corresponding to the target testing environment identifier:
searching a corresponding relation between the testing environment identification and the testing environment domain name, and determining a target testing environment domain name corresponding to the target testing environment identification;
determining a target server address corresponding to the target test environment domain name;
the sending the second environment obtaining request to the target server corresponding to the target testing environment identifier includes:
and sending the second environment acquisition request to a target server corresponding to the target server address.
4. The method of claim 1, wherein the client address and test environment identification correspondence is determined as follows:
providing a plurality of test environment identifications;
determining a selected test environment identifier based on a selection request sent by any client for the plurality of test environment identifiers;
and establishing a corresponding relation between the selected test environment identification and the client address of any client.
5. The method of claim 4, wherein said providing a plurality of test environment identifications comprises:
displaying a plurality of information carriers bearing different test environment identifications;
the determining the selected testing environment identifier based on the selection request sent by any client for the plurality of testing environment identifiers comprises:
and receiving a selection request sent by any client based on the test environment identification obtained from any information carrier, and determining the selected test environment identification.
6. The method of claim 3, further comprising:
receiving at least one test environment identifier sent by at least one server;
respectively generating a testing environment domain name corresponding to the at least one testing environment identifier;
and correspondingly storing the testing environment identification and the testing environment domain name.
7. The method of claim 1, further comprising:
receiving an operating environment corresponding to at least one associated function associated with a target test function sent by at least one server, wherein the target test function is determined based on the second environment acquisition request;
and sending the operating environment corresponding to the at least one correlation function to the target client, so that the target client tests the target test function in the target test environment by combining the operating environment corresponding to the at least one correlation function and the at least one correlation function.
8. A request processing method applied to a target client, the method comprising:
sending a first environment acquisition request to a gateway so that the gateway can search the corresponding relation between a client address and a test environment identifier and determine a target test environment identifier corresponding to a target client address in the first environment acquisition request; sending a second environment obtaining request containing the target testing environment identifier to a target server corresponding to the target testing environment identifier so that the target server can return the target testing environment corresponding to the target testing environment identifier; providing the target test environment to the target client;
receiving the target test environment.
9. A request processing method applied to a target server, the method comprising:
receiving a second environment acquisition request which is sent by a gateway and contains a target test environment identifier;
and returning the target test environment corresponding to the target test environment identifier to the gateway so that the gateway provides the target test environment to a target client.
10. A request processing system, comprising: at least one client, a gateway and at least one server;
the gateway is configured to: receiving a first environment acquisition request sent by a target client; searching the corresponding relation between the client address and the test environment identification, and determining the target test environment identification corresponding to the target client address in the first environment acquisition request; sending a second environment obtaining request containing the target testing environment identifier to a target server corresponding to the target testing environment identifier so that the target server can return the target testing environment corresponding to the target testing environment identifier; providing the target test environment to the target client;
the target client is to: sending a first environment acquisition request to a gateway so that the gateway searches the corresponding relation between a client address and a test environment identifier, determining that a target test environment identifier corresponding to a target client address in the first environment acquisition request sends a second environment acquisition request containing the target test environment identifier to a target server corresponding to the target test environment identifier, so that the target server returns a target test environment corresponding to the target test environment identifier, and providing the target test environment to the target client; providing the target test environment to the target client;
the target server is used for receiving a second environment acquisition request which is sent by the gateway and contains a target test environment identifier; and returning the target test environment corresponding to the target test environment identifier to the gateway so that the gateway provides the target test environment to a target client.
CN202110737911.2A 2021-06-30 2021-06-30 Request processing method and system Pending CN113608994A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110737911.2A CN113608994A (en) 2021-06-30 2021-06-30 Request processing method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110737911.2A CN113608994A (en) 2021-06-30 2021-06-30 Request processing method and system

Publications (1)

Publication Number Publication Date
CN113608994A true CN113608994A (en) 2021-11-05

Family

ID=78337032

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110737911.2A Pending CN113608994A (en) 2021-06-30 2021-06-30 Request processing method and system

Country Status (1)

Country Link
CN (1) CN113608994A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115334150A (en) * 2022-08-15 2022-11-11 北京分贝通科技有限公司 Data forwarding method, device, system, electronic equipment and medium
CN115842749A (en) * 2022-11-24 2023-03-24 中电信数智科技有限公司 Test environment switching method, device and system

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040243338A1 (en) * 2003-05-30 2004-12-02 Sabiers Mark L. Simulation of network service test environments
CN103944942A (en) * 2013-01-22 2014-07-23 腾讯科技(深圳)有限公司 Multi-WEB environment data access method and device
CN105430108A (en) * 2014-08-25 2016-03-23 腾讯科技(深圳)有限公司 Test environment accessing method and proxy server
CN108108297A (en) * 2016-11-25 2018-06-01 腾讯科技(深圳)有限公司 The method and apparatus of automatic test
CN110532170A (en) * 2019-07-18 2019-12-03 北京文渊佳科技有限公司 Build method, apparatus, electronic equipment and the medium of test environment
CN111447299A (en) * 2020-03-25 2020-07-24 中国工商银行股份有限公司 DNS analysis method and system based on test environment standing book
CN112445700A (en) * 2019-09-05 2021-03-05 腾讯科技(深圳)有限公司 Test method and device

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040243338A1 (en) * 2003-05-30 2004-12-02 Sabiers Mark L. Simulation of network service test environments
CN103944942A (en) * 2013-01-22 2014-07-23 腾讯科技(深圳)有限公司 Multi-WEB environment data access method and device
CN105430108A (en) * 2014-08-25 2016-03-23 腾讯科技(深圳)有限公司 Test environment accessing method and proxy server
CN108108297A (en) * 2016-11-25 2018-06-01 腾讯科技(深圳)有限公司 The method and apparatus of automatic test
CN110532170A (en) * 2019-07-18 2019-12-03 北京文渊佳科技有限公司 Build method, apparatus, electronic equipment and the medium of test environment
CN112445700A (en) * 2019-09-05 2021-03-05 腾讯科技(深圳)有限公司 Test method and device
CN111447299A (en) * 2020-03-25 2020-07-24 中国工商银行股份有限公司 DNS analysis method and system based on test environment standing book

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115334150A (en) * 2022-08-15 2022-11-11 北京分贝通科技有限公司 Data forwarding method, device, system, electronic equipment and medium
CN115334150B (en) * 2022-08-15 2024-01-19 北京分贝通科技有限公司 Data forwarding method, device, system, electronic equipment and medium
CN115842749A (en) * 2022-11-24 2023-03-24 中电信数智科技有限公司 Test environment switching method, device and system

Similar Documents

Publication Publication Date Title
CN107948314B (en) Business processing method and device based on rule file and server
CN106933871B (en) Short link processing method and device and short link server
CN113608994A (en) Request processing method and system
CN105260420A (en) Method and device for providing target page in mobile application
CN101771993B (en) System and method thereof for realizing polymerization application based on mobile network
CN107026871B (en) Web vulnerability scanning method based on cloud computing
CN111639279B (en) Graphic code generation method, target page loading method and device
CN101193007A (en) Testing method, scenario testing method and corresponding device for URL command
CN114666314A (en) Meta-universe interaction method and device, electronic equipment and storage medium
CN112306881A (en) Simulation data generation method, device, equipment and storage medium
CN111858296A (en) Interface test method, device, equipment and storage medium
CN111079048B (en) Page loading method and device
CN110515631B (en) Method for generating application installation data packet, server and computer storage medium
CN108089972A (en) interface test method and device
CN111798178A (en) Express delivery method and device and E-commerce server
CN115086194B (en) Cloud application data transmission method, computing device and computer storage medium
CN101809560B (en) Content server latency determination
Choudhary et al. A walkthrough of amazon elastic compute cloud (Amazon EC2): a review
CN107436841B (en) Page preview method and device
CN112214704B (en) Page processing method and device
CN114896487A (en) Method, system and medium for implementing a blockchain browser with front end interacting with blockchain
CN114371969A (en) Page performance testing method and device, electronic equipment and storage medium
CN111756682B (en) Game data determining method, game data acquiring method and game data acquiring device
CN111026407B (en) Installation package packing method, computer device and computer readable storage medium
CN103023910B (en) Data transmission method between mobile device and computing 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