CN112994982A - Packet capture control method, device and system of cloud-real machine and storage medium - Google Patents

Packet capture control method, device and system of cloud-real machine and storage medium Download PDF

Info

Publication number
CN112994982A
CN112994982A CN202110265697.5A CN202110265697A CN112994982A CN 112994982 A CN112994982 A CN 112994982A CN 202110265697 A CN202110265697 A CN 202110265697A CN 112994982 A CN112994982 A CN 112994982A
Authority
CN
China
Prior art keywords
packet capturing
real machine
cloud
target
packet
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202110265697.5A
Other languages
Chinese (zh)
Inventor
宋大伟
杨群峰
朱斌华
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Suzhou Qinyou Network Technology Co ltd
Original Assignee
Suzhou Qinyou Network Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Suzhou Qinyou Network Technology Co ltd filed Critical Suzhou Qinyou Network Technology Co ltd
Priority to CN202110265697.5A priority Critical patent/CN112994982A/en
Publication of CN112994982A publication Critical patent/CN112994982A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/04Processing captured monitoring data, e.g. for logfile generation
    • H04L43/045Processing captured monitoring data, e.g. for logfile generation for graphical visualisation of monitoring data
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/02Protocols based on web technology, e.g. hypertext transfer protocol [HTTP]
    • H04L67/025Protocols based on web technology, e.g. hypertext transfer protocol [HTTP] for remote control or remote monitoring of applications
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/14Session management
    • H04L67/146Markers for unambiguous identification of a particular session, e.g. session cookie or URL-encoding

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Data Mining & Analysis (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The embodiment of the invention discloses a packet capturing control method, a device, a system and a storage medium of a cloud real machine, wherein the method comprises the following steps: when a packet capturing request sent by a cloud real machine client is received, extracting cloud real machine identifications in the packet capturing request, and positioning target cloud real machines corresponding to the cloud real machine identifications in all currently maintained cloud real machines; generating a packet capturing control instruction matched with the packet capturing request, and sending the packet capturing control instruction to the target cloud real machine; when target packet capturing data fed back by the target cloud real machine aiming at the packet capturing control instruction are received, the target packet capturing data are sent to the cloud real machine client side for visual display, efficient acquisition of the target packet capturing data is achieved, meanwhile, the server generates a packet capturing control instruction matched with the packet capturing request, the corresponding target packet capturing data are acquired according to the packet capturing control instruction, and the influence of a network environment on packet capturing control of the cloud real machine is overcome.

Description

Packet capture control method, device and system of cloud-real machine and storage medium
Technical Field
The embodiment of the invention relates to the technical field of network transmission, in particular to a method, a device and a system for packet capture control of a cloud-real machine and a storage medium.
Background
With the continuous development of network technology, the test requirements on the application programs are continuously increased, and the application programs are tested by remotely controlling a large amount of cloud real machine equipment, so that the method has important significance for meeting the continuously increased test requirements.
When the cloud real machine is used, a user needs to perform real-time packet capturing to obtain network request data of an application program in the mobile terminal device. At present, Network request data acquisition based on a cloud-real machine mainly includes packet capture through a Virtual Private Network (VPN) of the cloud-real machine and real-time packet capture through a debug agent tool findler; the method comprises the steps that packet capturing is carried out through a VPN of a cloud real machine, the VPN needs to be established in the cloud real machine, and all network requests pass through the VPN to obtain network request data of an application program; however, the same cloud and real machine can only use one VPN, and if a VPN agent is already used, the newly-built VPN can knock down the existing VPN when the VPN packet capturing is performed, so that the packet capturing data acquisition of the cloud and real machine is limited; and real-time packet capturing is carried out through Fiddler, a cloud real machine and a host machine for deploying the Fiddler need to be in the same network, and if the network changes, data packet capturing of the cloud real machine cannot be realized, so that the limitation of the network is large.
Disclosure of Invention
The embodiment of the invention provides a method, a device and a system for packet capture control of a cloud real machine and a storage medium, so as to realize packet capture control of the cloud real machine.
In a first aspect, an embodiment of the present invention provides a packet capture control method for a cloud-real machine, which is executed by a server, and includes:
when a packet capturing request sent by a cloud real machine client is received, extracting cloud real machine identifications in the packet capturing request, and positioning target cloud real machines corresponding to the cloud real machine identifications in all currently maintained cloud real machines;
generating a packet capturing control instruction matched with the packet capturing request, and sending the packet capturing control instruction to the target cloud real machine;
and when target packet capturing data fed back by the target cloud real machine aiming at the packet capturing control instruction are received, the target packet capturing data are sent to the cloud real machine client side for visual display.
In a second aspect, an embodiment of the present invention provides a packet capture control method for a cloud real machine, which is executed by the cloud real machine, and includes:
receiving a packet capturing control instruction sent by a server;
and performing packet capturing processing according to the packet capturing control instruction to obtain target packet capturing data and send the target packet capturing data to the server, so that the server sends the target packet capturing data to the cloud real machine client for visual display.
In a third aspect, an embodiment of the present invention provides a packet capture control device for a cloud-real machine, which is applied to a server, and includes:
the device comprises an identification extraction module, a cloud real machine identification module and a cloud real machine identification module, wherein the identification extraction module is used for extracting the cloud real machine identification in a packet capturing request when receiving the packet capturing request sent by a cloud real machine client side, and positioning a target cloud real machine corresponding to the cloud real machine identification in each currently maintained cloud real machine;
the instruction generating module is used for generating a packet capturing control instruction matched with the packet capturing request and sending the packet capturing control instruction to the target cloud real machine;
and the data sending module is used for sending the target packet capturing data to the cloud real machine client for visual display when receiving the target packet capturing data fed back by the target cloud real machine aiming at the packet capturing control instruction.
In a fourth aspect, an embodiment of the present invention provides a packet capture control device for a cloud-based fax machine, which is applied to the cloud-based fax machine, and includes:
the instruction receiving module is used for receiving a packet capturing control instruction sent by the server;
and the packet capturing execution module is used for performing packet capturing processing according to the packet capturing control instruction to obtain target packet capturing data and sending the target packet capturing data to the server, so that the server sends the target packet capturing data to the cloud real machine client for visual display.
In a fifth aspect, an embodiment of the present invention provides a packet capture control system for a cloud-real machine, including a cloud-real-machine client device, a server, and at least one cloud-real machine; the server realizes the packet capturing control method of the cloud real machine in the first embodiment of the invention; the cloud real machine realizes the packet capture control method of the cloud real machine according to the second embodiment of the invention.
In a sixth aspect, an embodiment of the present invention further provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the computer-readable storage medium implements the packet capture control method for a cloud-based fax machine according to any embodiment of the present invention.
According to the technical scheme disclosed in the embodiment of the invention, when a server receives a packet capturing request sent by a cloud real machine client, a cloud real machine identifier in the packet capturing request is extracted, and a target cloud real machine corresponding to the cloud real machine identifier is positioned in each currently maintained cloud real machine; generating a packet capturing control instruction matched with the packet capturing request, and sending the packet capturing control instruction to a target cloud real machine; when target packet capturing data fed back by a target cloud real machine aiming at a packet capturing control instruction are received, the target packet capturing data are sent to a cloud real machine client side for visual display, efficient acquisition of the target packet capturing data is achieved, meanwhile, a packet capturing control instruction matched with a packet capturing request is generated through a server, corresponding target packet capturing data are acquired according to the packet capturing control instruction, and the influence of a network environment on packet capturing control of the cloud real machine is overcome.
Drawings
Fig. 1A is an application scenario diagram of a packet capture control method of a cloud-real machine according to the present invention;
fig. 1B is a flowchart of a packet capture control method of a cloud-real machine according to an embodiment of the present invention;
fig. 2A is a flowchart of a packet capture control method of a cloud-real machine according to a second embodiment of the present invention;
fig. 2B is a data flow diagram of a packet capture control method of a cloud-real machine according to a second embodiment of the present invention;
fig. 3 is a block diagram of a packet capture control device of a cloud-real machine according to a third embodiment of the present invention;
fig. 4 is a block diagram of a packet capture control device of a cloud-real machine according to a fourth embodiment of the present invention;
fig. 5A is a block diagram of a packet capture control system of a cloud-real machine according to a fifth embodiment of the present invention;
fig. 5B is a data flow chart of a packet capture control method of a cloud-real machine according to a fifth embodiment of the present invention.
Detailed Description
Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While certain embodiments of the present disclosure are shown in the drawings, it is to be understood that the present disclosure may be embodied in various forms and should not be construed as limited to the embodiments set forth herein, but rather are provided for a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the disclosure are for illustration purposes only and are not intended to limit the scope of the disclosure.
It should be understood that the various steps recited in the method embodiments of the present disclosure may be performed in a different order, and/or performed in parallel. Moreover, method embodiments may include additional steps and/or omit performing the illustrated steps. The scope of the present disclosure is not limited in this respect.
The term "include" and variations thereof as used herein are open-ended, i.e., "including but not limited to". The term "based on" is "based, at least in part, on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". Relevant definitions for other terms will be given in the following description.
It should be noted that the terms "first", "second", and the like in the present disclosure are only used for distinguishing different devices, modules or units, and are not used for limiting the order or interdependence relationship of the functions performed by the devices, modules or units.
It is noted that references to "a", "an", and "the" modifications in this disclosure are intended to be illustrative rather than limiting, and that those skilled in the art will recognize that "one or more" may be used unless the context clearly dictates otherwise.
The names of messages or information exchanged between devices in the embodiments of the present disclosure are for illustrative purposes only, and are not intended to limit the scope of the messages or information.
The packet capture control method of the cloud real machine can be applied to the application scene shown in fig. 1A. The cloud real machine client device 101 is connected with the server 102, the server 102 is connected with the plurality of cloud real machines 103, the cloud real machine client device 101 is an initiator of a data capture packet, the cloud real machine 103 is an executed party of the data capture packet, a user communicates with the server 102 through the cloud real machine client device 101, and then the cloud real machine is used for performing packet capture operation on a target cloud real machine which needs to perform the data capture packet in the plurality of cloud real machines 103 through the server 102. In fig. 1A, the server 102 is connected to two cloud computers 103 as an example. In the embodiment of the present invention, the cloud real machine client device 101 is an operating device that is installed with a cloud real machine application program and performs data packet capturing on the cloud real machine 103 by sending a packet capturing request; the server 102 is a device for receiving and analyzing a packet capturing instruction from the cloud real machine client device 101 and performing unified centralized management on the plurality of cloud real machines 103; the cloud server 103 is a target device for which the cloud server client device 101 needs to perform data packet capturing; the user accesses the server 102 through the cloud-real-machine application program in the cloud-real-machine client device 101, and then packet capturing of the data of the cloud-real-machine 103 is achieved.
Example one
Fig. 1B is a flowchart of a packet capture control method of a cloud server according to an embodiment of the present invention, where this embodiment is applicable to a server that sends a corresponding packet capture control instruction to a target cloud server when receiving a packet capture request from a cloud server client, and forwards target packet capture data fed back by the cloud server to the cloud server client, where this method may be executed by a packet capture control device of the cloud server according to a third embodiment of the present invention, and this device may be implemented by software and/or hardware and integrated in the server, where this method specifically includes the following steps:
s110, when a packet capturing request sent by a cloud real machine client is received, extracting cloud real machine identifications in the packet capturing request, and positioning target cloud real machines corresponding to the cloud real machine identifications in all currently maintained cloud real machines.
A cloud machine; the method is characterized in that a cloud server is accessed through a webpage or an application program, so that a user can remotely operate and use the real mobile terminal equipment on line, and the real mobile terminal equipment can be mobile terminal equipment of various brands; the cloud terminal machine is used for providing various mobile terminal devices of different brands for users, so that the users can remotely operate and use the cloud terminal machine through a webpage or an application program, and the operation that a large amount of mobile terminal devices need to be used can be met, such as application program test, compatibility test, performance test and recurrent program loopholes; meanwhile, the method can avoid the user from purchasing and managing a large amount of mobile terminal equipment, and further can reduce the use cost of the user. In the embodiment of the invention, a preset number of mobile terminal devices of different brands can be configured in advance to serve as cloud terminal machines, and the cloud terminal machines are kept connected with a server for a long time through an entity connecting line (for example, a Universal Serial Bus (USB) data line); the connecting line is in charge of data transmission between the server and the cloud real machine, and meanwhile, the connecting line can provide electric quantity for the connected cloud real machine. The server is adopted to perform centralized maintenance and management on the cloud real machines by pre-establishing the connection between the cloud real machines and the server, so that a user can be directly connected to a target cloud real machine to be used through the server, and the use efficiency of the cloud real machine is improved.
The cloud real machine client is an application program for accessing and operating the cloud real machine and comprises a display interface; the display interface can display the screen of the cloud real machine selected by the user in real time; specifically, after a user successfully logs in a cloud real machine client, the cloud real machine client displays brands and performance parameters corresponding to all cloud real machines; the user clicks and selects the cloud real machine to be used in the cloud real machine catalog, and after the successful connection is established with the selected cloud real machine, the display interface of the cloud real machine client displays the screen of the current cloud real machine; note that for an already occupied real cloud machine, it may be marked as an occupied state in the real cloud machine client, and may not be selected. Furthermore, the user can remotely control the currently connected cloud real machine to perform corresponding operations on the display interface, for example, the user clicks to install and uninstall the target software, and the corresponding operation process and operation results are displayed on the display interface. Through the real quick-witted customer end of cloud, can remote access server, and then realize convenient control and the operation to the real machine of cloud, can acquire the screen image of the real machine of target cloud through showing interface simultaneously in real time, can more audio-visual operation result of looking over.
Particularly, in the embodiment of the invention, a packet capturing control key is added on the basis of the existing display interface in the cloud real machine client; correspondingly, a data packet capturing module is added in each cloud real machine; wherein, packet capturing refers to intercepting, retransmitting, editing and unloading data packets transmitted and received by network transmission; the corresponding network data are obtained through packet capturing, and then the obtained network data are analyzed, so that the network use condition of a target user or an application program can be obtained, and further targeted improvement is provided. Specifically, after detecting a selection instruction of a packet capturing control key, the cloud terminal sends a packet capturing request to the server, the server sends a corresponding packet capturing control command to the target cloud terminal according to the packet capturing request, the target cloud terminal controls a preset data packet capturing module to start to capture and acquire target data, and the acquired network request data is sent to a display interface of the cloud terminal through a preset data transmission channel to be displayed. Through the newly-added data packet capturing function, the cloud real machine can be operated and used through the cloud real machine client, and meanwhile, the packet capturing data can be acquired.
The packet capturing request refers to a data packet capturing instruction sent by the cloud machine client to the server; after receiving a packet capturing request sent by a cloud real machine client, a server analyzes the content of the packet capturing request to obtain a cloud real machine identifier contained in the packet capturing request, and determines a cloud real machine needing data capturing through the cloud real machine identifier; the cloud real machine identification is a character string which is used for identifying one cloud real machine and is uniformly maintained and managed by the server, all the corresponding relations between the cloud real machine identification and the cloud real machine are stored in the server in advance, and the matched cloud real machine can be determined in a plurality of cloud real machines through the cloud real machine identification; and the target cloud real machine is a cloud real machine which needs to perform data packet capturing operation at present, namely the cloud real machine corresponding to the cloud real machine identification in the packet capturing request. The packet capturing request of the cloud real machine client is analyzed through the server, the corresponding cloud real machine identification is obtained, the corresponding target cloud real machine is further determined, and the determination of the target cloud real machine needing data packet capturing is achieved.
And S120, generating a packet capturing control instruction matched with the packet capturing request, and sending the packet capturing control instruction to the target cloud real machine.
The packet capturing control instruction is command information which is generated by the server according to a packet capturing request of the cloud real machine client and used for controlling a target cloud real machine to start packet capturing operation; the server can control the target cloud real machine to start to execute data packet capturing by sending the packet capturing control instruction to the corresponding target cloud real machine, so that packet capturing data can be acquired; in particular, the cloud host machines of different operating systems correspond to different forms of packet capture control instructions. Specifically, after a server determines a corresponding target cloud real machine from a plurality of maintained cloud real machines according to a received packet capturing request of a cloud real machine client, a packet capturing control instruction which accords with a transmission protocol of the server and the target cloud real machine is generated, and the generated packet capturing control instruction is sent to the corresponding target cloud real machine, so that the target cloud real machine starts to perform data packet capturing operation through a packet capturing process, and the control of the server on a data packet capturing of the cloud real machine is realized; the data transmission protocol between the server and the cloud server can be preset.
Optionally, in the embodiment of the present invention, the cloud terminal may be an android terminal; the sending the packet capturing control instruction to the target cloud real machine may include: and sending the packet capturing control instruction to the target cloud real machine through an android debugging bridge. The Android terminal is terminal equipment provided with an Android operating system, wherein the Android operating system is an open source mobile terminal operating system which is most widely applied at present; an Android Debug Bridge (adb), which is a general command line tool, can implement communication with a simulator instance or connected Android devices; correspondingly, the adb command may be used to perform various device operations (e.g., installing and debugging applications). In the embodiment of the invention, when the cloud terminal of the server operation and maintenance is an android terminal, an android debugging bridge is preset in the server and the cloud terminal, so that the server is responsible for communication between the cloud terminal client and the cloud terminal; through the android debugging bridge, the server can control the cloud real machine to carry out installation and debugging of the application program based on the adb command, and corresponding data packet capturing operation. Specifically, after receiving a packet grabbing request, the server generates a packet grabbing control instruction which accords with an android debugging bridge command, and sends the packet grabbing control instruction to the target cloud terminal through the android debugging bridge, so that the target cloud terminal performs data packet grabbing operation through a preset packet grabbing process, and packet grabbing control of the server on the target cloud terminal is realized; meanwhile, a control command mode is adopted, so that the influence of a network environment on packet capturing control is avoided, and the stability of the packet capturing control of the cloud real machine is improved.
S130, when target packet capturing data fed back by the target cloud real machine aiming at the packet capturing control instruction are received, the target packet capturing data are sent to the cloud real machine client side for visual display.
And the target packet capturing data is corresponding packet capturing data acquired by the target cloud real machine after data packet capturing operation is performed according to the packet capturing control instruction. Specifically, after the server sends the packet capturing control instruction to the target cloud real machine, the target cloud real machine performs packet capturing operation on target data according to the acquired packet capturing control instruction, acquires corresponding target packet capturing data, and feeds the acquired target packet capturing data back to the server; after receiving the target packet capturing data fed back by the target cloud real machine, the server forwards the target packet capturing data to the corresponding cloud real machine client; after receiving the target packet capturing data forwarded by the server, the cloud machine client performs visual display on the target packet capturing data on a display interface, so that the server acquires and forwards the target packet capturing data; meanwhile, the target packet capturing data is visually displayed on the cloud real machine client, so that the target packet capturing data can be visually displayed.
According to the technical scheme disclosed in the embodiment of the invention, when a server receives a packet capturing request sent by a cloud real machine client, a cloud real machine identifier in the packet capturing request is extracted, and a target cloud real machine corresponding to the cloud real machine identifier is positioned in each currently maintained cloud real machine; generating a packet capturing control instruction matched with the packet capturing request, and sending the packet capturing control instruction to a target cloud real machine; when target packet capturing data fed back by a target cloud real machine aiming at a packet capturing control instruction are received, the target packet capturing data are sent to a cloud real machine client side for visual display, efficient acquisition of the target packet capturing data is achieved, meanwhile, a packet capturing control instruction matched with a packet capturing request is generated through a server, corresponding target packet capturing data are acquired according to the packet capturing control instruction, and the influence of a network environment on packet capturing control is overcome.
Example two
Fig. 2A is a flowchart of a packet capture control method for a cloud terminal according to a second embodiment of the present invention, where this embodiment is applicable to acquiring target packet capture data when the cloud terminal receives a packet capture control instruction, and the method may be executed by a packet capture control device of the cloud terminal according to a fourth embodiment of the present invention, where the device may be implemented by software and/or hardware and is integrated in the cloud terminal, and the method specifically includes the following steps:
and S210, receiving a packet capturing control instruction sent by the server.
S220, packet capturing processing is carried out according to the packet capturing control command, target packet capturing data are obtained and sent to the server, and therefore the server sends the target packet capturing data to the cloud real machine client side for visual display.
Specifically, after receiving a packet capturing control instruction sent by a server, the cloud terminal performs packet capturing operation on target data through a pre-configured packet capturing program according to the packet capturing control instruction to obtain corresponding target packet capturing data; particularly, in the embodiment of the present invention, when the target data is subjected to packet capture by using the pre-configured packet capture program, the obtained target data may be screened according to the preset rule, for example, the network request data with empty content is screened to obtain effective target packet capture data, so that the quality of the obtained target packet capture data may be improved. Further, the acquired target packet capturing data is sent to a connected server, the target packet capturing data can be directly sent to the server through a packet capturing process, or the target packet capturing data can be sent to the server through a preset data transmission channel; after receiving the corresponding target packet capturing data, the server forwards the target packet capturing data to a display interface of the cloud real machine client for visual display; the acquisition of the target packet capturing data is realized, and meanwhile, the target packet capturing data is transmitted by selecting a proper data transmission channel, so that the safety of data transmission can be ensured, and the efficiency of data transmission can be improved.
Optionally, in this embodiment of the present invention, the receiving the packet capture control instruction sent by the server may include: receiving the packet capturing control instruction sent by the server through an android debugging bridge; the packet capturing processing according to the packet capturing control instruction to obtain target packet capturing data and send the target packet capturing data to the server may include: establishing and starting a packet capturing process according to the packet capturing control instruction; performing packet capturing processing through the packet capturing process to obtain target packet capturing data, and sending the target packet capturing data to the currently running cloud real machine process; and sending the target packet capturing data to the server through the cloud real machine process. The packet capturing process is a program for executing data packet capturing operation in the cloud real machine and can be configured in advance; the cloud real machine process is a program for accessing the cloud real machine into the server and performing corresponding operation (for example, transmission of a screen image of the cloud real machine and acquisition and execution of a screen operation instruction of the cloud real machine) on the cloud real machine according to a control instruction of the server, and can realize high-efficiency transmission of a large amount of data; particularly, in the embodiment of the invention, the packet capturing process and the cloud real machine process are two processes which are independent of each other; through the packet capturing process and the cloud real machine process, remote operation on the cloud real machine and high-efficiency acquisition of target packet capturing data can be achieved.
Specifically, as shown in fig. 2B, when the target cloud real machine D1 is an android terminal, a packet capture control instruction from the server S is acquired through an android debug bridge, and a packet capture process P1 for target data (e.g., network request data) is established and started according to the acquired packet capture control instruction; and performing packet capturing operation on the matched target data in the cloud real machine through the current packet capturing process to obtain the target packet capturing data. Particularly, after the matched target packet capturing data is acquired through the packet capturing process P1, the target packet capturing data is sent to the cloud real machine process P2, the target packet capturing data is sent to the server S through the cloud real machine process P2, and the target packet capturing data is further forwarded to the cloud real machine client C1 through the server S for visual display; the cloud real machine process always keeps communication connection with the server, and the transmission of the target packet capturing data is carried out through the cloud real machine process, so that the stability of the transmission of the target packet capturing data can be ensured; particularly, the transmission of the target packet capturing data does not influence the transmission of original data (such as screen images) in the cloud real machine process, and the stability of the cloud real machine system is ensured.
Optionally, in this embodiment of the present invention, the performing packet capturing processing through the packet capturing process to obtain target packet capturing data may include: setting a global hypertext transfer protocol proxy through the packet capturing process; and monitoring the hypertext transfer protocol packet transmitted in the target cloud real machine in a man-in-the-middle mode based on the global hypertext transfer protocol agent through the packet capturing process, and determining the monitored hypertext transfer protocol packet as the target packet capturing data. The hypertext Transfer Protocol (HTTP) is a communication Protocol which is most widely used in information transmission in the current internet, and for example, HTTP protocols are adopted for web connection requests, web browsing and data downloading; global agent, which refers to agent network users to obtain all network information; by setting a global proxy, all network requests of a user cannot be directly sent to a network server, but are sent to a proxy Internet Protocol (IP) address or a proxy server, and then sent to the network server through the proxy IP address or the proxy server, and correspondingly, corresponding result information obtained according to the network requests also needs to be forwarded through the proxy IP address or the proxy server; through the global agent, all network use data of the application can be obtained, and through analysis of the network data, the running condition of the application can be obtained, so that targeted optimization and improvement of the application can be realized.
The global hypertext transfer protocol proxy, namely a global proxy aiming at the HTTP protocol network request, means that all network requests and returned result data based on the HTTP protocol of a user need to pass through a proxy IP address or a proxy server; meanwhile, the global agent has a storage function and can store the network data passing through the agent; by setting the global HTTP proxy in the cloud real machine, the data packet based on the HTTP protocol can be accurately acquired. The man-in-the-middle mode is that when the packet capturing process captures the data packets, the HTTP data packets are captured by adopting the IP address in the middle, and the corresponding HTTP data packets are obtained by adopting the man-in-the-middle mode to serve as the target packet capturing data, so that the influence of the packet capturing process on normal network use is avoided, and meanwhile, the target packet capturing data is obtained.
Optionally, in this embodiment of the present invention, the sending the target packet capturing data to the currently running cloud real machine process may include: and sending the target packet capturing data to a currently running cloud real machine process in a socket mode. Socket (Socket) is an abstraction of an endpoint for performing bidirectional communication between application processes on different hosts in a network, and one Socket is one end of a communication process on the network and may include an IP address and a port number. In the embodiment of the invention, the target data packet is sent from the packet capturing process to the cloud real machine process in the form of the socket, so that the accurate transmission of the target data packet can be ensured. Optionally, the target cloud real machine may send the target packet capturing data to the server in a socket form; the server can send the target packet capturing data to the cloud real-time machine client in a socket form for visual display, and accurate acquisition of the target packet capturing data by the cloud real-time machine client is guaranteed.
According to the technical scheme disclosed in the embodiment of the invention, after the cloud real machine receives the packet capturing control instruction sent by the server; performing packet capturing processing according to the acquired packet capturing control instruction to obtain target packet capturing data, and sending the target packet capturing data to the server so that the server sends the target packet capturing data to the cloud real machine client for visual display; the acquisition of the target packet capturing data is realized, and the visual display of the target packet capturing data is further realized, so that a user can view the target packet capturing data more intuitively; meanwhile, a man-in-the-middle mode is adopted to capture the target data, so that the influence of a capture process on the normal use of the cloud real machine is avoided, and the stability of the capture control of the cloud real machine is improved; in addition, an HTTP data packet is monitored and acquired in a global HTTP proxy mode, the influence of a network environment on the data packet capturing is avoided, and the applicability of the data packet capturing of the cloud real machine is improved.
EXAMPLE III
Fig. 3 is a block diagram of a packet capture control device of a cloud-real machine according to a third embodiment of the present invention, where the device specifically includes: an identification extraction module 310, an instruction generation module 320, and a data transmission module 330;
the identifier extraction module 310 is configured to, when a packet capturing request sent by a cloud-real machine client is received, extract a cloud-real machine identifier in the packet capturing request, and locate, in each currently maintained cloud-real machine, a target cloud-real machine corresponding to the cloud-real machine identifier;
the instruction generating module 320 is configured to generate a packet capturing control instruction matched with the packet capturing request, and send the packet capturing control instruction to the target cloud real machine;
and the data sending module 330 is configured to send the target packet capturing data to the cloud real machine client for visual display when receiving the target packet capturing data fed back by the target cloud real machine according to the packet capturing control instruction.
According to the technical scheme disclosed in the embodiment of the invention, when a server receives a packet capturing request sent by a cloud real machine client, a cloud real machine identifier in the packet capturing request is extracted, and a target cloud real machine corresponding to the cloud real machine identifier is positioned in each currently maintained cloud real machine; generating a packet capturing control instruction matched with the packet capturing request, and sending the packet capturing control instruction to a target cloud real machine; when target packet capturing data fed back by a target cloud real machine aiming at a packet capturing control instruction are received, the target packet capturing data are sent to a cloud real machine client side for visual display, efficient acquisition of the target packet capturing data is achieved, meanwhile, a packet capturing control instruction matched with a packet capturing request is generated through a server, corresponding target packet capturing data are acquired according to the packet capturing control instruction, and the influence of a network environment on packet capturing control is overcome.
Optionally, on the basis of the technical scheme, the cloud terminal is an android terminal.
Optionally, on the basis of the above technical solution, the instruction generating module 320 is specifically configured to send the packet capturing control instruction to the target cloud host through an android debug bridge.
The device can execute the packet capturing control method of the cloud real machine provided by the embodiment of the invention, and has corresponding functional modules and beneficial effects of the execution method. For technical details that are not described in detail in this embodiment, reference may be made to the method provided in the first embodiment of the present invention.
Example four
Fig. 4 is a block diagram of a packet capture control device of a cloud-real machine according to a fourth embodiment of the present invention, where the device specifically includes: an instruction receiving module 410 and a packet capturing execution module 420;
an instruction receiving module 410, configured to receive a packet capturing control instruction sent by a server;
and the packet capturing execution module 420 is configured to perform packet capturing processing according to the packet capturing control instruction, obtain target packet capturing data, and send the target packet capturing data to the server, so that the server sends the target packet capturing data to the cloud real machine client for visual display.
According to the technical scheme disclosed in the embodiment of the invention, after the cloud real machine receives the packet capturing control instruction sent by the server; performing packet capturing processing according to the acquired packet capturing control instruction to obtain target packet capturing data, and sending the target packet capturing data to the server so that the server sends the target packet capturing data to the cloud real machine client for visual display; the acquisition of the target packet capturing data is realized, and the visual display of the target packet capturing data is further realized, so that a user can view the target packet capturing data more intuitively; meanwhile, a man-in-the-middle mode is adopted to capture the target data, so that the influence of a capture process on the normal use of the cloud real machine is avoided, and the stability of the capture control of the cloud real machine is improved; in addition, an HTTP data packet is monitored and acquired in a global HTTP proxy mode, the influence of a network environment on the data packet capturing is avoided, and the applicability of the data packet capturing of the cloud real machine is improved.
Optionally, on the basis of the above technical solution, the instruction receiving module 410 is specifically configured to receive the packet capturing control instruction sent by the server through an android debug bridge.
Optionally, on the basis of the foregoing technical solution, the packet capturing execution module 420 includes:
the process establishing unit is used for establishing and starting a packet capturing process according to the packet capturing control instruction;
the first data sending unit is used for carrying out packet capturing processing through the packet capturing process to obtain target packet capturing data and sending the target packet capturing data to the currently running cloud real machine process;
and the second data sending unit is used for sending the target packet capturing data to the server through the cloud real machine process.
Optionally, on the basis of the above technical solution, the first data sending unit is specifically configured to set a global hypertext transfer protocol proxy through the packet capturing process; and monitoring the hypertext transfer protocol packet transmitted in the target cloud real machine in a man-in-the-middle mode based on the global hypertext transfer protocol agent through the packet capturing process, and determining the monitored hypertext transfer protocol packet as the target packet capturing data.
Optionally, on the basis of the above technical solution, the first data sending unit is specifically configured to send the target packet capturing data to a currently running cloud-real-machine process in a socket manner.
The device can execute the packet capturing control method of the cloud real machine provided by the second embodiment of the invention, and has corresponding functional modules and beneficial effects of the execution method. For details of the technique not described in detail in this embodiment, reference may be made to the method provided in the second embodiment of the present invention.
EXAMPLE five
Fig. 5A is a schematic structural diagram of a packet capturing control system of a cloud real machine according to a fifth embodiment of the present invention, where the packet capturing control system 500 of the cloud real machine includes: a cloud live machine client device 510, a server 520, and at least one cloud live machine 530; a data interaction flow diagram of the cloud real-machine client device 510, the server 520 and the cloud real-machine 530 is shown in fig. 5B, and the data flow is as follows:
after receiving a packet capturing request sent by a user through a cloud real-machine client, the cloud real-machine client 510 sends the packet capturing request to the server 520; when receiving a packet capturing request sent by the cloud real machine client device 510, the server 520 extracts a cloud real machine identifier in the packet capturing request, and locates a cloud real machine 530 corresponding to the cloud real machine identifier in each currently maintained cloud real machine; the server 520 generates a packet capturing control instruction matched with the packet capturing request and sends the packet capturing control instruction to the corresponding cloud real machine 530; the corresponding cloud real machine 530 receives a packet capturing control instruction sent by the server; performing packet capturing processing according to the packet capturing control instruction to obtain target packet capturing data, and sending the target packet capturing data to the server 520; when receiving the target packet capturing data fed back by the corresponding cloud real machine 530 according to the packet capturing control instruction, the server 520 sends the target packet capturing data to the cloud real machine client device 510, and the cloud real machine client device 510 receives the target packet capturing data and displays the target packet capturing data visually.
According to the technical scheme disclosed in the embodiment of the invention, when a server receives a packet capturing request sent by a cloud real machine client, a cloud real machine identifier in the packet capturing request is extracted, and a target cloud real machine corresponding to the cloud real machine identifier is positioned in each currently maintained cloud real machine; generating a packet capturing control instruction matched with the packet capturing request, and sending the packet capturing control instruction to a target cloud real machine; the target cloud real machine receives a packet capturing control instruction sent by the server, and performs packet capturing processing according to the packet capturing control instruction to obtain target packet capturing data and sends the target packet capturing data to the server; when the server receives target packet capturing data fed back by the target cloud real machine aiming at the packet capturing control instruction, the target packet capturing data are sent to the cloud real machine client side for visual display, efficient acquisition of the target packet capturing data is achieved, meanwhile, the server generates a packet capturing control instruction matched with the packet capturing request, the corresponding target packet capturing data are acquired according to the packet capturing control instruction, and the influence of a network environment on packet capturing control is overcome.
EXAMPLE six
The sixth embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the packet capture control method of the cloud-based fax machine according to the sixth embodiment of the present invention; the method comprises the following steps:
when a packet capturing request sent by a cloud real machine client is received, extracting cloud real machine identifications in the packet capturing request, and positioning target cloud real machines corresponding to the cloud real machine identifications in all currently maintained cloud real machines;
generating a packet capturing control instruction matched with the packet capturing request, and sending the packet capturing control instruction to the target cloud real machine;
and when target packet capturing data fed back by the target cloud real machine aiming at the packet capturing control instruction are received, the target packet capturing data are sent to the cloud real machine client side for visual display.
Or receiving a packet capturing control instruction sent by the server;
and performing packet capturing processing according to the packet capturing control instruction to obtain target packet capturing data and send the target packet capturing data to the server, so that the server sends the target packet capturing data to the cloud real machine client for visual display.
Computer storage media for embodiments of the invention may employ any combination of one or more computer-readable media. The computer readable medium may be a computer readable signal medium or a computer readable storage medium. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples (a non-exhaustive list) of the computer readable storage medium would include the following: an electrical link having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this document, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
A computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.
Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
Computer program code for carrying out operations for aspects of the present invention may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Smalltalk, C + + or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be linked to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the link may be made to an external computer (for example, through the Internet using an Internet service provider).
It is to be noted that the foregoing is only illustrative of the preferred embodiments of the present invention and the technical principles employed. It will be understood by those skilled in the art that the present invention is not limited to the particular embodiments described herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the invention. Therefore, although the present invention has been described in greater detail by the above embodiments, the present invention is not limited to the above embodiments, and may include other equivalent embodiments without departing from the spirit of the present invention, and the scope of the present invention is determined by the scope of the appended claims.

Claims (10)

1. A packet capture control method of a cloud real machine is executed by a server, and is characterized by comprising the following steps:
when a packet capturing request sent by a cloud real machine client is received, extracting cloud real machine identifications in the packet capturing request, and positioning target cloud real machines corresponding to the cloud real machine identifications in all currently maintained cloud real machines;
generating a packet capturing control instruction matched with the packet capturing request, and sending the packet capturing control instruction to the target cloud real machine;
and when target packet capturing data fed back by the target cloud real machine aiming at the packet capturing control instruction are received, the target packet capturing data are sent to the cloud real machine client side for visual display.
2. The method of claim 1, wherein the cloud terminal is an android terminal;
the sending the packet capturing control instruction to the target cloud real machine comprises:
and sending the packet capturing control instruction to the target cloud real machine through an android debugging bridge.
3. A packet capture control method of a cloud real machine is executed by the cloud real machine, and is characterized by comprising the following steps:
receiving a packet capturing control instruction sent by a server;
and performing packet capturing processing according to the packet capturing control instruction to obtain target packet capturing data and send the target packet capturing data to the server, so that the server sends the target packet capturing data to the cloud real machine client for visual display.
4. The method according to claim 3, wherein the receiving of the packet capture control command sent by the server comprises:
receiving the packet capturing control instruction sent by the server through an android debugging bridge;
the packet capturing processing is carried out according to the packet capturing control command, and the obtained target packet capturing data is sent to the server, and the method comprises the following steps:
establishing and starting a packet capturing process according to the packet capturing control instruction;
performing packet capturing processing through the packet capturing process to obtain target packet capturing data, and sending the target packet capturing data to the currently running cloud real machine process;
and sending the target packet capturing data to the server through the cloud real machine process.
5. The method according to claim 4, wherein the performing packet capture processing through the packet capture process to obtain target packet capture data comprises:
setting a global hypertext transfer protocol proxy through the packet capturing process;
and monitoring the hypertext transfer protocol packet transmitted in the target cloud real machine in a man-in-the-middle mode based on the global hypertext transfer protocol agent through the packet capturing process, and determining the monitored hypertext transfer protocol packet as the target packet capturing data.
6. The method according to claim 4, wherein the sending the target packet capturing data to a currently running cloud real machine process comprises:
and sending the target packet capturing data to a currently running cloud real machine process in a socket mode.
7. The utility model provides a packet grabbing controlling means of real machine of cloud, is applied to in the server, its characterized in that includes:
the device comprises an identification extraction module, a cloud real machine identification module and a cloud real machine identification module, wherein the identification extraction module is used for extracting the cloud real machine identification in a packet capturing request when receiving the packet capturing request sent by a cloud real machine client side, and positioning a target cloud real machine corresponding to the cloud real machine identification in each currently maintained cloud real machine;
the instruction generating module is used for generating a packet capturing control instruction matched with the packet capturing request and sending the packet capturing control instruction to the target cloud real machine;
and the data sending module is used for sending the target packet capturing data to the cloud real machine client for visual display when receiving the target packet capturing data fed back by the target cloud real machine aiming at the packet capturing control instruction.
8. The utility model provides a real quick-witted packet control device of grabbing of cloud, is applied to real quick-witted in the cloud, its characterized in that includes:
the instruction receiving module is used for receiving a packet capturing control instruction sent by the server;
and the packet capturing execution module is used for performing packet capturing processing according to the packet capturing control instruction to obtain target packet capturing data and sending the target packet capturing data to the server, so that the server sends the target packet capturing data to the cloud real machine client for visual display.
9. The packet capture control system of the cloud real machine is characterized by comprising a cloud real machine client device, a server and at least one cloud real machine; the server implements the packet capture control method of the cloud-real machine according to claim 1 or 2; the cloud real machine realizes the packet capture control method of the cloud real machine according to any one of claims 3 to 6.
10. A computer-readable storage medium on which a computer program is stored, the program implementing, when executed by a processor, the method for packet capture control of a cloud server according to claim 1 or 2, or the method for packet capture control of a cloud server according to any one of claims 3 to 6.
CN202110265697.5A 2021-03-11 2021-03-11 Packet capture control method, device and system of cloud-real machine and storage medium Pending CN112994982A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110265697.5A CN112994982A (en) 2021-03-11 2021-03-11 Packet capture control method, device and system of cloud-real machine and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110265697.5A CN112994982A (en) 2021-03-11 2021-03-11 Packet capture control method, device and system of cloud-real machine and storage medium

Publications (1)

Publication Number Publication Date
CN112994982A true CN112994982A (en) 2021-06-18

Family

ID=76336371

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110265697.5A Pending CN112994982A (en) 2021-03-11 2021-03-11 Packet capture control method, device and system of cloud-real machine and storage medium

Country Status (1)

Country Link
CN (1) CN112994982A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114285764A (en) * 2021-12-30 2022-04-05 北京天融信网络安全技术有限公司 Packet capturing method and device and storage medium
CN116155862A (en) * 2023-02-21 2023-05-23 北京奇艺世纪科技有限公司 Data packet capturing method, device, server and storage medium
WO2023093367A1 (en) * 2021-11-23 2023-06-01 中兴通讯股份有限公司 Data packet capturing method and apparatus, electronic device, and storage medium
CN117909055A (en) * 2024-03-18 2024-04-19 北京壁仞科技开发有限公司 Front-end circuit of processor and packet grabbing control method

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20170347133A1 (en) * 2016-05-30 2017-11-30 Xiaoyi Technology Co., Ltd. Systems and methods for transmitting video data over a network
CN109684218A (en) * 2018-12-26 2019-04-26 世纪龙信息网络有限责任公司 Test macro and test method based on cloud prototype
CN111596942A (en) * 2020-05-21 2020-08-28 四川普思科创信息技术有限公司 Method and device for forcibly triggering software upgrading and software upgrading system

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20170347133A1 (en) * 2016-05-30 2017-11-30 Xiaoyi Technology Co., Ltd. Systems and methods for transmitting video data over a network
CN109684218A (en) * 2018-12-26 2019-04-26 世纪龙信息网络有限责任公司 Test macro and test method based on cloud prototype
CN111596942A (en) * 2020-05-21 2020-08-28 四川普思科创信息技术有限公司 Method and device for forcibly triggering software upgrading and software upgrading system

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2023093367A1 (en) * 2021-11-23 2023-06-01 中兴通讯股份有限公司 Data packet capturing method and apparatus, electronic device, and storage medium
CN114285764A (en) * 2021-12-30 2022-04-05 北京天融信网络安全技术有限公司 Packet capturing method and device and storage medium
CN116155862A (en) * 2023-02-21 2023-05-23 北京奇艺世纪科技有限公司 Data packet capturing method, device, server and storage medium
CN117909055A (en) * 2024-03-18 2024-04-19 北京壁仞科技开发有限公司 Front-end circuit of processor and packet grabbing control method
CN117909055B (en) * 2024-03-18 2024-06-11 北京壁仞科技开发有限公司 Front-end circuit of processor and packet grabbing control method

Similar Documents

Publication Publication Date Title
CN110636131B (en) Internet of things testing system based on cloud technology
CN112994982A (en) Packet capture control method, device and system of cloud-real machine and storage medium
CN106484611B (en) Fuzzy test method and device based on automatic protocol adaptation
CN109257254B (en) Network connectivity checking method, device, computer equipment and storage medium
CN103825783A (en) Test method and device
CN104536890A (en) Testing system, method and device
CN112600631B (en) WiFi signal stability automatic test method and related components thereof
CN113364804B (en) Method and device for processing flow data
CN110413329A (en) IOT equipment remote debugging method, apparatus and system
CN114490383A (en) Remote debugging system, remote debugging method, computing device and readable medium
CN110971482B (en) Back-end server detection method and device based on ebpf and electronic equipment
CN111177715A (en) Mobile App vulnerability detection method and device
CN112231209A (en) Parameter acquisition method and device, computer equipment and storage medium
CN114598687A (en) Method, system and terminal for capturing HTTPS data packet
CN107888451B (en) Method and device for testing Web server
CN109787963A (en) Business handling method, apparatus, computer equipment and storage medium
CN113094236A (en) System data acquisition method and device, computer equipment and storage medium
CN110995538B (en) Network data acquisition method, device, system, equipment and storage medium
CN103338382B (en) A kind of method of remote monitoring digital TV terminal, device and digital television system
CN114531345A (en) Method, device and equipment for storing flow comparison result and storage medium
CN114915565B (en) Network debugging method and system
CN112749078B (en) Buried point testing method and device
JP6412641B2 (en) Communication link transmission method, apparatus and terminal
CN113626789A (en) User operation request processing method and device and electronic equipment
CN111651330A (en) Data acquisition method and device, electronic equipment and computer 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
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20210618