CN116828407A - Method and system for grabbing package and electronic equipment - Google Patents
Method and system for grabbing package and electronic equipment Download PDFInfo
- Publication number
- CN116828407A CN116828407A CN202210276970.9A CN202210276970A CN116828407A CN 116828407 A CN116828407 A CN 116828407A CN 202210276970 A CN202210276970 A CN 202210276970A CN 116828407 A CN116828407 A CN 116828407A
- Authority
- CN
- China
- Prior art keywords
- data
- packet capturing
- packet
- server
- application program
- 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
Links
- 238000000034 method Methods 0.000 title claims abstract description 120
- 230000003993 interaction Effects 0.000 claims abstract description 24
- 238000004891 communication Methods 0.000 claims description 129
- 238000001914 filtration Methods 0.000 claims description 23
- 238000004806 packaging method and process Methods 0.000 claims description 8
- 230000006870 function Effects 0.000 description 41
- 230000004044 response Effects 0.000 description 12
- 230000005540 biological transmission Effects 0.000 description 11
- 238000004458 analytical method Methods 0.000 description 9
- 238000007405 data analysis Methods 0.000 description 5
- 238000005538 encapsulation Methods 0.000 description 5
- 230000008569 process Effects 0.000 description 5
- 238000010586 diagram Methods 0.000 description 4
- 238000005516 engineering process Methods 0.000 description 3
- 230000007246 mechanism Effects 0.000 description 3
- 238000012545 processing Methods 0.000 description 3
- 230000002159 abnormal effect Effects 0.000 description 1
- 238000004590 computer program Methods 0.000 description 1
- 230000008094 contradictory effect Effects 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 238000004519 manufacturing process Methods 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 238000007639 printing Methods 0.000 description 1
- 238000010223 real-time analysis Methods 0.000 description 1
- 238000012546 transfer Methods 0.000 description 1
- 230000007723 transport mechanism Effects 0.000 description 1
- 238000012795 verification Methods 0.000 description 1
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W4/00—Services specially adapted for wireless communication networks; Facilities therefor
- H04W4/30—Services specially adapted for particular environments, situations or purposes
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W24/00—Supervisory, monitoring or testing arrangements
- H04W24/08—Testing, supervising or monitoring using real traffic
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W28/00—Network traffic management; Network resource management
- H04W28/16—Central resource management; Negotiation of resources or communication parameters, e.g. negotiating bandwidth or QoS [Quality of Service]
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W8/00—Network data management
- H04W8/18—Processing of user or subscriber data, e.g. subscribed services, user preferences or user profiles; Transfer of user or subscriber data
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Databases & Information Systems (AREA)
- Quality & Reliability (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
The embodiment of the invention discloses a package grabbing method, a package grabbing system and electronic equipment. Wherein the method comprises the following steps: acquiring packet capturing service information which is determined by negotiation with an application server; according to the packet capturing server information contained in the packet capturing service information, the packet capturing server is interacted with to receive and/or transmit the packet capturing data of the application program; the packet capturing server publishes the packet capturing data of the application program to a subscriber according to the packet capturing data subscription information; wherein, the packet grabbing data comprises: and the application program forwarded by the packet capturing server performs service interaction with the application server. By adopting the packet grabbing method provided by the embodiment of the disclosure, the operation complexity of the packet grabbing operation matched with the terminal user is obviously reduced, the packet grabbing of the App is flexibly realized according to the requirement, the unnecessary occupation of the packet grabbing operation on the application program and the terminal resource on the terminal is avoided, and the packet grabbing operation convenience and the execution efficiency are obviously improved.
Description
Technical Field
The present invention relates to, but is not limited to, the field of computer network applications, and in particular, to a method, system and electronic device for packet capture.
Background
With the development of the mobile internet and the internet of things technology, an interconnection relationship is established between mass devices, and an increasingly complex network system is built. For example, an application program App on the mobile terminal is connected with intelligent household equipment to control and manage the operation of each equipment; the Internet of things equipment or nodes are monitored and managed through an App on an intelligent terminal in the production system.
It can be seen that after more and more internet/internet of things devices are interconnected, various scenes are inevitably generated in a debugging stage or an application stage, and network communication service data of the devices interacted with an external system is required to be acquired so as to perform service analysis or problem positioning. Therefore, the flexible and convenient application program packet grabbing scheme is an important ring for improving the system function and improving the use convenience of the whole network application system.
Disclosure of Invention
The embodiment of the disclosure provides a packet grabbing method, a system and electronic equipment, which obviously reduce the operation complexity of the packet grabbing operation matched with a terminal user, flexibly realize the App packet grabbing according to the requirement, avoid unnecessary occupation of application programs and terminal resources on a terminal by the packet grabbing operation, and obviously improve the packet grabbing operation convenience and the execution efficiency.
The embodiment of the disclosure provides a packet grabbing method, which comprises the following steps:
acquiring packet capturing service information which is determined by negotiation with an application server;
according to the packet capturing server information contained in the packet capturing service information, the packet capturing server is interacted with to receive and/or transmit the packet capturing data of the application program;
the packet capturing server publishes the packet capturing data of the application program to a subscriber according to the packet capturing data subscription information;
wherein, the packet grabbing data comprises: and the application program forwarded by the packet capturing server performs service interaction with the application server.
The embodiment of the disclosure also provides a packet grabbing system, which comprises:
an application server, a packet capturing server and an application program;
the application server is configured to negotiate with the application program to determine packet capturing service information;
the application program is set to interact with the packet capturing server according to the packet capturing server information contained in the packet capturing service information to receive and/or transmit the packet capturing data of the application program; wherein, the packet grabbing data comprises: network communication service data of service interaction between the application program forwarded by the packet capturing server and the application server;
The packet grabbing server is arranged to connect the application program and the application server to forward the network communication service data; and the method is also arranged to publish the package capturing data of the application program to the subscriber according to the package capturing data subscription information.
The embodiment of the disclosure also provides an electronic device, including:
one or more processors;
storage means for storing one or more programs,
the one or more programs, when executed by the one or more processors, cause the one or more processors to implement the packet-grabbing method as described in any of the embodiments of the present disclosure.
Other aspects will become apparent upon reading and understanding the accompanying drawings and detailed description.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings that are required in the embodiments or the description of the prior art will be briefly described, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and other drawings may be obtained according to the structures shown in these drawings without inventive effort for a person skilled in the art.
Fig. 1 is a flowchart of a packet grabbing method according to an embodiment of the present invention;
FIG. 2 is a flow chart of another method for capturing packets according to an embodiment of the present invention;
FIG. 3 is a flowchart of another method for capturing packets according to an embodiment of the present invention;
FIG. 4 is a flowchart of another method for capturing packets according to an embodiment of the present invention;
FIG. 5 is a flowchart of another method for capturing packets according to an embodiment of the present invention;
FIG. 6 is a flowchart of another method for capturing packets according to an embodiment of the present invention;
fig. 7 is an information interaction schematic diagram of a packet capturing method according to an embodiment of the present invention;
fig. 8 is an information interaction schematic diagram of another packet capturing method according to an embodiment of the present invention;
fig. 9 is an information interaction schematic diagram of another packet capturing method according to an embodiment of the present invention;
fig. 10 is a schematic diagram of a packet grabbing system according to an embodiment of the present invention.
The achievement of the objects, functional features and advantages of the present invention will be further described with reference to the accompanying drawings, in conjunction with the embodiments.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and fully with reference to the accompanying drawings, in which it is evident that the embodiments described are only some, but not all embodiments of the invention. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
It should be noted that all directional indicators (such as up, down, left, right, front, and rear … …) in the embodiments of the present invention are merely used to explain the relative positional relationship, movement, etc. between the components in a particular posture (as shown in the drawings), and if the particular posture is changed, the directional indicator is changed accordingly.
Furthermore, descriptions such as those referred to as "first," "second," and the like, are provided for descriptive purposes only and are not to be construed as indicating or implying a relative importance or implying an order of magnitude of the indicated technical features in the present disclosure. Thus, a feature defining "a first" or "a second" may explicitly or implicitly include at least one such feature. In the description of the present invention, the meaning of "plurality" means at least two, for example, two, three, etc., unless specifically defined otherwise.
In the present invention, unless specifically stated and limited otherwise, the terms "connected," "affixed," and the like are to be construed broadly, and for example, "affixed" may be a fixed connection, a removable connection, or an integral body; can be mechanically or electrically connected; either directly or indirectly, through intermediaries, or both, may be in communication with each other or in interaction with each other, unless expressly defined otherwise. The specific meaning of the above terms in the present invention can be understood by those of ordinary skill in the art according to the specific circumstances.
In addition, the technical solutions of the embodiments of the present invention may be combined with each other, but it is necessary to be based on the fact that those skilled in the art can implement the technical solutions, and when the technical solutions are contradictory or cannot be implemented, the combination of the technical solutions should be considered as not existing, and not falling within the scope of protection claimed by the present invention.
Along with popularization of mobile internet/internet of things application, various network devices are interconnected, and various service functions are realized by application programs (apps) deployed on the devices, so that the mobile internet/internet of things application becomes an important ring in various internet/internet of things systems. In the debugging stage and the running stage, the network communication service data which is used for carrying out service interaction with an external system when the application program realizes the related service function is captured, and the network communication service data is a necessary function in the whole system debugging, running and maintaining process. Particularly, in the case of software bug of application program, a means for fast and efficient positioning is more needed. Capturing network communication data of an application program for carrying out service exchange externally is one of important means for positioning problems.
The related realizable App packet capturing scheme is poor in convenience, and often needs to build a certain packet capturing environment by a user, return to a technician after capturing a message, or leave the technician to the user to capture a packet for positioning. The overall operation difficulty and the positioning cost are relatively high. And when only the message is grasped, the method for generating the message cannot be quickly positioned, especially when a third party SDK library or a waistcoat library (the transmitted target address is acquired from a server in real time and encrypted) is encountered.
In an available App packet capturing scheme, an App user starts a packet capturing function, and occupies storage resources of equipment where the App is located to store captured network communication service interaction data so as to derive packet capturing data after packet capturing is finished; the packet capturing process and the normal service process are executed simultaneously, and the CPU resource of the device is occupied, so that the normal use of the device is affected.
The embodiment of the disclosure provides a packet grabbing scheme, which relates to an application program needing to be grabbed with communication service data, realizes related application functions and is deployed on first equipment; the first device is also referred to as a target grabbing terminal; the first device includes: a mobile phone, a service terminal, a PC and other devices. And an application server connected with the application program and providing related services to realize business functions. The packet grabbing server is connected with the application program (first equipment) and the application server and is used for forwarding service data and grabbing target data. The second device is also referred to as a bundle subscription terminal, subscribes to the target bundle data and receives the subscribed bundle data; the second device includes: a mobile phone, a service terminal, a PC, a server and other devices; the second device may further analyze, locate or find a problem on the subscribed packet capturing data, and specifically, an analysis processing scheme of the second device on the packet capturing data is not discussed in detail in the embodiment of the present application.
An embodiment of the present disclosure provides a packet grabbing method, as shown in fig. 1, including:
step 110, acquiring packet capturing service information determined by negotiation with an application server;
step 120, according to the packet capturing server information contained in the packet capturing service information, interacting with a packet capturing server to realize receiving and/or sending of packet capturing data of an application program;
step 130, the packet capturing server publishes the packet capturing data of the application program to a subscriber according to the packet capturing data subscription information;
wherein, the packet grabbing data comprises: and the application program forwarded by the packet capturing server performs service interaction with the application server.
In some exemplary embodiments, the packet-grabbing data further comprises one or more of the following:
the thread calling information of the application program and the session identifier corresponding to the network communication service data;
the session identifier is used for indicating a session corresponding relation between the network communication service data received by the application program and the network communication service data sent by the application program.
In some exemplary embodiments, the interaction with the packet capture server in step 120 enables the receiving and/or sending of packet capture data of the application program, including:
Executing a new network data receiving method and/or a new network data transmitting method according to a running mechanism of an equipment operating system where the application program is located, and interacting with the packet capturing server to realize the receiving and/or transmitting of the packet capturing data of the application program;
the new network data sending method is used for packaging packet capturing data comprising network communication service data sent to the application server by the application program according to a first format after establishing connection with the packet capturing server under the condition that a packet capturing function is started, and sending the packet capturing data to the packet capturing server; the new network data receiving method is used for receiving the packet capturing data from the packet capturing server after establishing connection with the packet capturing server under the condition that the packet capturing function is started, and analyzing the packet capturing data according to a second format to obtain network communication service data sent to the application program by the application server.
In some exemplary embodiments, the new network data sending method is further configured to send network communication service data to the application server after establishing a connection with the application server in a case where the packet capturing function is closed; the new network data receiving method is used for receiving network communication service data from the application server after establishing connection with the application server under the condition that the packet capturing function is closed.
In some exemplary embodiments, the first format and the second format are independently set, and are not limited to a specific format.
It should be noted that, the new network data transmission method and the new network data transmission method in the embodiments of the present disclosure are methods relative to a network data transmission method and a network data transmission method in which an application program only interacts with an application server in a related scheme.
In some exemplary embodiments, the packet capturing service information includes: and (5) capturing server information.
In some exemplary embodiments, the packet capturing service information further includes: a packet grabbing instruction; the packet grabbing instruction is used for indicating packet grabbing data of the application program. And when the packet capturing data subscription is carried out subsequently, determining the packet capturing data of the application program to be captured according to the packet capturing instruction.
It should be noted that, in the process that the network communication service data for service interaction is related service function implementation of the application program, the network communication data for interaction with the application server includes: the application program transmits business uplink data to the application server and/or transmits downlink data to the application program by the application server. The specific bearer protocol of the network communication data is determined according to the application program and the application server, and is not limited to a specific manner, and the specific bearer protocols of the network communication service data between different application programs on the device and respective corresponding application servers may be the same or different, and specific aspects are not discussed in detail in the embodiments of the present disclosure.
In some exemplary embodiments, the operating system of the device, denoted as the first device, where the application program is located includes: iOS, android OS, windows Phone OS, blackBerry OS, or Harmony OS, etc.
In some exemplary embodiments, the interaction with the packet capture server in step 120 enables the receiving and/or sending of packet capture data of the application program, including:
and executing a new network data receiving method and/or a new network data transmitting method according to the operation time mechanism of the operating system of the equipment where the application program is located, and interacting with the packet capturing server to receive and/or transmit the packet capturing data of the application program under the condition that the packet capturing function is started.
It will be appreciated that the new network data receiving method and/or network data transmitting method is performed using the runtime mechanism of the operating system of the device in which the application is located. Under the condition that a packet capturing function is started, the new network data receiving method receives and analyzes packet capturing data from a packet capturing server to obtain network communication service data contained in the packet capturing data; the new network data sending method encapsulates network communication service data and sends the encapsulated network communication service data to a packet capturing server; thereby realizing the receiving and/or transmitting of the packet-grabbing data. Under the condition that the packet grabbing function is closed, the new network data receiving method receives network communication service data from an application server; the new network data sending method sends the network communication service data to an application server; thereby realizing the receiving and/or transmitting of the network communication service data.
In some exemplary embodiments, the packet-grabbing data further comprises: thread call information of the application program.
Correspondingly, the new network data transmission method comprises the following steps:
acquiring thread calling information of an application program;
and packaging the uplink data of the network communication to be sent to the application server into packet capturing data according to the thread calling information and the network communication to be sent to the application server, and sending the packet capturing data to the packet capturing server.
It should be noted that, in order to distinguish the packet sending flows of different services, the technician is convenient to locate and find the problem, and the packet capturing data includes the thread calling information of the application program besides the network communication service data.
In some exemplary embodiments, providing a related method in an operating system of a device in which the application program is located can obtain current thread call information of the application program.
For example, the call function NSLog () in the thread call information printing method printFunc as shown below outputs the thread call information ([ NSThread callStackSymbols ]) and the related outputs are as follows:
the output result records thread stack information, including calling relation of threads and methods, time information and the like, and technicians can locate the specific software codes of the application programs through the information, so that the analysis and the location problems are facilitated.
It should be noted that, different device operating systems respectively provide related methods or functions to obtain current thread call information; the content and format of thread call information output by different operating systems may also vary, and specific aspects are not discussed in detail herein and are not limited to aspects exemplified by the embodiments of the present disclosure.
In some exemplary embodiments, the thread call information is also referred to as stack information of thread method call, and represents a call relationship of a thread method called when the application program execution service function on the first device sends current network communication service data.
It can be seen that in some exemplary embodiments, not only the service data of the network communication is captured, but also the thread call information when the application program is executed is captured, and according to the thread call information, the sending of the service request of the network communication can be known, and the thread methods (functions) in which the first devices are involved. That is, the correspondence between the service request and the in-device thread method (function) can be more clearly determined according to the information.
In some exemplary embodiments, the packet-grabbing data further comprises: session identification corresponding to the network communication service data;
Correspondingly, the new network data transmission method comprises the following steps:
assigning a Session identification (Session ID);
according to the session identification, the thread calling information and network communication uplink data to be sent to an application server, packaging the network communication uplink data into packet capturing data, and sending the packet capturing data to the packet capturing server;
the new network data receiving method comprises the following steps:
receiving packet capturing data from a packet capturing server;
analyzing the packet capturing data to obtain the session identification and network communication downlink data from an application server;
and returning the network communication downlink data to the corresponding service module of the application program according to the session identification.
In some exemplary embodiments, the network communication uplink data is service request data sent by the application program, the network communication downlink data is response data, and the corresponding relationship between the service request data and the response data is determined according to the session identifier.
In some exemplary embodiments, the packet-grabbing data includes: network communication service data of service interaction between the application program and the application service forwarded by the packet capturing server and session identification corresponding to the network communication service data; the session identifier is used for indicating a session corresponding relation of the network communication service data received and sent by the application program.
In some exemplary embodiments, the packet-grabbing data further comprises: and a packet grabbing instruction in the packet grabbing service information. And the packet capturing server determines corresponding packet capturing data according to the packet capturing instruction and publishes the packet capturing data to the subscriber.
In some exemplary embodiments, the packet-grabbing data further comprises: a user name of the application. And the packet capturing server verifies the user name and the packet capturing instruction when receiving the packet capturing data subscription request so as to improve the security.
In some exemplary embodiments, the packet-grabbing data includes: session identification, network communication service data, thread call information, encapsulated in a first format as follows:
TABLE 1 packet data encapsulation Format (first Format)
It can be understood that the packet capturing server forwards the service request to the application server indicated by the service data according to the network communication service data in the packet capturing data and obtains the response.
In some exemplary embodiments, taking the iOS of the device operating system as an example, using an operation timing system of the iOS system to replace a network data sending method (a packet sending method) and a network data receiving method (a packet receiving method), namely, replace a new network data sending method (a packet sending method), after an application program starts packet grabbing, encapsulate network communication service data into packet grabbing data and send the packet grabbing data to a packet grabbing server; and after the application program starts the packet capturing, the data from the packet capturing server is unpacked to obtain the network communication service data and the network communication service data are sent to the corresponding functional module of the application program. For example, the implementation of the new network data reception method (packet reception method) is replaced with the following example:
From this example, those skilled in the art will be aware of implementations of alternative new network data reception methods (packet reception methods), specific aspects not being illustrated herein.
It can be seen that according to the packet capturing method provided by the embodiment of the disclosure, an application program can capture a network data packet only by simply operating a packet capturing function switch without other complex operations or settings; the packet capturing data is sent to the packet capturing server in real time, equipment resources where the application program is located are not occupied, operation of other applications on the terminal equipment is not affected, the packet capturing data is not required to be exported after the packet capturing is finished, and the operation convenience of the common App user for carrying out packet capturing in cooperation is remarkably improved.
In some exemplary embodiments, the packet capturing data may further include other types of data, and those skilled in the art may extend according to the analysis requirements of the packet capturing data, and are not limited to the specific aspect.
In some exemplary embodiments, as shown in fig. 2, the method further comprises:
step 140, the subscriber acquires the packet capturing service information;
step 150, the subscriber subscribes the packet capturing data of the application program to the packet capturing server according to the packet capturing server information and the packet capturing instruction contained in the packet capturing service information;
Step 160, the subscriber receives the packet capturing data of the application program published by the packet capturing server.
In some exemplary embodiments, step 140 includes:
and according to the packet capturing instruction, the subscriber acquires packet capturing server information from the application server.
It can be seen that when the application program starts the packet capturing, the application program negotiates with the application server to determine the packet capturing server information, which includes: packet capture server information and packet capture instructions. The packet grabbing instruction can uniquely determine all the packet grabbing data grabbed after one application program starts packet grabbing at one time. In step 140, the packet capturing data subscriber can obtain the packet capturing service information determined by negotiation from the application server according to the packet capturing instruction. Further, the packet capturing data subscribing party carries out packet capturing data subscription to the packet capturing server indicated by the packet capturing server information according to the packet capturing instruction; and subscribing the packet capturing data corresponding to the packet capturing instruction.
In some exemplary embodiments, subscribing to the bundle data of the application program from the bundle server in step 150 includes:
and the subscriber subscribes packet capturing data meeting the data filtering conditions to the packet capturing server according to the set data filtering conditions and the packet capturing instructions contained in the packet capturing service information.
In some exemplary embodiments, the data filtering conditions include one or more sets of attributes and attribute keywords.
For example, the data filtering conditions include: 2 sets of attributes and attribute keys:
attributes: attribute key
DnsIp:www.unXXX.com
StackInfo:Login
That is, the bundle data subscriber needs to subscribe to bundle data corresponding to the bundle command, the bundle data can be matched to the bundle data of which field DnsIp contains www.unXXX.com and field StackInfo contains logic.
It can be seen that based on the subscription of the data filtering condition, the packet capturing server only publishes the packet capturing data meeting the data filtering condition to the packet capturing data subscriber, so that the analysis amount of the packet capturing data can be remarkably reduced, and the analysis efficiency of the packet capturing data is improved.
In some exemplary embodiments, as shown in fig. 2, the method further comprises:
and 170, subscribing Fang Jiexi to the packet capturing data, acquiring the network communication service data and the thread calling information of the application program, and storing the corresponding relation between the service request in the network communication service data and the thread calling information of the application program.
It can be seen that, when the packet capturing data includes network communication service data and thread call information of an application program, the packet capturing data subscriber analyzes the packet capturing data according to the first format or the second format, so as to obtain the network communication service data and the thread call information of the application program. In some exemplary embodiments, the network communication service data is uplink data sent by the application program to the application server, where the uplink data includes a service request, and a correspondence between the service request and thread call information of the application program in the network communication service data may be further stored.
In some exemplary embodiments, the network communication service data is downlink data sent to the application program by the application server, where the downlink data includes a service request response, and a correspondence between the service request response in the network communication service data and thread call information of the application program may be further stored.
Taking the packet capturing data described in table 1 as an example, the packet capturing data subscriber obtains the packet capturing data shown in table 1, and can analyze and obtain the service request (Post http:// www.unXXX.com: 80/openapi/device/capability/get) and the thread call information (funcA, funcB, funcC …) contained in the packet capturing data subscriber.
And saving the service request and the thread call information to form corresponding relation data, which can be used for checking the compliance of the application program data.
For example, after the application program a opens a packet, operating related service functions of the application program a, and storing the following service request and thread call information correspondence table by the packet capturing data subscriber according to packet capturing data published by the packet capturing server:
TABLE 2 service request and thread invocation information correspondence table
From the correspondence table, it can be found whether there is an offending data transmission in the execution of the application program a, and it can be clarified with which thread (function) call or threads the offending data transmission is related to. For example, www.YYY _closed.com is an overseas domain name, the service request Posthttp:// www.YYY _closed.com 80 is a data transmission request with violations, it can be found that the relevant function of the application program a has a situation of sending information to an offshore server in a violating manner, and the information is determined to be relevant to the thread method yyy_capter, so that it can be more quickly and clearly determined which specific function or which third party library causes the data transmission with violations.
In some exemplary embodiments, the parsing the packet-grabbing data in step 170 to obtain network traffic data and thread call information includes:
according to the encapsulation format of the packet capturing data, analyzing to obtain network communication service data, session identification and/or thread calling information contained in the packet capturing data;
and further analyzing the network communication service data according to the bearing protocol of the network communication service data so as to obtain a service request.
The specific implementation of further analyzing the network traffic data to obtain the service request is executed according to the relevant protocol message analysis scheme. For example, the required service request and/or other communication data may be obtained by parsing the network communication service data using a wiretrap. Other methods may also be employed by those skilled in the art for network traffic data resolution, and are not limited in the exemplary aspects of the present disclosure. Specific resolution schemes are not discussed in detail in the embodiments of the present disclosure.
It can be seen that in the related scheme of the embodiment of the disclosure, a technician is used as a packet capturing data subscriber to subscribe packet capturing data to the packet capturing server according to the need, so that corresponding packet capturing data can be obtained in real time, and the corresponding packet capturing data can be flexibly and timely matched with related function operation of an application program, so that positioning problems and reproduction problems are found, and the efficiency of packet capturing, namely subsequent data analysis, is remarkably improved.
In some exemplary embodiments, the method further comprises:
step 180, the packet capture server receives packet capture data from the application program;
step 190, analyzing the packet capturing data according to a first format, and obtaining application server information corresponding to the application program and network communication service uplink data of the application program;
step 1100, sending network communication service uplink data of the application program to an application server, and obtaining network communication service downlink data;
and 1110, packaging the packet capturing data containing the downlink data of the network communication service according to a second format, and sending the packet capturing data to the application program.
In some exemplary embodiments, the application home device is denoted as a first device.
It should be noted that, in some exemplary embodiments, the first format is an encapsulation format of uplink packet capturing data of the application program received by the packet capturing server, and the encapsulation is completed by the operating system of the device where the application program is located by executing the new network data sending method, and correspondingly, the packet capturing server parses according to the first format; the second format is the encapsulation format of the downlink packet capturing data sent to the application program by the packet capturing server, and correspondingly, the operating system of the equipment where the application program is located completes analysis according to the second format by executing a new network data receiving method.
In some exemplary embodiments, the network traffic downlink data is included in the packet-grabbing data and sent to the application in step 1110.
In some exemplary embodiments, the packet capture data in step 1110 further comprises: and (5) session identification. The session identification is the same as the session identification in the packet-grabbing data in step 180. It can be seen that, according to the session identifier, the application program on the first device can determine the corresponding relationship between the service request and the response, and then transfer the response to the corresponding service module.
In some exemplary embodiments, as shown in fig. 3, the method further comprises:
and 100, after the application program starts the packet capturing function, negotiating with the application server to determine the packet capturing service information.
In some exemplary embodiments, step 100 comprises:
when a packet grabbing function switch is started, the application program sends a negotiation request to the application server;
the application server selects a packet capturing server with optimal performance according to the network attribute of the equipment where the application program is located, and generates a unique packet capturing instruction corresponding to the application program;
and generating the packet capturing service information according to the server information of the selected packet capturing server and the packet capturing instruction, and returning the packet capturing service information to the application program.
In some exemplary embodiments, step 100 comprises:
when a packet grabbing function switch is started, the application program sends a negotiation request to the application server;
the application server selects a packet capturing server with optimal performance in a set available server range, and generates a unique packet capturing instruction corresponding to the application program;
and generating the packet capturing service information according to the server information of the selected packet capturing server and the packet capturing instruction, and returning the packet capturing service information to the application program.
In some exemplary embodiments, the network attributes include one or more of the following: IP address location, network service provider. Alternatively, other attributes may be referenced to determine an appropriate bale plucker server.
For example, if the network attribute is an IP address location, the application server selects, from the servers nearby, a packet-grabbing server with the most load performance remaining or more according to the public network IP address of the application program. For example, considering that the bug of part of the application program has a relation with the specific network environment of the mobile phone, in order to keep the network environment of the packet capturing server consistent with the network environment of the client mobile phone, when negotiating the packet capturing server, the same packet capturing server as the mobile phone network (such as an operator) can be preferentially selected; i.e. the network attribute is a network service provider, the application server selects the most or more packet-grabbing servers that have the highest load performance of providing network services for the same network service provider.
In some exemplary embodiments, selecting a best performing bale plucker server includes: and selecting the packet capturing server with the most residual processor load performance according to the processor load condition of the available packet capturing servers. Alternatively, those skilled in the art may also consider other factors to select an optimal bale plucker server, and is not limited to the aspects of the examples of the present disclosure.
After the application program obtains the packet capturing service information, the application program formally starts the packet capturing, executes step 120, interacts with the packet capturing server determined by negotiation, completes the related service function and captures the network data.
In some exemplary embodiments, the method further comprises:
and 1120, after the application program closes the packet capturing function, the application program interacts with the application server to realize the receiving and/or sending of the network communication service data.
In some exemplary embodiments, step 1120 includes: and executing a new network data receiving method and/or a new network data transmitting method according to a running time system of an equipment operating system where the application program is located, and realizing the receiving and/or transmitting of the network communication service data by interaction with the application server under the condition that a packet capturing function is closed.
It can be seen that after the packet capturing function of the application program is turned off, the application program does not need to send the packet capturing data to the packet capturing server any more, and the sending and/or receiving of the network communication service data between the application program and the application server is restored, and the forwarding of the network communication service data is not performed through the packet capturing server any more.
According to the packet capturing scheme provided by the embodiment of the disclosure, the terminal user only needs to control whether to execute packet capturing operation or not through the packet capturing function switch, and other packet capturing service related information is determined by negotiation between the application program and the application server, and subsequent packet capturing operation is automatically executed after the negotiation is determined, so that more settings of the user are not needed, and the whole operation is simple and clear.
An embodiment of the present disclosure provides a packet grabbing method, as shown in fig. 4, including:
step 410, negotiating with an application server to obtain packet capturing service information corresponding to an application program;
step 420, according to the packet capturing server information contained in the packet capturing service information, interacting with a packet capturing server to realize receiving and/or transmitting of the packet capturing data of the application program;
wherein, the packet grabbing data comprises: and network communication service data of service interaction between the application program and the application service, which are forwarded by the packet capturing server.
In some exemplary embodiments, interacting with the packet capture server in step 420 enables the receiving and/or sending of packet capture data of the application, including:
and according to the operation timing system of the equipment operating system where the application program is located, executing a new network data receiving method and/or a new network data transmitting method in a replacement mode, and realizing the receiving and/or transmitting of the packet capturing data of the application program in an interaction mode with the packet capturing server.
In some exemplary embodiments, the step 410 further includes, before:
step 400, determining whether a packet capturing function switch of the application program is turned on, and when the packet capturing function switch is turned on, performing step 410 to negotiate to determine packet capturing service information.
In some exemplary embodiments, the packet capturing service information includes: and (5) capturing server information.
The embodiment of the disclosure also provides a packet grabbing method, as shown in fig. 5, including:
step 510, acquiring packet capturing service information determined by negotiation between an application program and an application server;
step 520, subscribing the packet capturing data of the application program to the packet capturing server according to the packet capturing server information and the packet capturing instruction contained in the packet capturing service information;
step 530, receiving the packet capturing data of the application program issued by the packet capturing server;
Wherein, the packet grabbing data comprises: and network communication service data of service interaction between the application program and the application service, which are forwarded by the packet capturing server.
In some exemplary embodiments, the packet-grabbing data further comprises: thread call information of the application program;
the method further comprises the steps of: and step 540, analyzing the packet capturing data, acquiring network communication service data and thread calling information, and storing the corresponding relation between the service request and the thread calling information in the network communication service data.
The embodiment of the disclosure also provides a packet grabbing method, as shown in fig. 6, including:
step 610, receiving packet capture data from an application;
step 620, analyzing the packet capturing data to obtain application server information corresponding to the application program and network communication service uplink data of the application program;
step 630, sending the network communication service uplink data of the application program to an application server, and obtaining the network communication service downlink data;
and step 640, sending the network communication service downlink data to the application program.
In some exemplary embodiments, the packet-grabbing method is applied to a packet-grabbing server. The packet capturing server receives the packet capturing data sent by the first device where the application program is located, analyzes the packet capturing data, acquires network communication service data contained in the packet capturing data, and forwards the network communication service data to the application server, acquires a response, and forwards the response data to the application program on the first device.
In some exemplary embodiments, the packet-grabbing server negotiates with the application server to determine the determined server when the application program starts the packet-grabbing.
In some exemplary embodiments, the network traffic downstream data is encapsulated in packet-grabbing data and sent to the application in step 640.
In some exemplary embodiments, the method further comprises:
step 650, receiving a packet-grabbing data subscription request from a second device, and storing subscription information of the second device.
In some example embodiments, the subscription information includes a bundle data subscription request and a second device identification. From the subscription information, the subscription requirements of the respective second devices may be known. After receiving or producing the packet capturing data, the packet capturing server performs data publishing according to the subscription information.
In some exemplary embodiments, the packet-grabbing data subscription request includes: a packet grabbing instruction.
In some exemplary embodiments, the packet-grabbing data subscription request includes: packet-grabbing instructions and data filtering conditions.
It can be seen that the packet capturing server, when selected to execute network data packet capturing in cooperation with the application program, is correspondingly allocated with a unique packet capturing instruction. And the packet capturing data subscriber subscribes the packet capturing data of the application program to the packet capturing server according to the packet capturing instruction. In some exemplary embodiments, in order to effectively reduce the analysis amount of the packet capturing data, focusing on the key data, the packet capturing data subscription request further includes a data filtering condition, so as to instruct the packet capturing server to only issue the packet capturing data meeting the data filtering condition to the subscriber.
In some exemplary embodiments, the packet-grabbing data in steps 610 and/or 640 further comprise: a user name of the application; the packet-grabbing data subscription request further includes: a user name;
accordingly, step 650 includes: and carrying out correctness checking according to the user name and the packet capturing instruction in the packet capturing data subscription request, and storing subscription information of the second equipment after the correctness checking is successful. That is, after the user name and the package capturing instruction are verified by the package capturing server, the completion of the subscription of the package capturing data subscriber is confirmed.
In some exemplary embodiments, after receiving the packet-grabbing data, the method further comprises:
and step 660, according to the subscription information of the second device, publishing the packet capturing data to the second device.
In some exemplary embodiments, after obtaining the downlink data of the network communication service, the method further includes:
and step 670, according to the subscription information of the second device, publishing packet capturing data containing the downlink data of the network communication service to the second device.
The second device is a device for receiving the packet capturing data by the packet capturing data subscriber.
It should be noted that, according to the requirement of data analysis, a person skilled in the art may set the packet capturing server to only publish subscribed packet capturing data only including uplink data, and execute step 660; or, the packet capturing server is set to only publish subscribed packet capturing data only including downlink data, and step 670 is executed; or, the packet capturing server publishes subscribed packet capturing data including uplink data and downlink data, and performs steps 660 and 670.
In some exemplary embodiments, in step 670, according to the subscription information of the second device, publishing packet-grabbing data including the network communication service downlink data to the second device includes:
according to a packet capturing instruction in subscription information of the second equipment, determining network communication service downlink data corresponding to the packet capturing instruction, and issuing packet capturing data containing the network communication service downlink data to the second equipment;
or,
according to a packet capturing instruction and a data filtering condition in subscription information of the second equipment, determining downlink data meeting the data filtering condition in network communication service downlink data corresponding to the packet capturing instruction, and issuing packet capturing data containing the downlink data meeting the data filtering condition to the second equipment;
or,
determining uplink data meeting the data filtering condition in network communication service uplink data corresponding to the packet capturing instruction according to the packet capturing instruction and the data filtering condition in the subscription information of the second equipment; determining the corresponding network communication service downlink data according to the uplink data meeting the data filtering conditions; and distributing packet capturing data containing the downlink data meeting the corresponding network communication service to the second equipment.
It can be seen that, by adopting the subscription-publishing mode, for a certain application program on the same device, multiple packet capturing data subscribers can subscribe to the packet capturing data independently, and after each packet capturing data is acquired in real time, the packet capturing data analysis can be performed independently and in parallel. Different subscribers can respectively acquire network communication data of different aspects transmitted and/or received by the application program in the same business operation process through different filtering conditions. The flexibility of capturing the packet data is greatly improved. For the packet capturing server, corresponding packet capturing data can be provided for a plurality of packet capturing subscribers in parallel without increasing the processing complexity significantly. Those skilled in the art can understand that the subscription-release mode provided by the embodiment of the disclosure is adopted to distribute the packet capturing data, so that the data analysis requirement of one-time packet capturing and multi-angle parallel real-time analysis can be met. The application programs, the packet capturing server, the application server and the packet capturing data subscribers are loosely associated, flexibly arranged, and capable of fully meeting flexible and changeable packet capturing requirements, and remarkably improving the execution efficiency of packet capturing operation.
The embodiment of the disclosure also provides a packet grabbing method, as shown in fig. 7, including:
Step 710, app requests the application server to perform packet-grabbing service negotiation;
step 720, the application server selects a packet capturing server (such as a server B) for providing network service by the same network operator nearby according to the network operator for providing network service for the device where the App is located, and returns packet capturing service information to the App; the packet capturing service information includes: packet capturing server information (server B) and packet capturing instructions (string of characters: 3213324);
and step 730, after the App acquires the packet-grabbing service information, starting the packet-grabbing, operating the service function, replacing the network data sending and receiving method by using the operation timing system of the iOS system, packaging the network communication service data into packet-grabbing data, and sending the packet-grabbing data to the packet-grabbing server B.
Optionally, in step 720, the application server selects a packet capturing server (such as server B) with more load performance remaining in the nearby servers according to the public network IP of the App, and returns packet capturing service information to the App; the packet capturing service information includes: packet capturing server information (server B) and packet capturing instructions (string of characters: 3213324).
In the new data transmission method in step 730, the network communication service data, the thread calling information, the packet capturing instruction and the session identifier are extracted and then encapsulated into first packet capturing data, and the first packet capturing data is transmitted to the packet capturing server B; different service requests are allocated with different session identifications, and the first packet capturing data comprises the session identifications.
Step 740, the packet capturing server B receives the packet capturing data sent by the App, and unpacks the packet capturing data to obtain network communication service data (service request/uplink data) therein, and forwards the communication service data to the application server according to the address of the application server in the network communication service data;
step 750, the packet capturing server B receives the network communication service data (service response/downlink data) returned by the application server, and encapsulates the received network communication service data (service response/downlink data) into second packet capturing data according to the corresponding relation with step 740, and forwards the second packet capturing data to the App;
the second packet capturing data includes the session identifier in step 730;
step 760, the app receives the second packet-grabbing data, unpacks the second packet-grabbing data, and returns the network communication service data (service response/downlink data) to the corresponding service module according to the session identifier included in the second packet-grabbing data.
The embodiment of the disclosure also provides a packet grabbing method, as shown in fig. 8, including:
step 810, acquiring packet capturing server information (server B) from an application server according to the packet capturing instruction;
the packet capturing instruction is the packet capturing instruction (a string of character strings: 3213324) obtained by App in step 720. And the App user feeds back the packet capturing instruction to a technician needing to capture the packet so as to carry out subsequent packet capturing data subscription. And the technician acquires the packet capturing server information from the application server according to the packet capturing instruction by using the second equipment. According to the packet capturing instruction, the application server feeds back the packet capturing server information (server B) determined by the negotiation in step 710 to the second device.
Step 820, sending, by the second device, a packet-grabbing data subscription request to the packet-grabbing server (server B).
Wherein, the packet-grabbing data subscription request includes: a user name (www 123), the packet-grabbing instruction (3213324), and data filtering conditions.
For example, the data filtering conditions include 2 sets of attributes and attribute keys:
attribute attribute key
DnsIp:www.unXXX.com
StackInfo:Login
The technician subscribes to the server B, via the second device, for the bale plucker data corresponding to the bale plucker instruction (string of characters: 3213324), which can be matched to the bale plucker data with field DnsIp containing www.unXXX.com and field StackInfo containing logic.
In some example implementations, the method further includes:
in step 830, the second device receives the packet-grabbing data from the packet-grabbing server (server B).
In some example implementations, the method further includes:
in step 840, the second device parses the packet capturing data, obtains the network communication service data and the thread call information, and saves the correspondence between the service request and the thread call information in the network communication service data.
The embodiment of the disclosure also provides a packet grabbing method, as shown in fig. 9, including:
step 910, the packet capturing server information (server B) receives a packet capturing data subscription request from the second device;
And step 920, the packet capturing server information (server B) verifies the user name and the packet capturing instruction in the packet capturing data subscription request, and creates a subscription task after verification is successful, wherein the subscription request information is stored in the subscription task.
It should be noted that, a packet capturing instruction corresponds to a subscription task on the packet capturing server, if a plurality of second devices subscribe to packet capturing data corresponding to the packet capturing instruction, a subscription task is created according to a first packet capturing data subscription request of the packet capturing instruction, a non-first packet capturing data subscription request of the packet capturing instruction is not created any more, and corresponding subscription request information is newly added and stored.
It can be understood that the packet capturing server carries out a subscription task, and the forwarding of the network communication service uplink data to the application server and the forwarding of the network communication service downlink data to the application program are carried out according to the packet capturing instruction; and respectively issuing packet capturing data meeting data filtering conditions to one or more corresponding second devices according to the stored subscription request information.
In some example implementations, the method further includes:
step 930, the packet-grabbing server (server B) receives the first packet-grabbing data from App;
Step 940, analyzing the first packet capturing data to obtain application server information corresponding to the application program and network communication service uplink data of the application program;
step 950, sending the network communication service uplink data of the application program to an application server, and obtaining the network communication service downlink data sent by the application server;
and step 960, packaging the network communication service downlink data in the second packet-grabbing data and sending the second packet-grabbing data to the application program.
In some exemplary implementations, step 940 further includes determining, according to the data bundle subscription request information in the subscription task, whether the first bundle data satisfies a filtering condition in the data bundle subscription request of the second device, and if so, executing step 940-1 to publish the first bundle data to the corresponding second device;
step 960 also includes: and determining whether the second packet capturing data meets the filtering condition in the data packet capturing subscription request of the second device according to the data packet capturing subscription request information in the subscription task, and if so, executing step 960-1 to publish the second packet capturing data to the corresponding second device.
Wherein the second device in steps 940 and 960 may include one or more.
The disclosed embodiment also provides a bale plucking system 1000, as shown in fig. 10, comprising:
an application server 1010, a bale plucker 1020, and an application 1030;
the application server 1010 is configured to negotiate with the application 1030 to determine packet-grabbing service information;
the application 1030 is configured to interact with the packet capturing server 1020 according to the packet capturing server information included in the packet capturing service information to implement receiving and/or sending of packet capturing data of the application; wherein, the packet grabbing data comprises: network communication service data for service interaction between the application 1030 and the application server 1010, which is forwarded through the packet capturing server 1020;
the packet capturing server 720 is configured to connect the application 1030 and the application server 1010, and forward the network communication service data; and is further configured to publish the bundle data of the application 1030 to a subscriber according to the bundle data subscription information.
In some example implementations, the application 1030 is deployed on the first device 1040.
In some example implementations, the system further includes a second device 1050;
the second device 1050 is configured to subscribe, to the packet capturing server 1020, to the packet capturing data of the application 1030 according to the packet capturing server information and the packet capturing instruction included in the packet capturing service information.
In some example implementations, the bale plucker server 1020 is further configured to publish the bale plucker data to the second device 1050 based on subscription information of the second device.
In some exemplary implementations, a packet grabbing/analyzing program 1060 is disposed on the second device 1050, where the packet grabbing analyzing program 1060 is configured to parse the packet grabbing data, obtain network communication service data and thread call information, and store a correspondence between service requests and thread call information in the network communication service data;
or, the packet grabbing/analyzing program 1060 is configured to parse the packet grabbing data, obtain the network communication service data and the thread calling information, and save the network communication service data and the thread calling information according to a preset format.
The embodiment of the disclosure also provides a packet grabbing system, which comprises:
the packet capturing service information acquisition module is used for acquiring packet capturing service information determined by negotiation with the application server;
the packet capturing data receiving and transmitting module is arranged to interact with the packet capturing server to receive and/or transmit the packet capturing data of the application program according to the packet capturing server information contained in the packet capturing service information;
the package grabbing data publishing module is used for publishing package grabbing data of the application program to a subscriber according to package grabbing data subscription information;
Wherein, the packet grabbing data comprises: and the application program forwarded by the packet capturing server performs service interaction with the application server.
In some exemplary implementations, the packet capturing service information acquiring module, the packet capturing data transceiver module and the packet capturing data publishing module may be flexibly deployed on different network devices respectively, or part of the modules may be deployed on the same network device together, which is determined according to the actual application requirements, and the method is not limited to a specific mode.
The embodiment of the disclosure also provides an electronic device, including:
one or more processors;
storage means for storing one or more programs,
the one or more programs, when executed by the one or more processors, cause the one or more processors to implement the packet-grabbing method as described in any of the embodiments of the present disclosure.
The embodiments of the present disclosure also provide a computer-readable storage medium having stored thereon a computer program that is executed by a processor to implement a packet-grabbing method as described in any of the embodiments of the present disclosure.
It can be seen that, based on the packet capturing scheme provided by the embodiment of the present disclosure, the application server determines, in a negotiation manner, the packet capturing server corresponding to the application program. The application program only needs to start the packet capturing function, does not need more setting or packet capturing operation coordination, can capture network communication service data through the packet capturing server, is simple and convenient to operate at the application program side, greatly reduces the occupation of terminal equipment resources in a local packet capturing scheme of related terminal equipment, and reduces the influence on the normal operation of other applications on the terminal equipment. The packet capturing server is flexibly selected according to the service load condition, and only provides network communication service data forwarding and packet capturing service for the application program with the packet capturing function. In some exemplary embodiments, a subscription-publishing mode is adopted to provide packet capturing data for a third party device or system according to requirements, so that the requirements of flexibility and instantaneity of network data packet capturing are fully met. And a plurality of second devices are supported to grasp the packet capturing data with different or same characteristics of the same application program in parallel, so that the pertinence of data packet capturing and the efficiency of subsequent packet capturing data analysis and processing are greatly improved. In some exemplary embodiments, the packet capturing data further includes thread calling information, and the thread calling information associated with the network communication service data is recorded, so that related calling threads or methods can be quickly positioned under the condition that abnormal network communication service data is found, and the speed of analyzing, positioning and finding problems by using the packet capturing data is remarkably improved.
Those of ordinary skill in the art will appreciate that all or some of the steps, systems, functional modules/units in the apparatus, and methods disclosed above may be implemented as software, firmware, hardware, and suitable combinations thereof. In a hardware implementation, the division between the functional modules/units mentioned in the above description does not necessarily correspond to the division of physical components; for example, one physical component may have multiple functions, or one function or step may be performed cooperatively by several physical components. Some or all of the components may be implemented as software executed by a processor, such as a digital signal processor or microprocessor, or as hardware, or as an integrated circuit, such as an application specific integrated circuit. Such software may be distributed on computer readable media, which may include computer storage media (or non-transitory media) and communication media (or transitory media). The term computer storage media includes both volatile and nonvolatile, removable and non-removable media implemented in any method or technology for storage of information such as computer readable instructions, data structures, program modules or other data, as known to those skilled in the art. Computer storage media includes, but is not limited to, RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, digital Versatile Disks (DVD) or other optical disk storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other medium which can be used to store the desired information and which can be accessed by a computer. Furthermore, as is well known to those of ordinary skill in the art, communication media typically embodies computer readable instructions, data structures, program modules or other data in a modulated data signal such as a carrier wave or other transport mechanism and includes any information delivery media.
The foregoing description is only of the preferred embodiments of the present invention and is not intended to limit the scope of the invention, and all equivalent structural changes made by the specification and drawings of the present invention or direct/indirect application in other related technical fields are included in the scope of the present invention.
Claims (10)
1. A method of gripping a packet, comprising:
acquiring packet capturing service information which is determined by negotiation with an application server;
according to the packet capturing server information contained in the packet capturing service information, the packet capturing server is interacted with to receive and/or transmit the packet capturing data of the application program;
the packet capturing server publishes the packet capturing data of the application program to a subscriber according to the packet capturing data subscription information;
wherein, the packet grabbing data comprises: and the application program forwarded by the packet capturing server performs service interaction with the application server.
2. The method of claim 1, wherein,
the packet-grabbing data further includes one or more of the following:
the thread calling information of the application program and the session identifier corresponding to the network communication service data;
The session identifier is used for indicating a session corresponding relation between the network communication service data received by the application program and the network communication service data sent by the application program.
3. The method of claim 1 or 2, wherein,
the interaction with the packet capturing server realizes the receiving and/or sending of the packet capturing data of the application program, and comprises the following steps:
executing a new network data receiving method and/or a new network data transmitting method according to a running time system of an equipment operating system where the application program is located, and interacting with the packet capturing server to receive and/or transmit the packet capturing data of the application program under the condition that a packet capturing function is started;
the new network data sending method is used for packaging packet capturing data comprising network communication service data sent to the application server by the application program according to a first format after establishing connection with the packet capturing server under the condition that a packet capturing function is started, and sending the packet capturing data to the packet capturing server;
the new network data receiving method is used for receiving the packet capturing data from the packet capturing server after establishing connection with the packet capturing server under the condition that the packet capturing function is started, and analyzing the packet capturing data according to a second format to obtain network communication service data sent to the application program by the application server.
4. The method of claim 1 or 2, wherein,
the method further comprises the steps of:
the subscriber acquires the packet capturing service information;
the subscriber subscribes the packet capturing data of the application program to the packet capturing server according to the packet capturing server information and the packet capturing instruction contained in the packet capturing service information;
and the subscriber receives the packet capturing data of the application program published by the packet capturing server.
5. The method of claim 4, wherein,
the subscribing the packet capturing data of the application program to the packet capturing server comprises the following steps:
and the subscriber subscribes packet capturing data meeting the data filtering conditions to the packet capturing server according to the set data filtering conditions and the packet capturing instructions contained in the packet capturing service information.
6. The method of claim 4, wherein,
the method further comprises the steps of:
subscribing Fang Jiexi to the packet capturing data, acquiring the network communication service data and the thread calling information of the application program, and storing the corresponding relation between the service request in the network communication service data and the thread calling information of the application program.
7. The method of claim 1 or 2, wherein,
The method further comprises the steps of:
the packet capture server receives packet capture data from the application program;
analyzing the packet capturing data according to a first format, and acquiring application server information corresponding to the application program and network communication service uplink data of the application program;
sending network communication service uplink data of the application program to an application server, and acquiring network communication service downlink data;
and packaging the packet capturing data containing the network communication service downlink data according to a second format, and sending the packet capturing data to the application program.
8. The method of claim 7, wherein,
the method further comprises the steps of:
after the application program starts the packet grabbing function, negotiating with the application server to determine the packet grabbing service information.
9. A bale plucking system, comprising:
an application server, a packet capturing server and an application program;
the application server is configured to negotiate with the application program to determine packet capturing service information;
the application program is set to interact with the packet capturing server according to the packet capturing server information contained in the packet capturing service information to receive and/or transmit the packet capturing data of the application program; wherein, the packet grabbing data comprises: network communication service data of service interaction between the application program forwarded by the packet capturing server and the application server;
The packet grabbing server is arranged to connect the application program and the application server to forward the network communication service data; and the method is also arranged to publish the package capturing data of the application program to the subscriber according to the package capturing data subscription information.
10. An electronic device, comprising:
one or more processors;
storage means for storing one or more programs,
the one or more programs, when executed by the one or more processors, cause the one or more processors to implement the bale plucking method of any of claims 1-8.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210276970.9A CN116828407A (en) | 2022-03-21 | 2022-03-21 | Method and system for grabbing package and electronic equipment |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210276970.9A CN116828407A (en) | 2022-03-21 | 2022-03-21 | Method and system for grabbing package and electronic equipment |
Publications (1)
Publication Number | Publication Date |
---|---|
CN116828407A true CN116828407A (en) | 2023-09-29 |
Family
ID=88127997
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202210276970.9A Pending CN116828407A (en) | 2022-03-21 | 2022-03-21 | Method and system for grabbing package and electronic equipment |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN116828407A (en) |
-
2022
- 2022-03-21 CN CN202210276970.9A patent/CN116828407A/en active Pending
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109391500B (en) | Configuration management method, device and equipment | |
CN109067914B (en) | web service proxy method, device, equipment and storage medium | |
US10708376B2 (en) | Message bus service directory | |
CA2744831C (en) | Application data flow management in an ip network | |
US9083648B2 (en) | Method and system for performing remote network management on a voice home gateway terminal | |
CN107222324B (en) | Service configuration method and device of network service | |
CN105103497A (en) | Application traffic pairing | |
US12019761B2 (en) | Network based media processing security | |
WO2017101815A1 (en) | Message processing method, device and system | |
CN112804303B (en) | Service providing method, device, system, transit platform and storage medium | |
US20210274020A1 (en) | Communication method, client device, and server device | |
RU2669522C1 (en) | Device, method and system of charge management | |
CN112653716B (en) | Service binding method and device | |
CN103428013B (en) | Device management method, system and gateway device | |
WO2010124571A1 (en) | Node information acquirement method, client, and server | |
CN116828407A (en) | Method and system for grabbing package and electronic equipment | |
CN114244758B (en) | Network diagnosis method, storage medium, electronic equipment and system of android platform | |
CN113300936B (en) | CDN node, edge node signaling adaptation method, device and storage medium | |
CN112787947B (en) | Network service processing method, system and gateway equipment | |
TWI778771B (en) | Monitoring method, monitoring system and monitoring device of virtual machine operation | |
WO2024067148A1 (en) | Edge interconnection service execution method, apparatus and system, electronic device, and medium | |
CN110868317B (en) | Equipment monitoring method and device, electronic equipment and storage medium | |
CN116347562B (en) | Information configuration method, device, related equipment and storage medium | |
WO2017113355A1 (en) | Service management method, device, entity and service offering system | |
WO2023134350A1 (en) | Message sending method, message receiving method, information sending method, and apparatus |
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 |