Communication method and apparatus, device, storage medium, and product

By establishing a point-to-point communication channel supporting inter-process communication between the client device and the server device, and using communication components such as ADB to achieve direct communication, the problem of complex IP address configuration is solved, network packet analysis is realized under no-network or weak network conditions, and the security and efficiency of communication are improved.

WO2026129357A1PCT designated stage Publication Date: 2026-06-25BEIJING ZITIAO NETWORK TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
BEIJING ZITIAO NETWORK TECH CO LTD
Filing Date
2024-12-20
Publication Date
2026-06-25

AI Technical Summary

Technical Problem

Existing technologies for network packet analysis, especially in communication between client and server devices, suffer from complex and inefficient IP address configuration, making it difficult to effectively capture and analyze packets under conditions of no network or weak network.

Method used

By establishing a point-to-point communication channel supporting inter-process communication between the first and second devices, and using communication components such as the Android Debug Bridge (ADB) to achieve direct communication, complex IP address configurations are avoided, ensuring that network data packets of the target application can be captured and analyzed even under conditions of no network or weak network.

Benefits of technology

It simplifies the operation process, improves the security and efficiency of communication, and enables the analysis of the operating status of target applications under conditions of no network or weak network.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2024141223_25062026_PF_FP_ABST
    Figure CN2024141223_25062026_PF_FP_ABST
Patent Text Reader

Abstract

The embodiments of the present disclosure relate to a communication method and apparatus, a device, a storage medium, and a product. The method provided herein comprises: in response to starting up a target application installed on a first device, collecting a network data packet received and sent by the target application; controlling a first communication module provided on the first device to establish, via a communication component, a point-to-point communication channel with a second communication module provided on a second device, wherein the point-to-point communication channel supports inter-process communication; and triggering the first communication module to forward the collected network data packet to the second communication module via the point-to-point communication channel.
Need to check novelty before this filing date? Find Prior Art

Description

Communication methods, devices, equipment, storage media and products Technical Field

[0001] This disclosure relates to the field of computer technology, and more particularly to a communication method, apparatus, device, storage medium, and product. Background Technology

[0002] Network packet analysis refers to the process of capturing and parsing data packets sent and received by a specific device on a network. Packet analysis is typically used to analyze specific applications installed on client devices. With the help of packet analysis, various information can be determined regarding the communication process between the application's client and server devices. This information may include, for example, information about network performance and security threats. It helps to gain a deeper understanding of the application's operational status, thereby enabling timely identification and resolution of problems, and ensuring the stability and security of the communication process. Summary of the Invention

[0003] In a first aspect of this disclosure, a communication method implemented at a first device is provided. The method includes: in response to the launch of a target application installed on the first device, collecting network data packets sent and received by the target application; controlling a first communication module located at the first device to establish a point-to-point communication channel with a second communication module located at a second device via a communication component, wherein the point-to-point communication channel supports inter-process communication; and triggering the first communication module to forward the collected network data packets to the second communication module via the point-to-point communication channel.

[0004] In a second aspect of this disclosure, a communication method implemented at a second device is provided. The method includes: controlling a second communication module located at the second device to establish a point-to-point communication channel with a first communication module located at a first device via a communication component, wherein the point-to-point communication channel supports inter-process communication; receiving network data packets from the first communication module via the point-to-point communication channel using the second communication module, wherein the network data packets are sent and received by a target application installed at the first device; and performing data analysis on the network data packets for the target application.

[0005] In a third aspect of this disclosure, an apparatus for communication is provided, implemented at a first device. The apparatus includes: a data acquisition module configured to acquire network data packets sent and received by a target application installed at the first device in response to the launch of such an application; a first control module configured to control a first communication module located at the first device to establish a point-to-point communication channel with a second communication module located at a second device via a communication component, wherein the point-to-point communication channel supports inter-process communication; and a triggering module configured to trigger the first communication module to forward the acquired network data packets to the second communication module via the point-to-point communication channel.

[0006] In a fourth aspect of this disclosure, an apparatus for communication is provided, implemented at a second device. The apparatus includes: a second control module configured to control a second communication module located at the second device to establish a point-to-point communication channel with a first communication module located at the first device via a communication component, wherein the point-to-point communication channel supports inter-process communication; a receiving module configured to receive network data packets from the first communication module via the point-to-point communication channel using the second communication module, wherein the network data packets are sent and received by a target application installed at the first device; and a data analysis module configured to perform data analysis on the network data packets for the target application.

[0007] In a fifth aspect of this disclosure, an electronic device is provided. The device includes at least one processing unit; and at least one memory coupled to the at least one processing unit and storing instructions for execution by the at least one processing unit. When executed by the at least one processing unit, the instructions cause the device to perform the methods of the first or second aspect.

[0008] In a sixth aspect of this disclosure, a computer-readable storage medium is provided. The computer-readable storage medium stores a computer program that can be executed by a processor to implement the methods of the first or second aspect.

[0009] In a seventh aspect of this disclosure, a computer program product is provided. The computer program product includes computer-executable instructions that, when executed by a processor, implement the method according to a first or second aspect of this disclosure.

[0010] It should be understood that the content described in this content section is not intended to limit the key or essential features of the embodiments of this disclosure, nor is it intended to restrict the scope of this disclosure. Other features of this disclosure will become readily apparent from the following description. Attached Figure Description

[0011] The above and other features, advantages, and aspects of the embodiments of this disclosure will become more apparent from the accompanying drawings and the following detailed description. In the drawings, the same or similar reference numerals denote the same or similar elements, wherein:

[0012] Figure 1 shows a schematic diagram of an example environment according to some embodiments of the present disclosure;

[0013] Figure 2 illustrates a schematic diagram of an example of interaction between a first device and a second device according to some embodiments of the present disclosure;

[0014] Figures 3A to 3C respectively illustrate schematic diagrams of examples of establishing point-to-point communication channels according to some embodiments of the present disclosure;

[0015] Figure 4 shows a schematic diagram of an example of a target message queue according to some embodiments of the present disclosure;

[0016] Figure 5 shows a flowchart of an example process of a communication method implemented at a first device according to some embodiments of the present disclosure;

[0017] Figure 6 shows a flowchart of an example process of a communication method implemented at a second device according to some embodiments of the present disclosure;

[0018] Figure 7 shows a schematic structural block diagram of a means for communication implemented at a first device according to some embodiments of the present disclosure;

[0019] Figure 8 shows a schematic structural block diagram of a means for communication implemented at a second device according to some embodiments of the present disclosure; and

[0020] Figure 9 shows a block diagram of an electronic device in which one or more embodiments of the present disclosure may be implemented. Detailed Implementation

[0021] Embodiments of this disclosure will now be described in more detail with reference to the accompanying drawings. While some embodiments of this disclosure are shown in the drawings, it should be understood that this disclosure can be implemented in various forms and should not be construed as limited to the embodiments set forth herein. Rather, these embodiments are provided to provide a more thorough and complete understanding of this disclosure. It should be understood that the accompanying drawings and embodiments of this disclosure are for illustrative purposes only and are not intended to limit the scope of protection of this disclosure.

[0022] It should be noted that the headings of any section / subsection provided herein are not limiting. Various embodiments are described throughout this document, and embodiments of any type may be included under any section / subsection. Furthermore, embodiments described in any section / subsection may be combined in any way with any other embodiments described in the same section / subsection and / or different sections / subsections.

[0023] In the description of embodiments of this disclosure, the term "comprising" and similar terms should be understood as open-ended inclusion, i.e., "including but not limited to". The term "based on" should be understood as "at least partially based on". The term "one embodiment" or "the embodiment" should be understood as "at least one embodiment". The term "some embodiments" should be understood as "at least some embodiments". Other explicit and implicit definitions may also be included below. The terms "first", "second", etc., may refer to different or the same objects. Other explicit and implicit definitions may also be included below.

[0024] The embodiments of this disclosure may involve user data, data acquisition, and / or use. All of these aspects comply with applicable laws, regulations, and relevant provisions. In the embodiments of this disclosure, all data collection, acquisition, processing, manipulation, forwarding, and use are conducted with the user's knowledge and confirmation. Accordingly, in implementing the embodiments of this disclosure, the type, scope of use, and usage scenarios of any data or information that may be involved should be communicated to the user and their authorization obtained in accordance with relevant laws and regulations through appropriate means. The specific methods of notification and / or authorization may vary depending on the actual situation and application scenario, and the scope of this disclosure is not limited in this respect.

[0025] In this specification and the embodiments, any processing of personal information will be carried out only under the premise of legality (such as obtaining the consent of the personal information subject, or being necessary for the performance of a contract), and will only be carried out within the scope stipulated or agreed upon. A user's refusal to process personal information other than that necessary for basic functions will not affect the user's use of basic functions.

[0026] As briefly described above, network packet analysis can be used to determine various information about multiple devices during communication. In a proxy-based interception scheme, a proxy device can be deployed between the client device and the server device. The proxy device is configured to collect network packets sent and received by the client device during communication with the server device, including request packets sent by the client device to the server device and response packets sent by the server device to the client device. For clarity, request packets and response packets will also be referred to as network packets below. The proxy device can then send the collected network packets to a data analysis device for data analysis.

[0027] This approach requires users to configure detailed information such as the client device's network address (or IP address) and port. In scenarios where Dynamic Host Configuration Protocol (DHCP) is used to assign IP addresses to devices, the client device's IP address will frequently change. Furthermore, IP-based communication protocols rely on various certificate installations to simulate encrypted and secure communication between the client and server devices. This certificate installation process is complex and can lead to compatibility issues with different client device models. Therefore, frequent configuration updates are needed to adapt to changes in the client device's IP address, resulting in a relatively complex operation and low overall efficiency.

[0028] In view of this, the present disclosure provides a communication scheme implemented at a first device. According to this scheme, in response to the startup of a target application installed at the first device, network data packets sent and received by the target application are collected. Then, a first communication module located at the first device is controlled to establish a point-to-point communication channel with a second communication module located at a second device via a communication component, wherein the point-to-point communication channel supports inter-process communication. Subsequently, the first communication module is triggered to forward the collected network data packets to the second communication module via the point-to-point communication channel.

[0029] As will be more clearly understood from the following description, the solution proposed in this disclosure enables direct communication between a first device and a second device used for network packet analysis by constructing a point-to-point communication channel that supports inter-process communication. This direct communication method eliminates the need for complex IP address configuration, simplifying the operation process. Furthermore, such a point-to-point communication channel ensures security and allows the capture of network packets from the target application for analysis even when the first device is without a network or in a weak network environment. This makes it possible to analyze the operational status of the target application under conditions of no network or weak network.

[0030] The following will further describe in detail various example implementations of this scheme with reference to the accompanying drawings.

[0031] Example Scenario

[0032] Figure 1 illustrates a schematic diagram of an example environment 100 according to some embodiments of the present disclosure. Referring to Figure 1, the example environment 100 may include a first device 110 and a second device 120.

[0033] In example environment 100, the first device 110 has an application, such as target application 130, installed for network data analysis. User 141 can interact with target application 130 via the first device 110 and / or its attached devices. After startup, target application 130 can continuously send request packets to the server device 150 corresponding to target application 130 or receive response packets sent by server device 150, thereby realizing communication between the two. For clarity, the sending of request packets and the receiving of response packets by target application 130 will be collectively referred to as network packets sent and received by target application 130 below.

[0034] User 142 can analyze network data packets sent and received by target application 130 using second device 120. In embodiments of this disclosure, first device 110, in response to the launch of target application 130, collects network data packets sent and received by target application using methods such as interceptors. Then, first device 110 controls a first communication module located at first device 110 to establish a point-to-point communication channel 170 with a second communication module located at second device 140 via communication component 160. Point-to-point communication channel 170 supports inter-process communication. Second device 140 uses the second communication module to receive network data packets from the first communication module via point-to-point communication channel 170. Subsequently, second device 140 performs data analysis on the received network data packets for target application.

[0035] In some embodiments, the first device 110 and the second device 140 can be any type of device. Such devices can be terminal devices such as mobile terminals, fixed terminals, or portable terminals. For example, such devices can include mobile phones, desktop computers, laptop computers, notebook computers, netbook computers, tablet computers, media computers, multimedia tablets, personal communication system (PCS) devices, personal navigation devices, personal digital assistants (PDAs), audio / video players, digital cameras / camcorders, positioning devices, television receivers, radio receivers, e-book devices, gaming devices, or any combination thereof, including accessories and peripherals of these devices or any combination thereof. In example environment 100, the first device 110 can be, for example, a mobile phone, while the second device 140 can be any type of computer.

[0036] In some embodiments, the server device 150 may be a standalone physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, content delivery networks, and big data and artificial intelligence platforms. The server device 150 may, for example, include computing systems / servers such as mainframes, edge computing nodes, computing devices in a cloud environment, and so on.

[0037] It should be understood that the structure and function of the various elements in environment 100 are described for illustrative purposes only and do not imply any limitation on the scope of this disclosure.

[0038] Example Interaction

[0039] Figure 2 illustrates a schematic diagram of an interaction example 200 between a first device and a second device according to some embodiments of the present disclosure. The example of Figure 2 will now be described in conjunction with Figure 1.

[0040] In response to the startup of the target application 130 installed on the first device 110, the first device 110 collects network data packets 260 sent and received by the target application 130.

[0041] As an example, user 141 can launch target application 130 through a pre-defined action. Pre-defined actions may include, but are not limited to, clicking an icon, a voice command, or automatic launch. First device 110 determines that target application 130 has been launched in response to detecting such a pre-defined action.

[0042] As an example, during the startup process of target application 130, the first device 110 initiates a function to collect network data packets 260 sent and received by target application 130. This collection function can collect request data packets sent by target application 130 to server device 150 and response data packets received by target application from server device 150 during communication between target application 130 and server device 150. As an example, such a collection function can be implemented based on interceptor 150, etc. Through interceptor 150, network data packets 260 of target application 130 can be captured by code interception. This makes it possible to analyze the operational status data of target application 130 in offline or weak network conditions.

[0043] First device 110 controls a first communication module 211 located at first device 110 to establish a point-to-point communication channel 170 with a second communication module 212 located at second device 140 via communication component 160. The point-to-point communication channel 170 supports inter-process communication. As an example, first device 110, by controlling first communication module 211, uses the interface or protocol provided by communication component 160 to initiate a request to establish the point-to-point communication channel 170 to second communication module 212 of second device 140. Upon receiving the request, second device 140 controls second communication module 212 located at second device 140 to establish the point-to-point communication channel 170 with first communication module 211 located at first device 110 via communication component 160, thereby performing a handshake with first device 110 to complete the establishment of the point-to-point communication channel 170.

[0044] It should be noted that, depending on actual needs, the party initiating the request to establish a point-to-point communication channel 170 may also be a second device 140, and the embodiments disclosed herein do not impose any restrictions on this.

[0045] In some embodiments, communication component 160 may support wired or wireless connections. That is, point-to-point communication channel 170 may be a wired communication channel or a wireless communication channel. In some embodiments, communication component 160 includes at least a debug bridge interface. A debug bridge interface is an interface used for debugging purposes. The debug bridge interface allows developers or maintenance personnel to interact with the target device through specific tools or commands to perform debugging, testing, or obtain status information of the target device.

[0046] As an example, communication component 160 may include an Android Debug Bridge (ADB), etc. As an example, the first communication module 211 may correspond to an ADB server module, and the second communication module 212 may correspond to an ADB client module. Further, the first communication module 211 may correspond to a WebSocket server module, and the second communication module 212 may correspond to a WebSocket client module. In this way, the point-to-point communication channel 170 can realize a full-duplex communication channel, enabling the first device 110 and the second device 140 to send and receive data to each other in real time.

[0047] As an example, the Android debug bridge can support wired connections to establish a wired communication channel. Additionally, the Android debug bridge can also support wireless connections to establish a wireless communication channel. Wired connections can include, for example, Universal Serial Bus (USB) or other types of cables. Wireless connections can include, for example, Wi-Fi, Bluetooth, Near Field Communication (NFC), etc. Once the connection (i.e., ADB connection) is successful, a point-to-point communication channel 170 can be established between the first communication module 211 and the second communication module 212 to send and receive data, thereby achieving inter-process communication.

[0048] With the help of communication component 160, such as ADB, the first device 110 and the second device 140 do not need to be configured with device IPs. Direct communication can be achieved simply through a wired or wireless ADB connection established between the first device 110 and the second device 140. Furthermore, as a trusted debugging tool, ADB undergoes rigorous security verification during the connection process, ensuring the confidentiality and integrity of data transmission. This effectively prevents data leakage and unauthorized access when using communication component 160 for debugging, testing, or obtaining target device status information, thus ensuring data security.

[0049] Furthermore, depending on actual needs, the communication component 160 may also include other types of debug bridge interfaces to meet different debugging purposes, support different communication protocols, or provide different functional characteristics. As an example, the first device 110 may employ frameworks such as Vue, Quasar, and Electron, thereby enabling its application to Mac applications at a lower cost. For clarity, unless otherwise specified, the following description uses the example of the communication component 160 including ADB to illustrate various embodiments of this disclosure.

[0050] In some embodiments, during the establishment of the point-to-point communication channel 170, the first device 110 controls the first communication module 211 to listen to the first communication port 221 at the first device 110. The first communication port 221 communicates with the second communication port 222 at the second device 140 via the communication component 160. Correspondingly, the second device 140 controls the second communication module 212 to listen to the second communication port 222 at the second device 140.

[0051] As an example, the first device 110 or the second device 140 can use a predetermined command (in the example of an ADB connection, the adb forward command) to set port forwarding rules, thereby forwarding requests and data on the first communication port 221 of the first device 110 to the corresponding port (e.g., the second communication port 222) of the second device 140. In this way, the first communication module 211 can forward the collected network data packets 260 to the second communication port 222 through the first communication port 221, and then they can be acquired by the second communication module 212.

[0052] Depending on the actual needs, any suitable packet filtering framework can be used in the embodiments of this disclosure to filter and detect network data packets 260. For different packet filtering frameworks, the port numbers of the first communication port 221 and the second communication port 222 need to be matched. For example, for the Netfilter packet filtering framework, the first communication port 221 and the second communication port 222 use the same port number portXX. It should be noted that the description of the port numbers here is only illustrative and does not constitute a limitation on the embodiments of this disclosure.

[0053] As an example, in the ADB connection example, when the forwarding command (e.g., `adb forward tcp:XX tcp:XX`) is executed, you can check whether the forwarding command has taken effect using `adb forward-list`. It should be noted that in the forwarding command, "tcp:XX tcp:XX" means forwarding the data received on the first communication port 221 (port number portXX) on the first device to the second communication port 222 (port number portXX) on the second device.

[0054] As an example, when the forwarding command has taken effect and communication is being conducted on the first communication port 221 of the first device 110, the first device 110 can create a first process and bind it to the first communication port 221. When communication is being conducted on the second communication port 222 of the second device 140, the second device 140 can create a second process and bind it to the second communication port 222. In this way, any communication initiated by the first device 110 for the first process will be forwarded by the communication component 160 to the second process corresponding to the second communication port 222 via the process described above. Similarly, any communication initiated by the second device 140 for the second process will be forwarded by the communication component 160 to the first process corresponding to the first communication port 221 of the first device 110. Inter-process communication can be achieved through the aforementioned example.

[0055] In embodiments of this disclosure, the timing of establishing the point-to-point communication channel 170 can be determined according to actual needs. Figures 3A to 3C respectively illustrate schematic diagrams of examples 300A to 300C of establishing a point-to-point communication channel according to some embodiments of this disclosure.

[0056] Referring to FIG3A, in some embodiments, in response to the launch (310) of the target application, the first device 110 controls the first communication module 211 to establish (332) a point-to-point communication channel 170 with the second communication module 212 via the communication component 160. Furthermore, the first communication module 211 begins to extract (333) the collected network data packets 260 simultaneously with or before the target application 130 begins to send and receive (320) network data packets 260.

[0057] Referring to FIG3B, in some embodiments, in response to the startup (310) of the target application 130, the first device 110 controls the first communication module 211 to establish (332) a point-to-point communication channel 170 with the second communication module 212 via the communication component 160. Furthermore, after the target application 130 starts (310), the first communication module 211 begins to extract (333) the collected network data packets 260. By establishing (332) the point-to-point communication channel 170 only after a predetermined time has elapsed since the target application 130 started (310), the startup delay (310) of the target application 130 caused by the establishment of the point-to-point communication channel 170 can be reduced to some extent. This approach allows the target application 130 to focus on loading and initializing its core functions during the initial startup (310), thereby reducing the startup time of the target application 130 to some extent.

[0058] Referring to FIG3C, in some embodiments, in response to determining that the startup (310) of the target application 130 is complete, the first device 110 controls the first communication module 211 to establish (332) a point-to-point communication channel 170 with the second communication module 212 via the communication component 160. By establishing (332) the point-to-point communication channel 170 after determining that the startup (310) of the target application 130 is complete, the interference and delay that may be caused to the startup (310) of the target application 130 due to the establishment (332) of the point-to-point communication channel 170 can be minimized. This approach allows the target application 130 to not perform any operations related to the establishment (332) of the point-to-point communication channel 170 before it is fully started, thereby further reducing the startup (310) time of the target application 130.

[0059] As an example, the first device 110 can control when to establish (332) the point-to-point communication channel 170 by controlling the timing of starting (331) the first communication module 211. For example, in response to determining that the startup (310) of the target application 130 is complete, the first device 110 starts (331) the first communication module 211. After the startup (310) of the first communication module 211 is complete, the first communication module 211 establishes (332) the point-to-point communication channel 170 and extracts (333) the collected network data packets 260. In this way, it can be ensured that the establishment (332) of the point-to-point communication channel 170 occurs after the startup (310) of the target application 130 is complete.

[0060] It should be noted that "startup (310)" here can specifically refer to the "cold start" of the target application 130. "Cold start" can refer to the process of starting the target application 130 from a completely unrunning state (310). This process can include things like initializing (340) the configuration and injecting (350) the interceptor 150, etc.

[0061] Once the point-to-point communication channel 170 is established, the first device 110 triggers the first communication module 211 to forward the collected network data packets 260 to the second communication module 212 via the point-to-point communication channel 170. The second device 140 then uses the second communication module 212 to receive the network data packets 260 from the first communication module 211 via the point-to-point communication channel 170.

[0062] As described above, in the example shown in Figure 3C, the first device 110 initiates the establishment (332) point-to-point communication channel 170 between the first communication module 211 and the second communication module 212 only after determining that the startup (310) of the target application 130 is complete. To enable the network data packets 260 sent and received by the target application 130 during startup (310) to also be forwarded to the second communication module 212, some embodiments of this disclosure store the network data packets 260 sent and received by the target application 130 during startup (310).

[0063] Specifically, in response to determining that the target application 130 has started (310), the first device 110 triggers the collection of network data packets 260 from the target application 130. The first device 110 stores at least the collected first network data packets. The first network data packets include network data packets sent and received by the target application 130 during the startup (310) process. After the startup (310) of the target application 130 is completed, the first device 110 controls the establishment (332) of a point-to-point communication channel 170. In response to determining that the point-to-point communication channel 170 has been successfully established, the first device 110 triggers the first communication module 211 to forward the stored first network data packets to the second communication module 212 via the point-to-point communication channel 170.

[0064] As an example, the first device 110 can use the interceptor 150 described above, etc., to intercept and capture request packets and response packets sent and received by the target application 130 during startup (310). These network packets 260 may contain information required by the target application 130 during startup (310), such as configuration data, authentication information, initial resource requests, etc. The first device 110 will temporarily store these collected network packets 260 locally for subsequent analysis or forwarding.

[0065] After the startup (310) process of target application 130 is completed, the first device 110 will attempt to establish (332) a point-to-point communication channel 170 with the second device 140. Once the point-to-point communication channel 170 is successfully established, the first device 110 will start (331) the first communication module 211. The first communication module 211 then communicates with the second communication module 212 on the second device 140 through the point-to-point communication channel 170. During this process, the first communication module 211 will send the previously stored first network data packets sequentially or in batches to the second communication module 212.

[0066] In this way, the second device 140 can obtain the network data packets 260 generated by the target application 130 during startup (310), and then analyze, debug or use these data packets for other purposes.

[0067] In some embodiments, a first network data packet is stored in a target message queue 230. A first device 110 retrieves the first network data packet from the target message queue 230. Then, a first communication module 211 forwards the first network data packet retrieved from the target message queue 230 to a second communication module 212 via a point-to-point communication channel 170. In some embodiments, in response to determining that the point-to-point communication channel 170 has been successfully established, a second device 140 receives at least the first network data packet from a first communication module 211 via the point-to-point communication channel 170 using the second communication module 212.

[0068] Figure 4 shows a schematic diagram of an example 400 of a target message queue according to some embodiments of the present disclosure.

[0069] Referring to Figures 2 and 4, during the startup (310) process of the target application 130, the interceptor 150 adds each network data packet 260 (e.g., a first network data packet) intercepted by the target application 130 to the target message queue 230 via a first operation 410. The second communication module 212 can send an instruction 270 to the target message queue 230 after the point-to-point communication channel 170 is successfully established (e.g., as shown in Figure 2, the second communication module 212 is connected to the second communication port 222, thus completing the establishment of the point-to-point communication channel 170 with the first device 110). Upon receiving the instruction 270, the target message queue 230 pushes the retrievable first network data packet 260 to the first communication module 211 via a second operation 420. The first communication module 211 can continuously check whether there is a retrievable first network data packet 260, and when a retrievable first network data packet 260 is available, it retrieves it from the target message queue 230. As an example, the target message queue 230 may be implemented based on a thread-safe blocking queue and use serial tasks to handle enqueue and dequeue operations, thereby ensuring the orderliness of network packets 260.

[0070] In some embodiments, in addition to the first network data packets, the first device 110 also stores the acquired second network data packets 420. The second network data packets 420 include network data packets 260 sent and received by the target application 130 after startup (310) is completed. In response to determining that all the stored first network data packets have been forwarded, the first device 110 forwards the stored second network data packets to the second communication module 212 via the point-to-point communication channel 170 using the first communication module 211. In some embodiments, the second device 140 receives at least the second network data packets from the first communication module 211 via the point-to-point communication channel 170 using the second communication module 212.

[0071] Referring again to Figures 2 and 4, after the target application 130 completes startup (310), the interceptor 150 adds each network data packet 260 (e.g., a second network data packet) intercepted by the interceptor 250 to the target message queue 230 via the first operation 410. As described above, upon receiving instruction 270, the first communication module 211 retrieves the first network data packet from the target message queue 230. Based on the first-in-first-out rule, the first communication module 211 will retrieve the second network data packet after retrieving the first network data packet. Similar to the previous description, the first communication module 211 can continuously check whether there is a retrievable second network data packet in the target message queue 230, and retrieve it from the target message queue 230 when a second network data packet is available.

[0072] In this way, the first communication module 211 can systematically extract the network data packets 260 sent and received by the target application 130 during startup (310) and after startup (310) is completed, and forward the extracted network data packets 260 to the second communication module 222.

[0073] Once the second communication module 222 receives the network data packet 260, the second device 140 performs data analysis on the network data packet 260 for the target application 130. For example, the second device 140 can perform data analysis using the data analysis application 240.

[0074] As can be clearly understood from the various embodiments described above, the embodiments of this disclosure realize direct communication between the first device 110 and the second device 140 for analyzing network data packets 260 through a point-to-point communication channel 170 that supports inter-process communication. This direct communication method eliminates the need for complex IP address configuration, simplifying the operation process. Furthermore, such a point-to-point communication channel 170 ensures security and allows the capture and analysis of network data packets 260 of the target application 130 even when the first device 110 is in a network-free or weak network environment. This makes it possible to analyze the operational status of the target application 130 under network-free or weak network conditions.

[0075] Example process

[0076] Figure 5 shows a flowchart of an example process 500 of a communication method according to some embodiments of the present disclosure. Process 500 can be implemented at a first device 110. Process 500 will now be described with reference to Figure 1.

[0077] In box 510, in response to the launch of a target application installed on the first device 110, the first device 110 collects network data packets sent and received by the target application.

[0078] In some embodiments, in response to determining that a target application is starting up, the first device 110 triggers the collection of network data packets from the target application. The first device 110 stores at least the collected first network data packets, wherein the first network data packets include network data packets sent and received by the target application during startup. After the target application has finished starting up, the first device 110 controls the establishment of a peer-to-peer communication channel. In response to determining that the peer-to-peer communication channel has been successfully established, the first device 110 triggers a first communication module to forward the stored first network data packets to a second communication module via the peer-to-peer communication channel.

[0079] In some embodiments, the first network data packet is stored in a target message queue. The first device 110 retrieves the first network data packet from the target message queue. The first communication module forwards the first network data packet retrieved from the target message queue to the second communication module via a point-to-point communication channel.

[0080] In some embodiments, the first device 110 stores first network data packets and second network data packets collected, wherein the second network data packets include network data packets sent and received by the target application after startup is complete. In response to determining that all stored first network data packets have been forwarded, the first device 110 forwards the stored second network data packets to the second communication module via a point-to-point communication channel using the first communication module.

[0081] In block 520, the first device 110 controls a first communication module located at the first device to establish a point-to-point communication channel with a second communication module located at the second device 140 via a communication component, wherein the point-to-point communication channel supports inter-process communication.

[0082] In some embodiments, in response to determining that the target application has been launched, the first device 110 controls the first communication module to establish a point-to-point communication channel with the second communication module via a communication component.

[0083] In some embodiments, the first device 110 controls the first communication module to listen to the first communication port at the first device 110, wherein the first communication port communicates with the second communication port at the second device 140 via a communication component, and wherein the second communication port is listened to by the second communication module.

[0084] In some embodiments, the communication component includes at least a debug bridge interface.

[0085] In box 530, the first device 110 triggers the first communication module to forward the collected network data packets to the second communication module via a point-to-point communication channel.

[0086] Figure 6 shows a flowchart of an example process 600 of a communication method according to some embodiments of the present disclosure. Process 600 can be implemented at a second device 140. Process 600 will now be described with reference to Figure 1.

[0087] Referring to Figure 6, in block 610, the second device 140 controls a second communication module located on the second device to establish a point-to-point communication channel with a first communication module located on the first device via a communication component, wherein the point-to-point communication channel supports inter-process communication.

[0088] In some embodiments, the second device 140 controls the second communication module to listen to the second communication port at the second device, wherein the second communication port communicates with the first communication port at the first device via a communication component, and wherein the first communication port is listened to by the first communication module.

[0089] In some embodiments, the communication component includes at least a debug bridge interface.

[0090] In box 620, the second device 140 uses the second communication module to receive network data packets from the first communication module via a point-to-point communication channel, wherein the network data packets are sent and received by a target application installed on the first device.

[0091] In some embodiments, in response to determining that a point-to-point communication channel has been successfully established, the second device 140 uses the second communication module to receive at least a first network data packet from the first communication module via the point-to-point communication channel, wherein the first network data packet includes network data packets sent and received during the startup of the target application.

[0092] In some embodiments, the second device 140 uses the second communication module to receive at least a second network data packet from the first communication module via a point-to-point communication channel, wherein the second network data packet includes network data packets sent and received after the target application has finished launching.

[0093] In box 630, the second device 140 performs data analysis on network packets for a target application.

[0094] Example devices and equipment

[0095] Embodiments of this disclosure also provide corresponding apparatus for implementing the methods or processes described above. Figure 7 shows a schematic structural block diagram of a communication apparatus 700 according to some embodiments of this disclosure. The apparatus 700 may be implemented as or included in a first device 110. The various modules / components in the apparatus 700 may be implemented by hardware, software, firmware, or any combination thereof.

[0096] Referring to Figure 7, the device 700 includes a data acquisition module 710, a first control module 720, and a triggering module 730. The data acquisition module 710 is configured to acquire network data packets sent and received by a target application installed on a first device in response to the application's launch. The first control module 720 is configured to control a first communication module located on the first device to establish a point-to-point communication channel with a second communication module located on a second device via a communication component, wherein the point-to-point communication channel supports inter-process communication. The triggering module 730 is configured to trigger the first communication module to forward the acquired network data packets to the second communication module via the point-to-point communication channel.

[0097] In some embodiments, the acquisition module 710 is further configured to: in response to determining that the target application is starting up, trigger the acquisition of network data packets of the target application; and store at least the acquired first network data packets, wherein the first network data packets include network data packets sent and received by the target application during startup. The first control module 720 is further configured to: after the target application has finished starting up, control the establishment of a point-to-point communication channel. The triggering module 730 is further configured to: in response to determining that the point-to-point communication channel has been successfully established, trigger the first communication module to forward the stored first network data packets to the second communication module via the point-to-point communication channel.

[0098] In some embodiments, the first network data packet is stored in a target message queue. The triggering module 730 is further configured to: extract the first network data packet from the target message queue; and forward the first network data packet extracted from the target message queue to the second communication module via a point-to-point communication channel by the first communication module.

[0099] In some embodiments, the acquisition module 710 is further configured to: store the acquired first network data packets and the acquired second network data packets, wherein the second network data packets include network data packets sent and received by the target application after startup is complete. The triggering module 730 is further configured to: in response to determining that all the stored first network data packets have been forwarded, forward the stored second network data packets to the second communication module via a point-to-point communication channel using the first communication module.

[0100] In some embodiments, the first control module 720 is further configured to: in response to determining that the target application has been launched, control the first communication module to establish a point-to-point communication channel with the second communication module via a communication component.

[0101] In some embodiments, the first control module 720 is further configured to: control the first communication module to listen to a first communication port at the first device, wherein the first communication port communicates with a second communication port at the second device via a communication component, and wherein the second communication port is listened to by the second communication module.

[0102] In some embodiments, the communication component includes at least a debug bridge interface.

[0103] Figure 8 shows a schematic structural block diagram of a communication apparatus 800 according to some embodiments of the present disclosure. The apparatus 800 may be implemented as or included in a second device 140. The various modules / components in the apparatus 800 may be implemented by hardware, software, firmware, or any combination thereof.

[0104] Referring to Figure 8, the device 600 includes a second control module 810, a receiving module 820, and a data analysis module 830. The second control module 810 is configured to control a second communication module located in a second device to establish a point-to-point communication channel with a first communication module located in a first device via a communication component, wherein the point-to-point communication channel supports inter-process communication. The receiving module 820 is configured to receive network data packets from the first communication module via the point-to-point communication channel using the second communication module, wherein the network data packets are sent and received by a target application installed in the first device. The data analysis module 830 is configured to perform data analysis on the network data packets for the target application.

[0105] In some embodiments, the receiving module 820 is further configured to: in response to determining the successful establishment of a point-to-point communication channel, receive at least a first network data packet from the first communication module via the point-to-point communication channel using the second communication module, wherein the first network data packet includes network data packets sent and received during the startup process of the target application.

[0106] In some embodiments, the receiving module 820 is further configured to receive at least a second network data packet from the first communication module via a point-to-point communication channel using the second communication module, wherein the second network data packet includes network data packets sent and received after the target application has been launched.

[0107] In some embodiments, the second control module 810 is further configured to: control the second communication module to listen to the second communication port at the second device, wherein the second communication port communicates with the first communication port at the first device via a communication component, and wherein the first communication port is listened to by the first communication module.

[0108] In some embodiments, the communication component includes at least a debug bridge interface.

[0109] Figure 9 shows a block diagram of an electronic device 900 in which one or more embodiments of the present disclosure may be implemented. This electronic device 900 may, for example, be used to implement the first device 110 or the second device 140 shown in Figure 1. It should be understood that the electronic device 900 shown in Figure 9 is merely exemplary and should not constitute any limitation on the functionality and scope of the embodiments described herein.

[0110] Referring to Figure 9, the electronic device 900 is in the form of a general-purpose electronic device. Components of the electronic device 900 may include, but are not limited to, one or more processors or processing units 910, memory 920, storage devices 930, one or more communication units 940, one or more input devices 950, and one or more output devices 960. The processing unit 910 may be a physical or virtual processor and is capable of performing various processes according to programs stored in the memory 920. In a multiprocessor system, multiple processing units execute computer-executable instructions in parallel to improve the parallel processing capability of the electronic device 900.

[0111] Electronic device 900 typically includes multiple computer storage media. Such media can be any available media accessible to electronic device 900, including but not limited to volatile and non-volatile media, removable and non-removable media. Memory 920 can be volatile memory (e.g., registers, cache, random access memory (RAM)), non-volatile memory (e.g., read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory), or some combination thereof. Storage device 930 can be removable or non-removable media and can include machine-readable media, such as flash drives, disks, or any other media capable of storing information and / or data and accessible within electronic device 900.

[0112] Electronic device 900 may further include additional removable / non-removable, volatile / non-volatile storage media. Although not shown in FIG. 9, disk drives for reading from or writing to removable, non-volatile disks (e.g., "floppy disks") and optical disk drives for reading from or writing to removable, non-volatile optical disks may be provided. In these cases, each drive may be connected to a bus (not shown) via one or more data media interfaces. Memory 920 may include computer program product 925 having one or more program modules configured to perform various methods or actions of various embodiments of the present disclosure.

[0113] The communication unit 940 enables communication with other electronic devices via a communication medium. Additionally, the functionality of the components of the electronic device 900 can be implemented using a single computing cluster or multiple computing machines capable of communicating via communication connections. Therefore, the electronic device 900 can operate in a networked environment using logical connections to one or more other servers, network personal computers (PCs), or another network node.

[0114] Input device 950 can be one or more input devices, such as a mouse, keyboard, trackball, etc. Output device 960 can be one or more output devices, such as a monitor, speaker, printer, etc. Electronic device 900 can also communicate with one or more external devices (not shown) via communication unit 940 as needed. These external devices include storage devices, display devices, etc., and can communicate with one or more devices that enable user interaction with electronic device 900, or with any device that enables electronic device 900 to communicate with one or more other electronic devices (e.g., network card, modem, etc.). Such communication can be performed via input / output (I / O) interface (not shown).

[0115] According to an exemplary implementation of this disclosure, a computer-readable storage medium is provided that stores computer-executable instructions thereon, wherein the computer-executable instructions are executed by a processor to implement the methods described above. According to an exemplary implementation of this disclosure, a computer program product is also provided, which is tangibly stored on a non-transitory computer-readable medium and includes computer-executable instructions, which are executed by a processor to implement the methods described above.

[0116] Various aspects of this disclosure are described herein with reference to flowchart illustrations and / or block diagrams of methods, apparatuses, devices, and computer program products implemented according to this disclosure. It should be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer-readable program instructions.

[0117] These computer-readable program instructions can be provided to a processing unit of a general-purpose computer, a special-purpose computer, or other programmable data processing apparatus to produce a machine such that, when executed by the processing unit of the computer or other programmable data processing apparatus, they create means for implementing the functions / actions specified in one or more blocks of the flowchart and / or block diagram. These computer-readable program instructions can also be stored in a computer-readable storage medium that causes a computer, programmable data processing apparatus, and / or other device to operate in a particular manner. Thus, the computer-readable medium storing the instructions comprises an article of manufacture that includes instructions for implementing aspects of the functions / actions specified in one or more blocks of the flowchart and / or block diagram.

[0118] Computer-readable program instructions can be loaded onto a computer, other programmable data processing apparatus, or other device to cause a series of operational steps to be performed on the computer, other programmable data processing apparatus, or other device to produce a computer-implemented process, thereby causing the instructions that execute on the computer, other programmable data processing apparatus, or other device to perform the functions / actions specified in one or more boxes of a flowchart and / or block diagram.

[0119] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this disclosure. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of an instruction, which contains one or more executable instructions for implementing the specified logical function. In some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutive blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, may be implemented using a dedicated hardware-based system that performs the specified function or action, or using a combination of dedicated hardware and computer instructions.

[0120] Various implementations of this disclosure have been described above. The foregoing description is exemplary and not exhaustive, nor is it limited to the disclosed implementations. Many modifications and variations will be apparent to those skilled in the art without departing from the scope and spirit of the described implementations. The terminology used herein is determined to best explain the principles, practical applications, or improvements to technology in the market, or to enable others skilled in the art to understand the various implementations disclosed herein.

Claims

1. A communication method implemented at a first device, the method comprising: In response to the launch of a target application installed on the first device, network data packets sent and received by the target application are collected; The control unit establishes a point-to-point communication channel between a first communication module located in the first device and a second communication module located in the second device via a communication component, wherein the point-to-point communication channel supports inter-process communication. as well as The first communication module is triggered to forward the collected network data packets to the second communication module via the point-to-point communication channel.

2. The method according to claim 1, wherein collecting network data packets sent and received by the target application includes: In response to determining that the target application is executing the startup, the collection of network data packets of the target application is triggered; At least the first network data packet collected is stored, wherein the first network data packet includes network data packets sent and received by the target application during the startup process; and The control of establishing the point-to-point communication channel includes: after the target application has finished launching, controlling the establishment of the point-to-point communication channel; and The triggering of the first communication module to forward the collected network data packets to the second communication module via the point-to-point communication channel includes: in response to determining the successful establishment of the point-to-point communication channel, triggering the first communication module to forward the stored first network data packets to the second communication module via the point-to-point communication channel.

3. The method of claim 2, wherein the first network data packet is stored in a target message queue, and wherein triggering the first communication module to forward the stored first network data packet to the second communication module via the point-to-point communication channel comprises: Extract the first network data packet from the target message queue; The first network data packet extracted from the target message queue is forwarded from the first communication module to the second communication module via the point-to-point communication channel.

4. The method according to claim 2, wherein storing at least the acquired first network data packet comprises: The first network data packet and the second network data packet collected are stored, wherein the second network data packet includes network data packets sent and received by the target application after the startup is completed; and The triggering mechanism for the first communication module to forward the collected network data packets to the second communication module via the point-to-point communication channel includes: In response to determining that all the stored first network data packets have been forwarded, the first communication module forwards the stored second network data packets to the second communication module via the point-to-point communication channel.

5. The method according to claim 1, wherein controlling the establishment of the point-to-point communication channel comprises: In response to determining that the launch of the target application is complete, the first communication module is controlled to establish the point-to-point communication channel with the second communication module via the communication component.

6. The method according to claim 1, wherein controlling the first communication module to establish the point-to-point communication channel with the second communication module via the communication component comprises: The first communication module is controlled to listen to the first communication port of the first device, wherein the first communication port communicates with the second communication port of the second device via the communication component, and wherein the second communication port is listened to by the second communication module.

7. The method of claim 1, wherein the communication component includes at least a debug bridge interface.

8. A communication method implemented at a second device, the method comprising: The control unit establishes a point-to-point communication channel between the second communication module located in the second device and the first communication module located in the first device via a communication component, wherein the point-to-point communication channel supports inter-process communication. The second communication module receives network data packets from the first communication module via the point-to-point communication channel, wherein the network data packets are sent and received by a target application installed on the first device. as well as Perform data analysis on the network data packets for the target application.

9. The method of claim 8, wherein receiving network data packets from the first communication module via the point-to-point communication channel using the second communication module comprises: In response to determining that the peer-to-peer communication channel has been successfully established, the second communication module receives at least a first network data packet from the first communication module via the peer-to-peer communication channel, wherein the first network data packet includes network data packets sent and received during the startup of the target application.

10. The method of claim 8, wherein receiving network data packets from the first communication module via the point-to-point communication channel using the second communication module comprises: The second communication module receives at least a second network data packet from the first communication module via the point-to-point communication channel, wherein the second network data packet includes network data packets sent and received after the target application has been launched.

11. The method of claim 8, wherein controlling the second communication module disposed at the second device to establish a point-to-point communication channel with the first communication module disposed at the first device via a communication component comprises: The second communication module is controlled to listen to the second communication port of the second device, wherein the second communication port communicates with the first communication port of the first device via the communication component, and wherein the first communication port is listened to by the first communication module.

12. The method of claim 8, wherein the communication component includes at least a debug bridge interface.

13. An apparatus for communication, implemented at a first device, the apparatus comprising: The acquisition module is configured to acquire network data packets sent and received by the target application in response to the launch of the target application installed on the first device; The first control module is configured to control a first communication module located at the first device to establish a point-to-point communication channel with a second communication module located at the second device via a communication component, wherein the point-to-point communication channel supports inter-process communication. as well as The triggering module is configured to trigger the first communication module to forward the collected network data packets to the second communication module via the point-to-point communication channel.

14. An apparatus for communication, implemented at a second device, the apparatus comprising: The second control module is configured to control the second communication module located at the second device to establish a point-to-point communication channel with the first communication module located at the first device via a communication component, wherein the point-to-point communication channel supports inter-process communication. The receiving module is configured to receive network data packets from the first communication module via the point-to-point communication channel using the second communication module, wherein the network data packets are sent and received by a target application installed on the first device; as well as The data analysis module is configured to perform data analysis on the network packets for the target application.

15. An electronic device comprising: At least one processing unit; as well as At least one memory coupled to the at least one processing unit and storing instructions for execution by the at least one processing unit, the instructions, when executed by the at least one processing unit, causing the electronic device to perform the method according to any one of claims 1 to 7, or to perform the method according to any one of claims 8 to 12.

16. A computer-readable storage medium having a computer program stored thereon, the computer program being executable by a processor to implement the method according to any one of claims 1 to 7, or to implement the method according to any one of claims 8 to 12.

17. A computer program product comprising computer-executable instructions, wherein the computer-executable instructions, when executed by a processor, implement the method according to any one of claims 1 to 7, or implement the method according to any one of claims 8 to 12.