CN115396501B - Information processing method and device, electronic equipment and readable storage medium - Google Patents

Information processing method and device, electronic equipment and readable storage medium Download PDF

Info

Publication number
CN115396501B
CN115396501B CN202211054750.8A CN202211054750A CN115396501B CN 115396501 B CN115396501 B CN 115396501B CN 202211054750 A CN202211054750 A CN 202211054750A CN 115396501 B CN115396501 B CN 115396501B
Authority
CN
China
Prior art keywords
information
client
interface
test
identification 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.)
Active
Application number
CN202211054750.8A
Other languages
Chinese (zh)
Other versions
CN115396501A (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 QIYI Century Science and Technology Co Ltd
Original Assignee
Beijing QIYI Century Science and 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 QIYI Century Science and Technology Co Ltd filed Critical Beijing QIYI Century Science and Technology Co Ltd
Priority to CN202211054750.8A priority Critical patent/CN115396501B/en
Publication of CN115396501A publication Critical patent/CN115396501A/en
Application granted granted Critical
Publication of CN115396501B publication Critical patent/CN115396501B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/27Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
    • 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)
  • Databases & Information Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computing Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The embodiment of the invention provides an information processing method, an information processing device, electronic equipment and a readable storage medium, wherein the method comprises the following steps: receiving first request information initiated by a client through a first interface; forwarding the first request information to the service gateway for the service gateway to return first response information corresponding to the first request information in case the state parameter value of the first interface is adjusted to the first parameter value; generating first identification information according to the first request information and the acquired address of the client; the first identification information and the first test information are stored in a first database corresponding to the gateway in an associated mode, and the first test information comprises: the first request information and the corresponding first response information; the first database stores a plurality of pieces of identification information and test information which are associated with each other, and the identification information is used for identifying the test information associated with the identification information. According to the embodiment of the invention, the test information can be conveniently acquired.

Description

Information processing method and device, electronic equipment and readable storage medium
Technical Field
The present invention relates to the field of data processing technologies, and in particular, to an information processing method, an information processing device, an electronic device, and a readable storage medium.
Background
Along with the continuous development of information technology, the updating iteration of the application program is faster and faster, and accordingly, massive testing requirements are brought. Based on this, it is significant for automated testing how to replicate a copy of online traffic data and provide playback capability for the traffic data. The traffic data is specifically request information and response information generated during the use of the application.
In order to collect test information including request information and response information, the current flow data copying and playback scheme needs to change the application program itself, and the operation process is complex.
Disclosure of Invention
The embodiment of the invention aims to provide an information processing method, an information processing device, electronic equipment and a readable storage medium, which can conveniently collect test information. The specific technical scheme is as follows:
in a first aspect of the present invention, there is first provided an information processing method applied to a gateway, where the gateway includes a first interface, including:
receiving first request information initiated by a client through a first interface;
forwarding the first request information to the service gateway for the service gateway to return first response information corresponding to the first request information in case the state parameter value of the first interface is adjusted to the first parameter value;
generating first identification information according to the first request information and the acquired address of the client;
the first identification information and the first test information are stored in a first database corresponding to the gateway in an associated mode, and the first test information is used for testing response information triggered by the first request information; the first test information includes: the first request information and the corresponding first response information; the first database stores a plurality of pieces of identification information and test information which are associated with each other, and the identification information is used for identifying the test information associated with the identification information.
In a second aspect of the present invention, there is also provided an information processing apparatus applied to a gateway, the gateway including a first interface, including:
the receiving module is used for receiving first request information initiated by the client through the first interface;
the forwarding module is used for forwarding the first request information to the service gateway under the condition that the state parameter value of the first interface is adjusted to be the first parameter value, so that the service gateway returns first response information corresponding to the first request information;
the generation module is used for generating first identification information according to the first request information and the acquired address of the client;
the storage module is used for storing the first identification information and the first test information in a first database corresponding to the gateway in an associated mode, and the first test information is used for testing response information triggered by the first request information; the first test information includes: the first request information and the corresponding first response information; the first database stores a plurality of pieces of identification information and test information which are associated with each other, and the identification information is used for identifying the test information associated with the identification information.
In yet another aspect of the present invention, there is also provided a computer readable storage medium having instructions stored therein, which when run on a computer, cause the computer to perform any of the data forwarding methods described above.
In yet another aspect of the invention, there is also provided a computer program product containing instructions which, when run on a computer, cause the computer to perform any of the information processing methods described above.
According to the information processing method provided by the embodiment of the invention, under the condition that the state parameter value of the first interface is regulated to be the first parameter value, first request information initiated by the client is forwarded to the service gateway so as to be used for the service gateway to return first response information corresponding to the first request information; then, generating first identification information according to the first request information and the acquired address of the client; here, the first request information initiated by the client at this time can be accurately identified. Because the first test information comprises the first request information and the received first response information, the first identification information and the first test information are stored in the first database corresponding to the gateway in an associated mode, and flow data generated in the complete request process and the complete response process can be stored. Therefore, the online traffic data generated by the client can be rapidly and conveniently acquired without modifying an application layer and a protocol layer in the process of forwarding the first request information and receiving the first response information, and normal use of the client is not affected.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below.
FIG. 1 is a flow chart of an information processing method according to an embodiment of the present invention;
FIG. 2 is an interactive flow chart of an information processing method according to an embodiment of the present invention;
FIG. 3 is a flow chart of information processing based on a second interface according to an embodiment of the present invention;
FIG. 4 is a flow chart of information processing based on a first interface according to an embodiment of the present invention;
FIG. 5 is a flow chart of information processing based on a third interface according to an embodiment of the present invention;
fig. 6 is a schematic structural diagram of an information processing apparatus according to an embodiment of the present invention;
fig. 7 is a schematic hardware structure of an electronic device according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be described below with reference to the accompanying drawings in the embodiments of the present invention.
The information processing method provided by the embodiment of the invention can be at least applied to the following application scenes, and is explained below.
At present, a large number of test cases are required in an automatic test, interfaces for providing services on line basically present a complex data aggregation form, and the complex data aggregation form refers to that an automatic system comprises a large number of interfaces and a large number of processing modules, so that a large amount of data is generated.
The use cases which are manually compiled often have the problems that the scene coverage is not complete, the real user request is not met, and the like. Duplicating user requests and data results on a line provides playback capabilities, which are significant to automated testing.
The test case refers to the description of a specific software product for testing tasks, and the test scheme, method, technology and strategy are embodied. The content of the method comprises a test target, a test environment, input data, a test step, an expected result, a test script and the like, and finally a document is formed. Briefly, a test case is a set of test inputs, execution conditions, and expected results tailored for a particular goal to verify that a particular software requirement is met.
The current scheme for coping with the flow recording comprises a processing process based on log synchronization, a processing process for changing a transmission control protocol (Transmission Control Protocol, TCP) and a processing process for changing an in-application software development kit (Software Development Kit, SDK), the implementation process is very complicated, and the system integration is heavier.
TCP refers to a connection-oriented, reliable, byte stream based transport layer communication protocol. SDKs are typically a collection of development tools that some software engineers build application software for a particular software package, software framework, hardware platform, operating system, etc.
Fig. 1 is a flowchart of an information processing method according to an embodiment of the present invention, where the information processing method may be applied to a gateway, and the gateway includes a first interface, as shown in fig. 1, and the information processing method may include steps 110 to 140, specifically as follows:
step 110, receiving first request information initiated by a client through a first interface.
In step 120, in case the state parameter value of the first interface is adjusted to the first parameter value, the first request information is forwarded to the service gateway for the service gateway to return the first response information corresponding to the first request information.
And 130, generating first identification information according to the first request information and the acquired address of the client.
Step 140, storing the first identification information and the first test information in a first database corresponding to the gateway in an associated manner, wherein the first test information is used for testing response information triggered by the first request information; the first test information includes: the first request information and the corresponding first response information; the first database stores a plurality of pieces of identification information and test information which are associated with each other, and the identification information is used for identifying the test information associated with the identification information.
In the embodiment of the invention, under the condition that the state parameter value of the first interface is regulated to be the first parameter value, forwarding first request information initiated by the client to the service gateway for the service gateway to return first response information corresponding to the first request information; then, generating first identification information according to the first request information and the acquired address of the client; here, the first request information initiated by the client at this time can be accurately identified. Because the first test information comprises the first request information and the received first response information, the first identification information and the first test information are stored in the first database corresponding to the gateway in an associated mode, and flow data generated in the complete request process and the complete response process can be stored. Therefore, the online traffic data generated by the client can be rapidly and conveniently acquired without modifying an application layer and a protocol layer in the process of forwarding the first request information and receiving the first response information, and normal use of the client is not affected.
Involving step 110.
The gateway may be a proxy server constructed based on the technology of nginnx and Lua, among others.
Where, ng is a high-performance hypertext transfer protocol (Hyper Text Transfer Protocol, HTTP) and a reverse proxy global Wide area network server (World Wide Web, web), and the software type is open source software.
Lua is a compact scripting language. The design purpose is to provide flexible extension and customization functions for the application by being flexibly embedded in the application. Lua is written in a standard C language and can be compiled and run on almost all operating systems and platforms.
In one possible embodiment, before step 110, the following steps may be further included:
setting interface parameters of the first interface, wherein the interface parameters comprise: the state parameter value of the first interface, the address of the simulation server, and the address of the at least one client.
Wherein the state parameter values of the first interface may include: a first parameter value, a second parameter value, and a third parameter value.
When the state parameter value of the first interface is the first parameter value, namely in a recording state, all the test information is recorded, wherein the test information comprises request information and response information, and specifically comprises a user request head, a request body, a request response head and a response body. And identification information generated based on the user characteristic information for identifying the recorded test data. When in a recording state, the method also checks whether the method is connected with the simulation server, and if so, the method forwards the identification information and the test information to the simulation server.
When the state parameter value of the first interface is the second parameter value, namely in a playback state, when the identification information is hit, recording data in the local data storage are played back at the moment, and response information is respectively taken out and returned to the client as a response.
In the case that the state parameter value of the first interface is the third parameter value, that is, the recording function and the playback function are in the off state, the service provided by the gateway is normal online service.
The simulation server records all recorded test data, provides data editing capability, and facilitates the derivation of more use case data. The analog server integrates playback control capabilities and can deliver stored recorded data to the proxy server for partially or fully requested data playback.
The address of the analog server may include a service address of the analog server and a path of an address interface of the analog server. Wherein the service address of the analog server includes a port.
The path of the address interface of the simulation server may be represented by a uniform resource identifier (Uniform Resource Identifier, URI), which is a string used to identify a certain internet resource name. Such identification allows the user to interoperate with any resource via a particular protocol. The URI is defined by a scheme that includes a deterministic syntax and associated protocols.
The address of at least one client, the internet protocol (Internet Protocol, IP) address of the client that needs to activate the recording or playback function, the addresses of multiple clients may be separated by commas.
Involving step 120.
And forwarding the first request information to the service gateway for the service gateway to return the first response information corresponding to the first request information in the case that the state parameter value of the first interface is adjusted to the first parameter value.
The service gateway is a gateway for processing request information, and is capable of processing first request information and returning first response information corresponding to the first request information.
The gateway is used for realizing traffic replication and traffic playback, namely, a process of storing the first identification information and the first test information in an associated manner and a process of acquiring the second response information associated with the second identification information.
As shown in fig. 2, after receiving the client request, the gateway checks the state parameter of the first interface.
In case the state parameter value of the first interface is adjusted to the first parameter value, forwarding the first request information to the service gateway for the service gateway to return first response information corresponding to the first request information. Then, the receiving service gateway returns first response information corresponding to the first request information. In addition, the first request information, the first response information, and the first identification information generated based on the first request information and the acquired address of the client may also be transmitted to the simulation server. And finally, the first response information is sent to the client.
Because the first test information comprises the first request information and the received first response information, the first identification information and the first test information are associated and stored in the first database corresponding to the gateway, so that the recording of flow data generated in a complete request process and a response process can be completed.
In the case that the state parameter value of the first interface is adjusted to the second parameter value, the gateway may generate second identification information according to the second request information and the address of the client, acquire second response information associated with the second identification information, and send the second response information to the client. Thus, playback of the traffic data generated in one complete request process and response process can be completed.
And forwarding the first request information to the service gateway for the service gateway to return the first response information corresponding to the first request information in case the state parameter value of the first interface is adjusted to the third parameter value. And sending the first response information to the client for the client to verify the first response information and the historical response information. Here, in case that the state parameter value of the first interface is adjusted to the third parameter value, the recording function and the playback function of the gateway are in a closed state, and the gateway provides a normal data request service to the client.
Involving step 130.
And generating first identification information according to the first request information and the acquired address of the client.
The first identification information may specifically be generated based on a uniform resource identifier of the first request information and an address of the client. The first identification information is used for identifying the first test information, namely, the first request information and the first response information.
Step 130 may specifically include: calculating the first request information and the acquired address of the client based on a preset algorithm to generate identification information; or,
splicing the first request information and the acquired address of the client to generate identification information; or,
and generating identification information according to the sequence number corresponding to the first request information and the sequence number corresponding to the address of the client.
In a possible embodiment, the gateway comprises a second interface, after step 130, the following steps may be further comprised:
and sending the first identification information and the first test information to the simulation server through the second interface so as to be used for modifying the first test information by the simulation server.
The sending the first identification information and the first test information to the simulation server may specifically include: and sending the first identification information and the first test information to a receiving address of the simulation server.
The receiving address of the simulation server is obtained by analyzing a received interface call request, wherein the interface call request is a request initiated by the simulation server and used for applying for calling a second interface, and the interface call request comprises: the address of the analog server, and the data receiving interface of the analog server.
The following description is made with reference to fig. 3, and as shown in fig. 3, the following steps may be specifically included:
step 310, the gateway sends the first identification information and the first test information to the simulation server through the second interface.
Here, the second interface is configured to send the first identification information and the first test information to the simulation server for the simulation server to modify the first test information.
Step 320, the simulation server modifies the first test information.
The client may be a terminal that is open to the tester. During the test, objects that are not easily constructed or obtained can be handled by the simulation server. Such as: during the test, the manually constructed data cannot return the result wanted by the client, so that the subsequent processing of the program cannot go to the expected branch scene, and finally the test is insufficient.
The simulation server modifying the first test information means that when the response information wanted by the client cannot be constructed by manual test, the simulation server can construct the response information and return any wanted data of the client, so that the client is favorable for fully testing the program to be tested.
Involving step 140.
The first identification information and the first test information are stored in a first database corresponding to the gateway in an associated mode, and the first test information is used for testing response information triggered by the first request information; the first test information includes: the first request information and the corresponding first response information; the first database stores a plurality of pieces of identification information and test information which are associated with each other, and the identification information is used for identifying the test information associated with the identification information.
And storing the first identification information and the first test information in an associated manner, and if the first identification information already has the corresponding test information, covering the original test information with the first test information so that the test information associated with the first identification information can keep the latest result.
In one possible embodiment, as shown in fig. 4, after step 140, the following steps may be further included:
step 410, receiving, through the first interface, second request information sent by the client.
In step 420, in case the state parameter value of the first interface is adjusted to the second parameter value, second identification information is generated according to the second request information and the address of the client.
Step 430, obtaining second response information associated with the second identification information.
Step 440, the second response information is sent to the client.
The above-mentioned step 430 may specifically include the following steps:
detecting a first database of the gateway, and if the first database has second response information associated with second identification information, taking out the second response information and returning the second response information to the client; or,
requesting second response information associated with the second identification information from a second database corresponding to the simulation database, and if the second response information associated with the second identification information exists in the second database, acquiring the second response information from the second database and returning the second response information to the client; or,
if the first database and the second database do not have the second response information associated with the second identification information, the second request information can be forwarded to the service gateway so as to be used for the service gateway to return the second response information corresponding to the second request information.
Thus, by generating the second identification information according to the second request information and the address of the client in the case where the state parameter value of the first interface is adjusted to the second parameter value, since the second identification information is used to identify the second response information, the second response information associated with the second identification information can be quickly and accurately acquired.
In a possible embodiment, the gateway includes a third interface, and after the step 420 mentioned above, the method may further include the following steps:
receiving third response information sent by the simulation server through a third interface, wherein the third response information is response information generated by the simulation server according to the second response information; the second database corresponding to the simulation server stores a plurality of pieces of identification information and test information which are associated with each other, and the test information comprises second response information;
accordingly, the step 440 may specifically include: and sending the third response information to the client.
The simulation server can specifically modify the second response information to obtain third response information, and store the second identification information and the third response information in an associated mode, wherein the second identification information is generated according to the address of the client and the second request information. Correspondingly, the simulation server receives and modifies the response information and stores the response information in a second database corresponding to the simulation server, namely, the second database corresponding to the simulation server stores a plurality of pieces of identification information and test information which are associated with each other, and the test information comprises second response information.
The gateway is provided with a first database, and the simulation server is provided with a second database. The first database information is greater than or equal to the second database, and the data in the simulation server is sent by the gateway for backup and derivatization of the simulation server.
The foregoing embodiment is described below with reference to fig. 5, and as shown in fig. 5, the method may specifically include the following steps:
step 510, the simulation server generates third response information according to the second response information.
As previously described, the simulation server may modify the first test information. Also, the simulation server may modify any response information received, i.e. the simulation server may also modify the second response information. The method is used for the client to fully test the program to be tested.
Step 520, the gateway receives the third response information sent by the analog server through the third interface.
The gateway may initiate a data call request to the simulation server for retrieving the reply information associated with the second identification information before receiving the third reply information sent by the simulation server.
The simulation database responds to the data call request, third response information associated with the second identification information is obtained from a second database corresponding to the simulation database, and the third response information is sent to the gateway. Namely, the gateway receives the third response information sent by the analog server through the third interface.
In step 530, the gateway sends the third response information to the client.
And after receiving the third response information, the gateway sends the third response information to the client.
Wherein, after the above-mentioned second response information is sent to the client, the method may further include the following steps:
receiving indication information sent by a client, wherein the indication information comprises first identification information, and the indication information is used for indicating to clear the first identification information and first test information associated with the first identification information;
and clearing the first identification information and the first test information which are associated with each other in the first database.
The indication information may be used to indicate that the first identification information and the first test information associated with each other in the first database are cleared.
For example, the indication information may be used to indicate that the test of the a scenario has ended and that the test of the B scenario is to be performed; at this time, all the test information of the a scene needs to be cleared, so that the first test information associated with the first identification information is selected according to the identification information of the a scene, namely the first identification information, and then the first identification information and the first test information associated with each other in the first database are cleared.
In one possible embodiment, after step 140, the following steps may be further included:
and sending the first response information to the client for checking the received first response information and historical response information, wherein the historical response information is response information which is pre-stored in the client and corresponds to the first request information.
Because the first response information corresponds to the first request information, the historical response information is response information corresponding to the first request information and stored in the client.
I.e. the first response information and the historical response information are both for responding to the first request information. The first response information and the historical response information may differ in that the target interface element has changed, and accordingly, the interface elements other than the target interface element should be unchanged. That is, a part of the interface parameter information in the first reply information and a part of the interface parameter information in the history reply information should be identical.
Therefore, the client needs to check the first response information and the historical response information to verify that the interface parameter information is not changed, so that stable operation of the application after updating can be ensured. And, it may be verified whether the change in the target interface element meets the update expectations.
In summary, in the embodiment of the present invention, when the state parameter value of the first interface is adjusted to be the first parameter value, the first request information initiated by the client is forwarded to the service gateway, so that the service gateway returns the first response information corresponding to the first request information; then, generating first identification information according to the first request information and the acquired address of the client; here, the first request information initiated by the client at this time can be accurately identified. Because the first test information comprises the first request information and the received first response information, the first identification information and the first test information are stored in the first database corresponding to the gateway in an associated mode, and flow data generated in the complete request process and the complete response process can be stored. Therefore, the online traffic data generated by the client can be rapidly and conveniently acquired without modifying an application layer and a protocol layer in the process of forwarding the first request information and receiving the first response information, and normal use of the client is not affected.
Based on the information processing method shown in fig. 1, the embodiment of the present invention further provides an information processing apparatus, which is applied to a gateway, where the gateway includes a first interface, as shown in fig. 3, the information processing apparatus 600 may include:
the receiving module 610 is configured to receive, through a first interface, first request information initiated by a client.
And a forwarding module 620, configured to forward the first request information to the service gateway, where the state parameter value of the first interface is adjusted to the first parameter value, for the service gateway to return the first response information corresponding to the first request information.
The generating module 630 is configured to generate first identification information according to the first request information and the obtained address of the client.
The storage module 640 is configured to store first identification information and first test information in a first database corresponding to the gateway in an associated manner, where the first test information is used to test response information triggered by the first request information; the first test information includes: the first request information and the corresponding first response information; the first database stores a plurality of pieces of identification information and test information which are associated with each other, and the identification information is used for identifying the test information associated with the identification information.
In one possible embodiment, the information processing apparatus 600 may further include:
the first receiving module is used for receiving second request information sent by the client through the first interface;
the first generation module is used for generating second identification information according to the second request information and the address of the client when the state parameter value of the first interface is adjusted to be a second parameter value;
the acquisition module is used for acquiring second response information associated with the second identification information;
and the first sending module is used for sending the second response information to the client.
In one possible embodiment, the information processing apparatus 600 may further include:
the setting module is used for setting interface parameters of the first interface, wherein the interface parameters comprise: the state parameter value of the first interface, the address of the simulation server, and the address of the at least one client.
In one possible embodiment, the gateway includes a second interface, and the information processing apparatus 600 may further include:
the second sending module is used for sending the first identification information and the first test information to the simulation server through the second interface so as to be used for generating third response information according to the second response information by the simulation server.
In one possible embodiment, the gateway includes a third interface, and the information processing apparatus 600 may further include:
the second receiving module is used for receiving third response information sent by the simulation server through a third interface, wherein the third response information is response information generated by the simulation server according to the second response information; the second database corresponding to the simulation server stores a plurality of pieces of identification information and test information which are associated with each other, and the test information comprises second response information;
the first sending module is specifically configured to: and sending the third response information to the client.
In one possible embodiment, the information processing apparatus 600 may further include:
the second receiving module is used for receiving indication information sent by the client, wherein the indication information comprises first identification information, and the indication information is used for indicating to clear the first identification information and first test information associated with the first identification information;
and the clearing module is used for clearing the first identification information and the first test information which are mutually related in the first database.
In one possible embodiment, the information processing apparatus 600 may further include:
and the third sending module is used for sending the first response information to the client, so that the client can check the received first response information and the historical response information, wherein the historical response information is the response information which is pre-stored in the client and corresponds to the first request information.
In summary, in the embodiment of the present invention, by forwarding, when the state parameter value of the first interface is adjusted to the first parameter value, first request information initiated by the client to the service gateway, the service gateway is configured to return first response information corresponding to the first request information; then, generating first identification information according to the first request information and the acquired address of the client; here, the first request information initiated by the client at this time can be accurately identified. Because the first test information comprises the first request information and the received first response information, the first identification information and the first test information are stored in the first database corresponding to the gateway in an associated mode, and flow data generated in the complete request process and the complete response process can be stored. Therefore, the online traffic data generated by the client can be rapidly and conveniently acquired without modifying an application layer and a protocol layer in the process of forwarding the first request information and receiving the first response information, and normal use of the client is not affected.
The embodiment of the present invention further provides an electronic device, as shown in fig. 7, including a processor 701, a communication interface 702, a memory 703 and a communication bus 704, where the processor 701, the communication interface 702, and the memory 703 perform communication with each other through the communication bus 704,
a memory 703 for storing a computer program;
the processor 701 is configured to execute the program stored in the memory 703, and implement the following steps:
receiving first request information initiated by a client through a first interface;
forwarding the first request information to the service gateway for the service gateway to return first response information corresponding to the first request information in case the state parameter value of the first interface is adjusted to the first parameter value;
generating first identification information according to the first request information and the acquired address of the client;
the first identification information and the first test information are stored in a first database corresponding to the gateway in an associated mode, and the first test information is used for testing response information triggered by the first request information; the first test information includes: the first request information and the corresponding first response information; the first database stores a plurality of pieces of identification information and test information which are associated with each other, and the identification information is used for identifying the test information associated with the identification information.
The communication bus mentioned by the above terminal may be a peripheral component interconnect standard (Peripheral Component Interconnect, abbreviated as PCI) bus or an extended industry standard architecture (Extended Industry Standard Architecture, abbreviated as EISA) bus, etc. The communication bus may be classified as an address bus, a data bus, a control bus, or the like. For ease of illustration, the figures are shown with only one bold line, but not with only one bus or one type of bus.
The communication interface is used for communication between the terminal and other devices.
The memory may include random access memory (Random Access Memory, RAM) or non-volatile memory (non-volatile memory), such as at least one disk memory. Optionally, the memory may also be at least one memory device located remotely from the aforementioned processor.
The processor may be a general-purpose processor, including a central processing unit (Central Processing Unit, CPU for short), a network processor (Network Processor, NP for short), etc.; but also digital signal processors (Digital Signal Processing, DSP for short), application specific integrated circuits (Application Specific Integrated Circuit, ASIC for short), field-programmable gate arrays (Field-Programmable Gate Array, FPGA for short) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.
In yet another embodiment of the present invention, a computer readable storage medium is provided, in which instructions are stored, which when run on a computer, cause the computer to perform the information processing method according to any one of the above embodiments.
In a further embodiment of the present invention, a computer program product comprising instructions which, when run on a computer, cause the computer to perform the information processing method according to any of the above embodiments is also provided.
In the above embodiments, it may be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When loaded and executed on a computer, produces a flow or function in accordance with embodiments of the present invention, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a computer network, or other programmable apparatus. The computer instructions may be stored in or transmitted from one computer-readable storage medium to another, for example, by wired (e.g., coaxial cable, optical fiber, digital Subscriber Line (DSL)), or wireless (e.g., infrared, wireless, microwave, etc.). The computer readable storage medium may be any available medium that can be accessed by a computer or a data storage device such as a server, data center, etc. that contains an integration of one or more available media. The usable medium may be a magnetic medium (e.g., floppy Disk, hard Disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid State Disk (SSD)), etc.
It is noted that relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
In this specification, each embodiment is described in a related manner, and identical and similar parts of each embodiment are all referred to each other, and each embodiment mainly describes differences from other embodiments. In particular, for system embodiments, since they are substantially similar to method embodiments, the description is relatively simple, as relevant to see a section of the description of method embodiments.
The foregoing description is only of the preferred embodiments of the present invention and is not intended to limit the scope of the present invention. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention are included in the protection scope of the present invention.

Claims (9)

1. An information processing method, applied to a gateway, the gateway including a first interface, the method comprising:
receiving first request information initiated by a client through the first interface;
forwarding the first request information to a service gateway for the service gateway to return first response information corresponding to the first request information in case the state parameter value of the first interface is adjusted to a first parameter value;
generating first identification information according to the first request information and the acquired address of the client;
the first identification information and first test information are stored in a first database corresponding to the gateway in an associated mode, and the first test information is used for testing response information triggered by the first request information; the first test information includes: the first request information and the corresponding first response information; the first database stores a plurality of pieces of mutually associated identification information and test information, and the identification information is used for identifying the test information associated with the identification information;
receiving second request information sent by the client through the first interface;
generating second identification information according to the second request information and the address of the client under the condition that the state parameter value of the first interface is adjusted to be a second parameter value;
acquiring second response information associated with the second identification information;
and sending the second response information to the client.
2. The method of claim 1, wherein prior to said receiving, via said first interface, client initiated first request information, the method further comprises:
setting interface parameters of the first interface, wherein the interface parameters comprise: the state parameter value of the first interface, the address of the simulation server, and the address of at least one of the clients.
3. The method of claim 1, wherein the gateway includes a second interface, and wherein after the generating the first identification information according to the first request information and the acquired address of the client, the method further includes:
and sending the first identification information and the first test information to a simulation server through the second interface so as to be used for modifying the first test information by the simulation server.
4. The method according to claim 1, wherein the gateway comprises a third interface, and wherein, in case the state parameter value of the first interface is adjusted to a second parameter value, the method further comprises, after generating second identification information according to the second request information and the address of the client:
receiving third response information sent by the simulation server through the third interface, wherein the third response information is response information generated by the simulation server according to the second response information; the second database corresponding to the simulation server stores a plurality of pieces of identification information and test information which are associated with each other, and the test information comprises second response information;
the sending the second response information to the client includes:
and sending the third response information to the client.
5. The method of claim 1, wherein after the sending the second response information to the client, the method further comprises:
receiving indication information sent by the client, wherein the indication information comprises the first identification information, and the indication information is used for indicating to clear the first identification information and the first test information associated with the first identification information;
and clearing the first identification information and the first test information which are associated with each other in the first database.
6. The method of claim 1, wherein after the storing the first identification information and the first test information in association with the first database corresponding to the gateway, the method further comprises:
and sending the first response information to the client for the client to check the received first response information and historical response information, wherein the historical response information is response information which is stored in the client in advance and corresponds to the first request information.
7. An information processing apparatus, characterized by being applied to a gateway including a first interface, the apparatus comprising:
the receiving module is used for receiving first request information initiated by the client through the first interface;
the forwarding module is used for forwarding the first request information to a service gateway when the state parameter value of the first interface is adjusted to be a first parameter value, so that the service gateway returns first response information corresponding to the first request information;
the generation module is used for generating first identification information according to the first request information and the acquired address of the client;
the storage module is used for storing the first identification information and first test information in a first database corresponding to the gateway in an associated mode, and the first test information is used for testing response information triggered by the first request information; the first test information includes: the first request information and the corresponding first response information; the first database stores a plurality of pieces of mutually associated identification information and test information, and the identification information is used for identifying the test information associated with the identification information;
the first receiving module is used for receiving second request information sent by the client through the first interface;
the first generation module is used for generating second identification information according to the second request information and the address of the client when the state parameter value of the first interface is adjusted to be a second parameter value;
the acquisition module is used for acquiring second response information associated with the second identification information;
and the first sending module is used for sending the second response information to the client.
8. The electronic equipment is characterized by comprising a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory are communicated with each other through the communication bus;
a memory for storing a computer program;
a processor for carrying out the method steps of any one of claims 1-6 when executing a program stored on a memory.
9. A computer readable storage medium, on which a computer program is stored, characterized in that the program, when being executed by a processor, implements the method according to any of claims 1-6.
CN202211054750.8A 2022-08-31 2022-08-31 Information processing method and device, electronic equipment and readable storage medium Active CN115396501B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211054750.8A CN115396501B (en) 2022-08-31 2022-08-31 Information processing method and device, electronic equipment and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211054750.8A CN115396501B (en) 2022-08-31 2022-08-31 Information processing method and device, electronic equipment and readable storage medium

Publications (2)

Publication Number Publication Date
CN115396501A CN115396501A (en) 2022-11-25
CN115396501B true CN115396501B (en) 2024-01-30

Family

ID=84124667

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211054750.8A Active CN115396501B (en) 2022-08-31 2022-08-31 Information processing method and device, electronic equipment and readable storage medium

Country Status (1)

Country Link
CN (1) CN115396501B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116719750B (en) * 2023-08-11 2023-12-22 海马云(天津)信息技术有限公司 Software testing method and device, server equipment and storage medium

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CA2595758A1 (en) * 2005-01-25 2006-08-03 Whitehat Security, Inc. System for detecting vulnerabilities in web applications using client-side application interfaces
CN108156053A (en) * 2017-12-26 2018-06-12 阿里巴巴集团控股有限公司 Method for processing business, device, system and server
WO2018125268A1 (en) * 2016-12-30 2018-07-05 Google Llc Systems and methods for configuration verification across secured network boundaries
CN110798445A (en) * 2019-09-12 2020-02-14 中国平安财产保险股份有限公司 Public gateway interface testing method and device, computer equipment and storage medium
CN111049713A (en) * 2019-12-27 2020-04-21 联通物联网有限责任公司 Intelligent home gateway, network management platform, processing method and storage medium
WO2021135809A1 (en) * 2019-12-30 2021-07-08 北京金山云网络技术有限公司 Testing method, device, terminal apparatus, and storage medium
CN113467780A (en) * 2021-06-30 2021-10-01 北京达佳互联信息技术有限公司 Data acquisition method and device, electronic equipment and storage medium
CN113590352A (en) * 2021-07-28 2021-11-02 未鲲(上海)科技服务有限公司 Data calling method, device, equipment and readable storage medium
CN113923144A (en) * 2021-09-18 2022-01-11 北京奇艺世纪科技有限公司 Service test system, method, electronic device and storage medium

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10103966B2 (en) * 2014-07-03 2018-10-16 Netmotion Wireless, Inc. Analysis and diagnosis of connectivity in a multi-device network
US20180309627A1 (en) * 2017-04-25 2018-10-25 Abode Systems, Inc. On-demand monitoring
US10628276B2 (en) * 2018-06-29 2020-04-21 International Business Machines Corporation Unit test framework for testing code in a gateway service

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CA2595758A1 (en) * 2005-01-25 2006-08-03 Whitehat Security, Inc. System for detecting vulnerabilities in web applications using client-side application interfaces
WO2018125268A1 (en) * 2016-12-30 2018-07-05 Google Llc Systems and methods for configuration verification across secured network boundaries
CN108156053A (en) * 2017-12-26 2018-06-12 阿里巴巴集团控股有限公司 Method for processing business, device, system and server
CN110798445A (en) * 2019-09-12 2020-02-14 中国平安财产保险股份有限公司 Public gateway interface testing method and device, computer equipment and storage medium
CN111049713A (en) * 2019-12-27 2020-04-21 联通物联网有限责任公司 Intelligent home gateway, network management platform, processing method and storage medium
WO2021135809A1 (en) * 2019-12-30 2021-07-08 北京金山云网络技术有限公司 Testing method, device, terminal apparatus, and storage medium
CN113467780A (en) * 2021-06-30 2021-10-01 北京达佳互联信息技术有限公司 Data acquisition method and device, electronic equipment and storage medium
CN113590352A (en) * 2021-07-28 2021-11-02 未鲲(上海)科技服务有限公司 Data calling method, device, equipment and readable storage medium
CN113923144A (en) * 2021-09-18 2022-01-11 北京奇艺世纪科技有限公司 Service test system, method, electronic device and storage medium

Also Published As

Publication number Publication date
CN115396501A (en) 2022-11-25

Similar Documents

Publication Publication Date Title
US7844692B2 (en) Web server multiplier for analyzing resource leaks
CN108897691A (en) Data processing method, device, server and medium based on interface analog service
US9329961B2 (en) Testing development using real-time traffic
CN110727589A (en) Test method, device and equipment
CN109618176B (en) Processing method, equipment and storage medium for live broadcast service
CN110879781B (en) Program debugging method, device, electronic equipment and computer readable storage medium
CN115396501B (en) Information processing method and device, electronic equipment and readable storage medium
CN112306973B (en) Picture importing system and method
CN112115049B (en) Application program testing method, device, equipment and computer readable storage medium
CN112671574B (en) Front-end and back-end joint debugging method and device, proxy equipment and storage medium
CN114625645A (en) Service testing method and device, electronic equipment and readable storage medium
CN112379965B (en) Sandbox file mapping system, client device, mapping end device, sandbox file mapping method and electronic equipment
CN113760724A (en) Automatic testing method and device, electronic equipment and computer readable medium
CN116627849B (en) System test method, device, equipment and storage medium
CN114500348B (en) CDN gateway testing method and system
CN114978970B (en) Data testing system, method, equipment and medium based on custom mock platform
CN118210696A (en) Protocol interface automatic test method and device, storage medium and electronic equipment
CN114221996A (en) Service calling method and device, electronic equipment and storage medium
CN112579325A (en) Business object processing method and device, electronic equipment and storage medium
CN114466000A (en) CDN gateway source returning method and device
CN114285774A (en) Flow recording method and device, electronic equipment and storage medium
CN112948332B (en) Point cloud file packaging and analyzing method and device
CN115373970A (en) Software system testing method and device
CN115373973A (en) Software system testing method and device
CN116159304A (en) Cloud game deployment method and device, electronic equipment and readable storage 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