CN109756390B - Method and device for automatically testing connectivity of network accelerator - Google Patents

Method and device for automatically testing connectivity of network accelerator Download PDF

Info

Publication number
CN109756390B
CN109756390B CN201811489276.5A CN201811489276A CN109756390B CN 109756390 B CN109756390 B CN 109756390B CN 201811489276 A CN201811489276 A CN 201811489276A CN 109756390 B CN109756390 B CN 109756390B
Authority
CN
China
Prior art keywords
target acceleration
acceleration
target
node
interactive interface
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
CN201811489276.5A
Other languages
Chinese (zh)
Other versions
CN109756390A (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.)
Netease Hangzhou Network Co Ltd
Original Assignee
Netease Hangzhou Network 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 Netease Hangzhou Network Co Ltd filed Critical Netease Hangzhou Network Co Ltd
Priority to CN201811489276.5A priority Critical patent/CN109756390B/en
Publication of CN109756390A publication Critical patent/CN109756390A/en
Application granted granted Critical
Publication of CN109756390B publication Critical patent/CN109756390B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The application relates to a method for automatically testing the connectivity of a network accelerator, which comprises the following steps: sending an acceleration request to a network accelerator, wherein the acceleration request comprises: the network accelerator is used for accelerating the target acceleration object by adopting the target acceleration node; receiving an acceleration result returned by the network accelerator, and starting a target acceleration object if the acceleration is successful; acquiring communication information between the started target acceleration object and a target acceleration object server; when the connection information is successful, acquiring process routing information corresponding to the target acceleration object; and determining the connectivity between the target acceleration node and the target acceleration object server according to the process routing information. The method not only improves the testing efficiency, but also greatly saves the testing cost. In addition, a device for automatically testing the connectivity of the network accelerator, computer equipment and a storage medium are also provided.

Description

Method and device for automatically testing connectivity of network accelerator
Technical Field
The invention relates to the technical field of computers, in particular to a method and a device for automatically testing connectivity of a network accelerator, computer equipment and a storage medium.
Background
In the current network accelerator industry, it is often necessary to test the connectivity between an acceleration node and a server of an acceleration object (e.g., a game), where the test is to verify that the acceleration object can be normally connected to the server of the acceleration object after being accelerated by the acceleration node, and to ensure that all data of the acceleration object is forwarded by the acceleration node.
Disclosure of Invention
In view of the above, it is desirable to provide a method, an apparatus, a computer device and a storage medium for automatically testing the connectivity of a network accelerator, which are efficient and low in cost.
In a first aspect, an embodiment of the present invention provides a method for automatically testing connectivity of a network accelerator, where the method includes:
sending an acceleration request to a network accelerator, wherein the acceleration request comprises: the network accelerator is used for accelerating a target acceleration object by adopting the target acceleration node;
receiving an acceleration result returned by the network accelerator, and starting the target acceleration object if the acceleration is successful;
acquiring communication information between the started target acceleration object and a target acceleration object server;
when the connection information is successful, acquiring process routing information corresponding to the target acceleration object;
and determining the connectivity between the target acceleration node and the target acceleration object server according to the process routing information.
In one embodiment, the obtaining of the connection information between the target acceleration object and the target acceleration object server after the starting includes: determining a target acceleration object server corresponding to the target acceleration object; acquiring a preset matching operation corresponding to the target acceleration object; and executing the preset matching operation, and determining the communication information between the target acceleration object and the target acceleration object server according to the result of the preset matching operation.
In one embodiment, the performing the preset matching operation and obtaining the connection information between the target acceleration object and the target acceleration object server according to the result of the preset matching operation includes: acquiring an image sequence corresponding to the preset matching operation; acquiring an initial interactive interface of the target acceleration object, taking the initial interactive interface as a current interactive interface, matching the current interactive interface with a corresponding picture in the image sequence, if the matching is successful, interacting with the current interactive interface according to a preset interaction action to enter a next interactive interface, taking the next interactive interface as the current interactive interface, entering a step of matching the current interactive interface with the corresponding picture in the image sequence, and sequentially circulating until the current interactive interface enters the target interactive interface; and matching the target interactive interface with the corresponding picture in the image sequence, and if the matching is successful, judging that the target acceleration object is in a connection state with the target acceleration object server.
In one embodiment, the determining connectivity between the target acceleration node and the target acceleration object server based on the process routing information comprises: acquiring a routing address in the process routing information; acquiring an acceleration mode of a target acceleration node, and determining a target address corresponding to the acceleration mode; and when the routing address is a target address, judging that the target acceleration node is communicated with the target acceleration object server.
In one embodiment, the obtaining an acceleration pattern of a target acceleration node and determining a target address corresponding to the acceleration pattern includes: when the acceleration mode of the target acceleration node is a first mode, taking the address of the target acceleration node as the target address; and when the acceleration mode of the target acceleration node is a second mode, taking the virtual address as the target address.
In one embodiment, the acceleration request further includes: verifying the field information; and the network accelerator is also used for verifying the legality of the acceleration request according to the verification field information, and if the validity is verified, the step of accelerating the target acceleration object by using the target acceleration node is carried out.
In a second aspect, an embodiment of the present invention provides an apparatus for automatically testing connectivity of a network accelerator, where the apparatus includes:
a request sending module, configured to send an acceleration request to a network accelerator, where the acceleration request includes: the network accelerator is used for accelerating a target acceleration object by adopting the target acceleration node;
the result receiving module is used for receiving an acceleration result returned by the network accelerator, and if the acceleration is successful, the target acceleration object is started;
the communication information acquisition module is used for acquiring communication information between the started target acceleration object and a target acceleration object server;
a routing information obtaining module, configured to obtain, when the connection information is successful, process routing information corresponding to the target acceleration object;
and the connectivity determining module is used for determining the connectivity between the target acceleration node and the target acceleration object server according to the process routing information.
In one embodiment, the connectivity information obtaining module includes: a server determination module that determines a target acceleration object server corresponding to the target acceleration object; the matching operation acquisition module is used for acquiring a preset matching operation corresponding to the target acceleration object; and the execution module is used for executing the preset matching operation and determining the communication information between the target acceleration object and the target acceleration object server according to the result of the preset matching operation.
In one embodiment, the execution module is further configured to obtain an image sequence corresponding to the preset matching operation; acquiring an initial interactive interface of the target acceleration object, taking the initial interactive interface as a current interactive interface, matching the current interactive interface with a corresponding picture in the image sequence, if the matching is successful, interacting with the current interactive interface according to a preset interaction action to enter a next interactive interface, taking the next interactive interface as the current interactive interface, entering a step of matching the current interactive interface with the corresponding picture in the image sequence, and sequentially circulating until the current interactive interface enters the target interactive interface; and matching the target interactive interface with the corresponding picture in the image sequence, and if the matching is successful, judging that the target acceleration object is in a connection state with the target acceleration object server.
In one embodiment, the connectivity determining module is further configured to obtain a routing address in the process routing information; acquiring an acceleration mode of a target acceleration node, and determining a target address corresponding to the acceleration mode; and when the routing address is a target address, judging that the target acceleration node is communicated with the target acceleration object server.
In one embodiment, the connectivity determination module is further configured to use the address of the target acceleration node as the target address when the acceleration mode of the target acceleration node is the first mode; and when the acceleration mode of the target acceleration node is a second mode, taking the virtual address as the target address.
In one embodiment, the acceleration request further includes: verifying the field information; and the network accelerator is also used for verifying the legality of the acceleration request according to the verification field information, and if the validity is verified, the step of accelerating the target acceleration object by using the target acceleration node is carried out.
In a third aspect, an embodiment of the present invention provides a computer device, including a memory and a processor, where the memory stores a computer program, and the computer program, when executed by the processor, causes the processor to execute the following steps:
sending an acceleration request to a network accelerator, wherein the acceleration request comprises: the network accelerator is used for accelerating a target acceleration object by adopting the target acceleration node;
receiving an acceleration result returned by the network accelerator, and starting the target acceleration object if the acceleration is successful;
acquiring communication information between the started target acceleration object and a target acceleration object server;
when the connection information is successful, acquiring process routing information corresponding to the target acceleration object;
and determining the connectivity between the target acceleration node and the target acceleration object server according to the process routing information.
In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium, in which a computer program is stored, and when the computer program is executed by a processor, the processor is caused to execute the following steps:
sending an acceleration request to a network accelerator, wherein the acceleration request comprises: the network accelerator is used for accelerating a target acceleration object by adopting the target acceleration node;
receiving an acceleration result returned by the network accelerator, and starting the target acceleration object if the acceleration is successful;
acquiring communication information between the started target acceleration object and a target acceleration object server;
when the connection information is successful, acquiring process routing information corresponding to the target acceleration object;
and determining the connectivity between the target acceleration node and the target acceleration object server according to the process routing information.
The method, the device, the computer equipment and the storage medium for automatically testing the connectivity of the network accelerator firstly send an acceleration request to the network accelerator, receive a returned acceleration result, if the acceleration is successful, start a target acceleration object, then obtain the communication information between the target acceleration object and a target acceleration object server, if the communication information is successful, obtain the process routing information corresponding to the target acceleration, and then determine the connectivity between a target acceleration node and the target acceleration object server according to the process routing information. The method realizes the automatic testing of the connectivity between the target acceleration node and the target acceleration object server, and can automatically complete the testing without manual work, thereby not only improving the testing efficiency, but also greatly saving the testing cost.
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, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the structures shown in the drawings without creative efforts.
FIG. 1 is a flow diagram of a method for automatically testing connectivity of a network accelerator in one embodiment;
FIG. 2 is a flow diagram of a method for obtaining connectivity information in one embodiment;
FIG. 3 is a flow diagram illustrating an embodiment of performing a default matching operation;
FIG. 4 is a flow diagram of a method for determining connectivity of a target acceleration node and a target acceleration object server in one embodiment;
FIG. 5 is a flow diagram that illustrates a method for automatically testing connectivity of a network accelerator, according to one embodiment;
FIG. 6 is a block diagram of an apparatus for automatically testing connectivity of a network accelerator in one embodiment;
FIG. 7 is a block diagram illustrating the structure of a connectivity information obtaining module in one embodiment;
FIG. 8 is a diagram illustrating an internal structure of a computer device according to an embodiment.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
As shown in fig. 1, a method for automatically testing connectivity of a network accelerator is provided, where the method for automatically testing connectivity of a network accelerator is applied to a terminal, and the method for automatically testing connectivity of a network accelerator specifically includes the following steps:
step 102, sending an acceleration request to a network accelerator, wherein the acceleration request comprises: the network accelerator is used for accelerating the target acceleration object by adopting the target acceleration node.
The target acceleration node information refers to information of an acceleration node to be measured. The target acceleration node information includes: at least one of an IP address, a port number, an acceleration mode, etc. of the target acceleration node. The target acceleration object information refers to information of a target acceleration object to be measured, and the target acceleration object information includes at least one of a target acceleration object identifier, a target acceleration object server identifier, and the like. The target acceleration object identification is used to uniquely identify an acceleration object. An acceleration object generally refers to a terminal application, such as a Windows-based desktop application. In particular, a game application, a video application, etc.
The network accelerator is internet acceleration software and consists of user terminal software and an acceleration server. The acceleration server may include a plurality of acceleration nodes therein, the acceleration nodes configured to accelerate the network. After the terminal sends an acceleration request to the network accelerator, the network accelerator accelerates the target acceleration object by adopting the target acceleration node according to the acceleration request.
In one embodiment, the web accelerator client provides a service interface (HTTP interface) that automatically opens an HTTP service when the web accelerator client is opened. The services provided by the interface include: the service 1,/acc, uses the designated acceleration node to accelerate the designated acceleration object, and the required parameters include: the IP address, the port number, the acceleration mode, the acceleration object identifier and the acceleration object server identifier of the acceleration node; service 2,/get _ status, acquiring the current acceleration state, returning to 0 without acceleration, and returning to 1 after acceleration; service 3,/stop _ acc, stops the current acceleration.
After the network accelerator receives the acceleration request, firstly, the service 3 is called to stop the last acceleration, then the service 1 is called, the target acceleration object is accelerated according to the target acceleration node in the acceleration request, then the service 2 is called to obtain the acceleration state, whether the acceleration is successful is judged, and the obtained acceleration result is returned through the service interface.
And 104, receiving an acceleration result returned by the network accelerator, entering the step 106 if the acceleration is successful, and otherwise, judging that the acceleration connectivity fails.
The terminal receives an acceleration result returned by the network accelerator, the acceleration result is divided into two types, the acceleration is successful and the acceleration is failed, and if the acceleration is failed, the result of the acceleration connectivity test is not passed. If the acceleration is successful, the target acceleration object is connected with the target acceleration node.
Step 106, starting the target acceleration object, obtaining the communication information between the started target acceleration object and the target acceleration object server, entering step 108 when the communication information is successful, and if the communication information is connection failure, determining that the acceleration connectivity is failed.
The target acceleration object server refers to a server corresponding to the target acceleration object, that is, a background server of the target acceleration object. For example, if the target acceleration object is a game, the target acceleration object server is a background server of the game.
After determining that the target acceleration object is connected with the target acceleration node, the connectivity between the target acceleration object and the target acceleration object server needs to be verified next. In order to verify whether the target acceleration object can be successfully connected to the target acceleration object server, the target acceleration object needs to be started, and then connection information between the started target acceleration object and the target acceleration object server is acquired. The connectivity information is used to determine a connectivity result. The connection result is divided into a connection success and a connection failure. If the connection fails, the result of the accelerated connectivity test is not passed. If the connection is successful, the target acceleration object can be connected to the target acceleration server.
And step 108, acquiring process routing information corresponding to the target acceleration object.
Wherein, the process routing information refers to the routing information of the target acceleration object process. The process routing information includes: and the routing address comprises a local address and a remote address. The automatic testing of the network accelerator connectivity not only needs to verify that the target acceleration object can be normally connected to the target acceleration object server through the target acceleration object, but also needs to ensure that the data of the target acceleration object are forwarded through the target acceleration node. Further detection of process routing information is required because there may be situations where the target acceleration object establishes a connection directly with the target acceleration object server without going through the target acceleration node.
And step 110, determining the connectivity between the target acceleration node and the target acceleration object server according to the process routing information.
After the process routing information is acquired, whether the data of the target acceleration object are forwarded by the target acceleration node or not can be judged according to the process routing information, if yes, the target acceleration node and the target acceleration object server are communicated, and if not, the result of the acceleration connectivity test is judged to be failed.
In one embodiment, the method for automatically testing the connectivity of the network accelerator is automatically executed by using a script written by Python (an object-oriented programming language), so that the method realizes the automatic test of the network acceleration connectivity, improves the efficiency of automatically testing the connectivity of the network accelerator, and greatly saves the test cost.
The method, the device, the computer equipment and the storage medium for automatically testing the connectivity of the network accelerator firstly send an acceleration request to the network accelerator, receive a returned acceleration result, if the acceleration is successful, start a target acceleration object, then obtain the communication information between the target acceleration object and a target acceleration object server, if the communication information is successful, obtain the process routing information corresponding to the target acceleration, and then determine the connectivity between a target acceleration node and the target acceleration object server according to the process routing information. The method realizes the automatic testing of the connectivity between the target acceleration node and the target acceleration object server, and can automatically complete the testing without manual work, thereby not only improving the testing efficiency, but also greatly saving the testing cost.
As shown in fig. 2, in an embodiment, acquiring connectivity information between the started target acceleration object and the target acceleration object server includes:
step 106A, a target acceleration object server corresponding to the target acceleration object is determined.
The target acceleration object may correspond to a plurality of servers, and only one of the servers can be connected at the same time, so that the target acceleration object server is selected and determined. For example, a game corresponds to different servers in different areas, and the corresponding game server can be determined by selecting an area (large area). Of course, only one server is provided for the target acceleration object, and the server is directly used as the target acceleration object server.
And step 106B, acquiring a preset matching operation corresponding to the target acceleration object.
The preset matching operation refers to a series of operations automatically performed after the target acceleration object is started. For different acceleration objects, the corresponding preset matching operations are different, so the preset matching operation corresponding to the target acceleration object is acquired. For example, assuming that the target acceleration object is a certain game, an operation action for operating the game is set in advance, and after the game is started, the game operation is automatically started according to a preset matching operation. Namely, the automatic control technology of a human-computer interaction interface (UI) is realized.
And 106C, executing a preset matching operation, and determining the communication information between the target acceleration object and the target acceleration object server according to the result of the preset matching operation.
And if the target interaction interface can not be accessed, the target acceleration object cannot be connected to the corresponding server. In one embodiment, the script file written by Python is used for automatically executing corresponding operations according to preset matching operations. For example, if the target acceleration object is a game, a series of game operations such as opening the game, automatically starting the game, and the like are performed, and then whether an intended game scene is successfully entered is checked to verify whether the game can be normally connected to the corresponding game server. The preset matching operations are preset for different target acceleration objects, so that the corresponding preset matching operations can be automatically executed to obtain the connectivity between the target acceleration object and the target acceleration object server.
In one embodiment, the performing a preset matching operation, and obtaining connectivity information between the target acceleration object and the target acceleration object server according to a result of the preset matching operation includes: acquiring an image sequence corresponding to a preset matching operation; acquiring an initial interactive interface of a target acceleration object, taking the initial interactive interface as a current interactive interface, matching the current interactive interface with a corresponding picture in an image sequence, if the matching is successful, interacting with the current interactive interface according to a preset interaction action to enter a next interactive interface, taking the next interactive interface as the current interactive interface, entering a step of matching the current interactive interface with the corresponding picture in the image sequence, and sequentially circulating until the current interactive interface enters the target interactive interface; and matching the target interactive interface with the corresponding picture in the image sequence, and if the matching is successful, judging that the target acceleration object and the target acceleration object server are in a connection state.
The image sequence includes a plurality of images, which can be arranged in a matching order. For example, if there are 3 pictures A, B, C in the image sequence, the arrangement order may be set according to the matching order. After the target acceleration object is started, the initial interactive interface is firstly entered, the initial interactive interface is used as the current interactive interface, then the current interactive interface is matched with the picture corresponding to the current interactive interface in the image sequence, if the matching is successful, the current interactive page is indicated to be the preset interactive interface, then the current interactive interface is interacted with the current interactive interface according to the preset interactive action, for example, the central position of the current interactive interface is clicked, then the next interactive interface is entered, similarly, the next interactive interface is continuously matched with the corresponding picture in the image sequence, and if the matching is successful, the next interactive interface is continuously entered until the target interactive interface is entered. The target interactive interface is the last interface needing to be matched, and if the target interactive interface can be successfully entered, the target acceleration object and the target acceleration object server are in a connection state. For example, for a game scenario, first, a game home page is entered, then a next game page is entered by interacting (e.g., clicking), and then a game lobby page is entered by interacting. If the lobby page can be entered, it indicates that a connection to the game server is possible. Therefore, the images of the game home page are matched firstly, if the matching is successful, the entry to the game home page is indicated, then the interaction is carried out to enter the next game page, if the next game page can be successfully matched, the entry to the game hall page is continued, if the game hall page is successfully matched, the entry to the game hall page is successfully indicated, and the indication can be connected to the game server. Fig. 3 is a schematic flow chart illustrating the execution of the preset matching operation in one embodiment. Firstly, after entering an initial interactive interface, matching the initial interactive interface with an expected interactive interface, if the matching is successful, interactively entering an intermediate interactive interface, then matching the intermediate interactive interface with the expected intermediate interactive interface, if the matching is successful, entering a target interactive interface, matching the target interactive interface with the expected target interactive interface, if the matching is successful, indicating that the target interactive interface is successfully entered, and simultaneously indicating that a target acceleration object and a target acceleration object server are in a connection state.
As shown in FIG. 4, in one embodiment, the determining connectivity between the target acceleration node and the target acceleration object server based on the process routing information comprises:
step 110A, obtaining a routing address in the process routing information.
Wherein the routing address comprises a local address and a remote address.
And step 110B, acquiring an acceleration mode of a target acceleration node, and determining a target address corresponding to the acceleration mode.
Wherein, the target addresses corresponding to different acceleration modes are different. For example, for an acceleration node in Proxy mode (Proxy mode), the remote address in the process routing information is the address of the acceleration node, and if the acceleration node is in other mode, the local address of the process routing information is the virtual address.
And step 110C, judging whether the routing address is the target address, if so, entering step 110D, and if not, judging that the accelerated connectivity fails.
After the routing address in the process routing information is acquired, whether the routing address is a target address or not is judged, if yes, the target acceleration node and the target acceleration object server are judged to be communicated, and if not, the data which is not forwarded by the target acceleration node is indicated, and the acceleration connectivity is judged to fail.
And step 110D, judging that the target acceleration node is communicated with the target acceleration object server.
And when the acquired routing address is the target address, judging that the target acceleration node is communicated with the target acceleration object server.
In one embodiment, the obtaining an acceleration pattern of a target acceleration node and determining a target address corresponding to the acceleration pattern includes: when the acceleration mode of the target acceleration node is a first mode, taking the address of the target acceleration node as the target address; and when the acceleration mode of the target acceleration node is a second mode, taking the virtual address as the target address.
Wherein the first mode is different from the second mode. For example, the first mode may be a proxy mode and the second mode may be another mode. The target addresses corresponding to different acceleration modes are different, when the acceleration mode is the first mode, the address of the target acceleration node is used as the target address, and when the acceleration mode is the second mode, the virtual address is used as the target address.
In one embodiment, the acceleration request further includes: verifying the field information; and the network accelerator is also used for verifying the legality of the acceleration request according to the verification field information, and if the validity is verified, the step of accelerating the target acceleration object by using the target acceleration node is carried out.
The verification field information is used for verifying the legality of the request, and the interface is prevented from being abused. After receiving an acceleration request sent by a terminal, a network accelerator firstly acquires verification field information, then verifies the validity of the acceleration request according to the verification field information, and if the acceleration request is legal, the network accelerator accelerates a target acceleration object by adopting a target acceleration node. In one embodiment, the network accelerator detects an acceleration request on a local interface (for example, listening to a local 2013-2022 port), determines whether the acceleration request contains a netaseuu-Auth-Code field, and contracts a series of encryption and decryption rules, and if the acceleration request lacks the field or the value of the field is invalid, the interface uniformly returns HTTP 401 (unauthenticated), thereby preventing the abuse of the interface.
Fig. 5 is a flowchart illustrating a method for automatically testing connectivity of a network accelerator according to an embodiment. Firstly, an acceleration request is sent to a network accelerator, the network accelerator accelerates a target acceleration object by using a target acceleration node, and a returned acceleration result is received. Secondly, judging whether the acceleration is successful, if so, starting the target acceleration object, automatically operating, judging whether the expected scene can be entered, if so, acquiring process routing information of the target acceleration object, and judging the connectivity between the target acceleration node and the target acceleration object server according to the process routing information.
In an application scenario, a target acceleration object is a game application, and sends an acceleration request to a network accelerator, where the acceleration request includes: the IP address, port number, acceleration mode, game name, large zone, and server of the acceleration node. And receiving a returned acceleration result, starting the game if the acceleration is successful, performing a series of game operations, judging whether an expected game scene can be successfully entered, if so, indicating that the connection with the game server is successful, acquiring the progress routing information of the game, judging whether the data of the game are forwarded through the target acceleration node, namely judging whether the target acceleration node is communicated with the game server. Specifically, routing information of the game process is obtained through a psutuil module in a Python script file, and if the routing information is an acceleration node in a Proxy mode, a remote address of the routing of the game process is an address of the acceleration node; if it is an acceleration node of other modes, the local address of the route of the game process should be a virtual address. If the above conditions are satisfied, the connectivity test of the node is considered to pass.
As shown in fig. 6, in one embodiment, an apparatus for automatically testing connectivity of a network accelerator is provided, the apparatus comprising:
a request sending module 602, configured to send an acceleration request to a network accelerator, where the acceleration request includes: the network accelerator is used for accelerating a target acceleration object by adopting the target acceleration node;
a result receiving module 604, configured to receive an acceleration result returned by the network accelerator, and if the acceleration is successful, start the target acceleration object;
a connection information obtaining module 606, configured to obtain connection information between the started target acceleration object and the target acceleration object server;
a routing information obtaining module 608, configured to obtain, when the connection information is successful, process routing information corresponding to the target acceleration object;
a connectivity determining module 610, configured to determine connectivity between the target acceleration node and the target acceleration object server according to the process routing information.
As shown in fig. 7, in an embodiment, the connectivity information obtaining module includes:
a server determination module 606A that determines a target acceleration object server corresponding to the target acceleration object;
a matching operation obtaining module 606B, configured to obtain a preset matching operation corresponding to the target acceleration object;
an executing module 606C, configured to execute the preset matching operation, and determine, according to a result of the preset matching operation, communication information between the target acceleration object and the target acceleration object server.
In one embodiment, the executing module 606C is further configured to obtain an image sequence corresponding to the preset matching operation; acquiring an initial interactive interface of the target acceleration object, taking the initial interactive interface as a current interactive interface, matching the current interactive interface with a corresponding picture in the image sequence, if the matching is successful, interacting with the current interactive interface according to a preset interaction action to enter a next interactive interface, taking the next interactive interface as the current interactive interface, entering a step of matching the current interactive interface with the corresponding picture in the image sequence, and sequentially circulating until the current interactive interface enters the target interactive interface; and matching the target interactive interface with the corresponding picture in the image sequence, and if the matching is successful, judging that the target acceleration object is in a connection state with the target acceleration object server.
In one embodiment, the connectivity determining module 610 is further configured to obtain a routing address in the process routing information; acquiring an acceleration mode of a target acceleration node, and determining a target address corresponding to the acceleration mode; and when the routing address is a target address, judging that the target acceleration node is communicated with the target acceleration object server.
In one embodiment, the connectivity determining module 610 is further configured to take the address of the target acceleration node as the target address when the acceleration mode of the target acceleration node is the first mode; and when the acceleration mode of the target acceleration node is a second mode, taking the virtual address as the target address.
In one embodiment, the acceleration request further includes: verifying the field information; and the network accelerator is also used for verifying the legality of the acceleration request according to the verification field information, and if the validity is verified, the step of accelerating the target acceleration object by using the target acceleration node is carried out.
FIG. 8 is a diagram illustrating an internal structure of a computer device in one embodiment. The computer device may be a terminal. As shown in fig. 8, the computer device includes a processor, a memory, and a network interface connected by a system bus. Wherein the memory includes a non-volatile storage medium and an internal memory. The non-volatile storage medium of the computer device stores an operating system and also stores a computer program, and when the computer program is executed by a processor, the computer program can enable the processor to realize the method for automatically testing the connectivity of the network accelerator. The internal memory may also have stored therein a computer program that, when executed by the processor, causes the processor to perform a method of automatically testing connectivity of a network accelerator. The network interface is used for communicating with an external device. Those skilled in the art will appreciate that the architecture shown in fig. 8 is merely a block diagram of some of the structures associated with the disclosed aspects and is not intended to limit the computing devices to which the disclosed aspects apply, as particular computing devices may include more or less components than those shown, or may combine certain components, or have a different arrangement of components.
In one embodiment, the method for automatically testing the connectivity of the network accelerator provided by the application can be implemented in the form of a computer program, and the computer program can be run on a computer device as shown in fig. 8. The memory of the computer device can store various program templates which form the automatic test network accelerator connectivity device. For example, the request sending module 602, the result receiving module 604, the connectivity information obtaining module 606, the routing information obtaining module 608, and the connectivity determining module 610.
A computer device comprising a memory and a processor, the memory storing a computer program that, when executed by the processor, causes the processor to perform the steps of: sending an acceleration request to a network accelerator, wherein the acceleration request comprises: the network accelerator is used for accelerating a target acceleration object by adopting the target acceleration node; receiving an acceleration result returned by the network accelerator, and starting the target acceleration object if the acceleration is successful; acquiring communication information between the started target acceleration object and a target acceleration object server; when the connection information is successful, acquiring process routing information corresponding to the target acceleration object; and determining the connectivity between the target acceleration node and the target acceleration object server according to the process routing information.
In one embodiment, the obtaining of the connection information between the target acceleration object and the target acceleration object server after the starting includes: determining a target acceleration object server corresponding to the target acceleration object; acquiring a preset matching operation corresponding to the target acceleration object; and executing the preset matching operation, and determining the communication information between the target acceleration object and the target acceleration object server according to the result of the preset matching operation.
In one embodiment, the performing the preset matching operation and obtaining the connection information between the target acceleration object and the target acceleration object server according to the result of the preset matching operation includes: acquiring an image sequence corresponding to the preset matching operation; acquiring an initial interactive interface of the target acceleration object, taking the initial interactive interface as a current interactive interface, matching the current interactive interface with a corresponding picture in the image sequence, if the matching is successful, interacting with the current interactive interface according to a preset interaction action to enter a next interactive interface, taking the next interactive interface as the current interactive interface, entering a step of matching the current interactive interface with the corresponding picture in the image sequence, and sequentially circulating until the current interactive interface enters the target interactive interface; and matching the target interactive interface with the corresponding picture in the image sequence, and if the matching is successful, judging that the target acceleration object is in a connection state with the target acceleration object server.
In one embodiment, said determining connectivity between said target acceleration node and said target acceleration object server based on said process routing information comprises: acquiring a routing address in the process routing information; acquiring an acceleration mode of a target acceleration node, and determining a target address corresponding to the acceleration mode; and when the routing address is a target address, judging that the target acceleration node is communicated with the target acceleration object server.
In one embodiment, the obtaining an acceleration pattern of a target acceleration node and determining a target address corresponding to the acceleration pattern includes: when the acceleration mode of the target acceleration node is a first mode, taking the address of the target acceleration node as the target address; and when the acceleration mode of the target acceleration node is a second mode, taking the virtual address as the target address.
In one embodiment, the acceleration request further includes: verifying the field information; and the network accelerator is also used for verifying the legality of the acceleration request according to the verification field information, and if the validity is verified, the step of accelerating the target acceleration object by using the target acceleration node is carried out.
A computer-readable storage medium storing a computer program which, when executed by a processor, causes the processor to perform the steps of: sending an acceleration request to a network accelerator, wherein the acceleration request comprises: the network accelerator is used for accelerating a target acceleration object by adopting the target acceleration node; receiving an acceleration result returned by the network accelerator, and starting the target acceleration object if the acceleration is successful; acquiring communication information between the started target acceleration object and a target acceleration object server; when the connection information is successful, acquiring process routing information corresponding to the target acceleration object; and determining the connectivity between the target acceleration node and the target acceleration object server according to the process routing information.
In one embodiment, the obtaining of the connection information between the target acceleration object and the target acceleration object server after the starting includes: determining a target acceleration object server corresponding to the target acceleration object; acquiring a preset matching operation corresponding to the target acceleration object; and executing the preset matching operation, and determining the communication information between the target acceleration object and the target acceleration object server according to the result of the preset matching operation.
In one embodiment, the performing the preset matching operation and obtaining the connection information between the target acceleration object and the target acceleration object server according to the result of the preset matching operation includes: acquiring an image sequence corresponding to the preset matching operation; acquiring an initial interactive interface of the target acceleration object, taking the initial interactive interface as a current interactive interface, matching the current interactive interface with a corresponding picture in the image sequence, if the matching is successful, interacting with the current interactive interface according to a preset interaction action to enter a next interactive interface, taking the next interactive interface as the current interactive interface, entering a step of matching the current interactive interface with the corresponding picture in the image sequence, and sequentially circulating until the current interactive interface enters the target interactive interface; and matching the target interactive interface with the corresponding picture in the image sequence, and if the matching is successful, judging that the target acceleration object is in a connection state with the target acceleration object server.
In one embodiment, said determining connectivity between said target acceleration node and said target acceleration object server based on said process routing information comprises: acquiring a routing address in the process routing information; acquiring an acceleration mode of a target acceleration node, and determining a target address corresponding to the acceleration mode; and when the routing address is a target address, judging that the target acceleration node is communicated with the target acceleration object server.
In one embodiment, the obtaining an acceleration pattern of a target acceleration node and determining a target address corresponding to the acceleration pattern includes: when the acceleration mode of the target acceleration node is a first mode, taking the address of the target acceleration node as the target address; and when the acceleration mode of the target acceleration node is a second mode, taking the virtual address as the target address.
In one embodiment, the acceleration request further includes: verifying the field information; and the network accelerator is also used for verifying the legality of the acceleration request according to the verification field information, and if the validity is verified, the step of accelerating the target acceleration object by using the target acceleration node is carried out.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by a computer program, which can be stored in a non-volatile computer-readable storage medium, and can include the processes of the embodiments of the methods described above when the program is executed. Any reference to memory, storage, database, or other medium used in the embodiments provided herein may include non-volatile and/or volatile memory, among others. Non-volatile memory can include read-only memory (ROM), Programmable ROM (PROM), Electrically Programmable ROM (EPROM), Electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), Dynamic RAM (DRAM), Synchronous DRAM (SDRAM), Double Data Rate SDRAM (DDRSDRAM), Enhanced SDRAM (ESDRAM), Synchronous Link DRAM (SLDRAM), Rambus Direct RAM (RDRAM), direct bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
The technical features of the above embodiments can be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the above embodiments are not described, but should be considered as the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
The above-mentioned embodiments only express several embodiments of the present application, and the description thereof is more specific and detailed, but not construed as limiting the scope of the present application. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the concept of the present application, which falls within the scope of protection of the present application. Therefore, the protection scope of the present patent shall be subject to the appended claims.

Claims (10)

1. A method of automatically testing connectivity of a network accelerator, the method comprising:
sending an acceleration request to a network accelerator, wherein the acceleration request comprises: target acceleration node information and target acceleration object information, wherein the network accelerator performs network acceleration on a target acceleration object through a target acceleration node;
determining that the acceleration result returned by the network accelerator is received as successful acceleration;
acquiring a communication state between the target acceleration object and a target acceleration object server, and acquiring process routing information corresponding to the target acceleration object when the communication state is successful;
and determining the connectivity between the target acceleration node and the target acceleration object server according to the process routing information, wherein the step of determining the connectivity between the target acceleration node and the target acceleration object server according to the process routing information is to judge whether the data of the target acceleration object are all forwarded by the target acceleration node according to the routing address in the routing information.
2. The method of claim 1, wherein determining that the connectivity status between the target acceleration object and the target acceleration object server is successful comprises:
acquiring a preset matching operation corresponding to the target acceleration object;
and executing the preset matching operation, and determining that the connection state between the target acceleration object and the target acceleration object server is successful according to the result of the preset matching operation.
3. The method according to claim 2, wherein the performing the preset matching operation, and determining that the connection status between the target acceleration object and the target acceleration object server is successful according to the result of the preset matching operation comprises:
acquiring an image sequence corresponding to the preset matching operation;
acquiring an initial interactive interface of the target acceleration object, taking the initial interactive interface as a current interactive interface, matching the current interactive interface with a corresponding picture in the image sequence, if the matching is successful, interacting with the current interactive interface according to a preset interaction action to enter a next interactive interface, taking the next interactive interface as the current interactive interface, entering a step of matching the current interactive interface with the corresponding picture in the image sequence, and sequentially circulating until the current interactive interface enters the target interactive interface;
and matching the target interactive interface with the pictures in the image sequence, and if the matching is successful, determining that the connection state between the target acceleration object and the target acceleration object server is successful.
4. The method of claim 1, wherein said determining connectivity between said target acceleration node and said target acceleration object server based on said process routing information comprises:
acquiring a routing address in the process routing information;
acquiring an acceleration mode of a target acceleration node, and determining a target address corresponding to the acceleration mode;
and when the routing address is a target address, judging that the target acceleration node is communicated with the target acceleration object server.
5. The method of claim 4, wherein obtaining an acceleration pattern of a target acceleration node and determining a target address corresponding to the acceleration pattern comprises:
when the acceleration mode of the target acceleration node is a first mode, taking the address of the target acceleration node as the target address;
and when the acceleration mode of the target acceleration node is a second mode, taking the virtual address as the target address.
6. The method of claim 1, wherein the acceleration request further comprises: verifying the field information;
and the network accelerator is also used for verifying the legality of the acceleration request according to the verification field information, and if the validity is verified, the step of accelerating the target acceleration object by using the target acceleration node is carried out.
7. An apparatus for automatically testing network accelerator connectivity, the apparatus comprising:
a request sending module, configured to send an acceleration request to a network accelerator, where the acceleration request includes: the network accelerator performs network acceleration on the target acceleration object through the target acceleration node;
the result receiving module is used for receiving an acceleration result returned by the network accelerator, and if the acceleration is successful, the target acceleration object is started;
the communication information acquisition module is used for acquiring communication information between the started target acceleration object and a target acceleration object server;
a routing information obtaining module, configured to obtain, when the connection information is successful, process routing information corresponding to the target acceleration object;
and a connectivity determining module, configured to determine connectivity between the target acceleration node and the target acceleration object server according to the process routing information, where the step of determining connectivity between the target acceleration node and the target acceleration object server according to the process routing information is to determine whether all data of the target acceleration object is forwarded by the target acceleration node according to a routing address in the routing information.
8. The apparatus of claim 7, wherein the connectivity information obtaining module comprises:
a server determination module that determines a target acceleration object server corresponding to the target acceleration object;
the matching operation acquisition module is used for acquiring a preset matching operation corresponding to the target acceleration object;
and the execution module is used for executing the preset matching operation and determining the communication information between the target acceleration object and the target acceleration object server according to the result of the preset matching operation.
9. A computer device comprising a memory and a processor, the memory storing a computer program that, when executed by the processor, causes the processor to perform the steps of the method according to any one of claims 1 to 6.
10. A computer-readable storage medium, storing a computer program which, when executed by a processor, causes the processor to carry out the steps of the method according to any one of claims 1 to 6.
CN201811489276.5A 2018-12-06 2018-12-06 Method and device for automatically testing connectivity of network accelerator Active CN109756390B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811489276.5A CN109756390B (en) 2018-12-06 2018-12-06 Method and device for automatically testing connectivity of network accelerator

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811489276.5A CN109756390B (en) 2018-12-06 2018-12-06 Method and device for automatically testing connectivity of network accelerator

Publications (2)

Publication Number Publication Date
CN109756390A CN109756390A (en) 2019-05-14
CN109756390B true CN109756390B (en) 2020-12-01

Family

ID=66403641

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811489276.5A Active CN109756390B (en) 2018-12-06 2018-12-06 Method and device for automatically testing connectivity of network accelerator

Country Status (1)

Country Link
CN (1) CN109756390B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112217679B (en) * 2020-10-16 2024-05-31 腾讯科技(深圳)有限公司 Application acceleration method, device, computer equipment and storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103840980A (en) * 2012-11-23 2014-06-04 上海贝尔股份有限公司 Method and device for detecting connectivity of bidirectional LSP
CN104252416A (en) * 2013-06-28 2014-12-31 华为技术有限公司 Accelerator and data processing method
CN108847999A (en) * 2018-04-24 2018-11-20 普联技术有限公司 Device network method for detecting connectivity, device, terminal device and storage medium

Family Cites Families (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101931628B (en) * 2010-08-27 2012-12-05 清华大学 Method and device for verifying intra-domain source addresses
CN102271084A (en) * 2011-07-13 2011-12-07 深圳市极限网络科技有限公司 Technology for locating communication paths of network host
CN102833339B (en) * 2012-08-31 2017-02-08 中兴通讯股份有限公司 CDN (Content Delivery Network) and network fused service control method and service control equipment
CN105050194A (en) * 2015-09-07 2015-11-11 中国联合网络通信集团有限公司 Network resource control method and device
CN107438268B (en) * 2016-03-31 2021-12-24 阿里巴巴集团控股有限公司 Method and device for accelerating wireless network for mobile device
CN106126402B (en) * 2016-06-14 2019-06-04 网易(杭州)网络有限公司 The processing method and processing device of accelerator exception
CN108121587B (en) * 2016-11-30 2021-05-04 华为技术有限公司 Data acceleration method and virtual accelerator
CN106730835A (en) * 2016-12-16 2017-05-31 青岛蘑菇网络技术有限公司 A kind of network game accelerated method and system based on router and vpn server
CN206313803U (en) * 2016-12-16 2017-07-07 青岛蘑菇网络技术有限公司 A kind of router for realizing network game acceleration
CN108419241B (en) * 2018-03-07 2021-06-15 北京元心科技有限公司 Method and device for determining pseudo base station and terminal equipment

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103840980A (en) * 2012-11-23 2014-06-04 上海贝尔股份有限公司 Method and device for detecting connectivity of bidirectional LSP
CN104252416A (en) * 2013-06-28 2014-12-31 华为技术有限公司 Accelerator and data processing method
CN108847999A (en) * 2018-04-24 2018-11-20 普联技术有限公司 Device network method for detecting connectivity, device, terminal device and storage medium

Also Published As

Publication number Publication date
CN109756390A (en) 2019-05-14

Similar Documents

Publication Publication Date Title
CN109788032B (en) Method and device for acquiring mirror image file, computer equipment and storage medium
CN109257427B (en) Service processing method and system based on block chain
CN110248216B (en) Television screen projection method and device, television screen projection system and computer equipment
CN110781070B (en) Big data test verification method and device, computer equipment and storage medium
CN112929326A (en) Malicious domain name access detection method and device and computer readable storage medium
CN109688186B (en) Data interaction method, device, equipment and readable storage medium
CN110555769A (en) Block chain transaction data processing method and device, computer equipment and storage medium
CN110363026A (en) File operation method, device, equipment, system and computer readable storage medium
CN110727935B (en) Single sign-on method, system, computer device and storage medium
CN113315943A (en) Conference information transmission method, system, computer equipment and storage medium
CN111541546A (en) Multi-platform login method, device, equipment and readable medium
CN109756390B (en) Method and device for automatically testing connectivity of network accelerator
CN113271337B (en) Method and device for subscribing computer message
CN112804222B (en) Data transmission method, device, equipment and storage medium based on cloud deployment
CN112732463A (en) Message subscription method and device based on big data
CN115277223A (en) Equipment identifier obtaining method and device, computer equipment and storage medium
US11729246B2 (en) Apparatus and method for determining types of uniform resource locator
CN111597573A (en) Page embedding method and device, computer equipment and storage medium
CN113949629A (en) Server substrate management controller initialization method and device and computer equipment
CN111782447A (en) Batch test updating method and device based on SSH service and computer equipment
CN112149951A (en) Risk control method and device, computer equipment and storage medium
JP2006209322A (en) Access control system and method, server device, terminal device, and program
US12081674B2 (en) Detecting failures in remote online notarization session and workflow initiation for curing same
CN110798678A (en) Video integrity detection method and device, computer equipment and readable storage medium
CN112165406B (en) Interface message testing method and device, computer equipment and 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