A device simulation and debugging method and device

By deploying simulated network elements in the user domain and device domain, optimizing signaling interaction and data transmission, the problems of lag and low transmission efficiency in remote device debugging and testing are solved, and efficient remote device debugging and testing are achieved.

CN115987843BActive Publication Date: 2025-07-29ZEBRED NETWORK TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202211605079.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-12-14
Publication Date
2025-07-29
Estimated Expiration
2042-12-14

AI Technical Summary

Technical Problem

During remote device debugging and testing, the forwarding capability and network performance limitations of the transit server lead to problems such as lag and slow data transmission efficiency.

Method used

By deploying user simulation network elements and device simulation network elements in the user domain and device domain respectively, we optimize the signaling interaction process, reduce the number of signaling interactions, avoid the use of transit servers, and accelerate data transmission using Socket forwarding and DMA or zero copy technology.

Benefits of technology

Improve the efficiency of remote device debugging and testing, avoid lags, and ensure efficient and synchronous data transmission.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115987843B_ABST
    Figure CN115987843B_ABST
Patent Text Reader

Abstract

The present application provides a device simulation debugging method and a device, including: receiving instruction information sent from the user domain; wherein, the instruction information is a command prompt for debugging a remote device; sending the instruction information to the remote device located in the device domain, and receiving device feedback information sent by the remote device according to the instruction information; wherein, the device feedback information records the device reception status and the device processing result; the device reception status indicates that the remote device has received the instruction information; the device processing result is the result information generated by the remote device running the instruction information. The present application divides the two signaling interaction processes of the user domain sending the instruction information to the device simulation network element and the device simulation network element sending the instruction information to the remote device into two independent interaction processes, improving the operation efficiency of debugging and testing the remote device and avoiding the occurrence of lags during debugging and / or testing of the remote device.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to communication technologies, and in particular, to a method and device for device simulation debugging. Background Art

[0002] In the R & D and testing stage of software products, after coding is completed, a large amount of debugging and testing work needs to be carried out. And the debugging and testing work needs to be carried out on various hardware devices. How to share and reuse these devices is a problem faced by major companies. To achieve sharing and reuse, it is necessary to cloudify the devices to form a device domain, and the user domain realizes the sharing of remote devices among different users and different time periods through remote use.

[0003] Currently, when the user domain debugs and / or tests a remote device in the device domain, it needs to send instruction information to a relay server set in the device domain for cross-domain communication, and then forward the instruction information to the remote device through the relay server to achieve the effect of debugging and / or testing the remote device through the instruction information; wherein, the user domain is a logical organizational unit where the client for debugging and / or testing the remote device is located.

[0004] However, remotely connecting to a remote device and sending instructions to it for debugging and / or testing can easily lead to low forwarding volume and network speed of the instruction information by the relay server, and / or high latency in sending instruction information to the remote device due to limitations such as the forwarding ability of the relay server itself and the network performance of the communication connection between the relay server and the remote device, resulting in problems such as lag in debugging and / or testing the remote device by the user domain and slow data transmission efficiency. Summary of the Invention

[0005] This application provides a method and device for device simulation debugging to solve the problems of lag and slow data transmission efficiency that occur when currently debugging and / or testing a remote device through a relay server.

[0006] In a first aspect, this application provides a method for device simulation debugging, which is applied to a device simulation network element in a device domain and includes:

[0007] Receiving instruction information sent by the user domain; wherein, the instruction information is a command prompt for debugging a remote device;

[0008] Send the instruction information to a remote device in the device domain and receive device feedback information sent by the remote device according to the instruction information; wherein, the device feedback information records a device reception status and a device processing result; the device reception status indicates that the remote device has received the instruction information; the device processing result is result information generated by the remote device running the instruction information; the device simulation network element includes a simulation server established in the device domain according to remote devices in the device domain.

[0009] In a possible design, after receiving the instruction information sent by the user domain, the method further includes:

[0010] Send a domain reception status to the user domain; wherein, the domain reception status indicates that the device simulation network element has received the instruction information;

[0011] After receiving the device feedback information sent by the remote device according to the instruction information, it further includes:

[0012] Send the device processing result to the user domain.

[0013] In a possible design, the device simulation network element includes a device domain server; receiving the instruction information sent by the user domain includes:

[0014] Receive the instruction information sent by the user domain;

[0015] Send the instruction information to the device domain server;

[0016] Receive server feedback information sent by the device domain server according to the instruction information; wherein, the server feedback information records a server reception status; the server reception status indicates that the device domain server has received the instruction information; the device domain server is a simulation server established in the device domain according to remote devices in the device domain.

[0017] In a possible design, the device simulation network element includes a device domain client; sending the instruction information to a remote device in the device domain and receiving the device feedback information sent by the remote device according to the instruction information includes:

[0018] Receive the instruction information sent by the device domain client;

[0019] Send the instruction information to the remote device;

[0020] Receive the device feedback information sent by the remote device according to the instruction information;

[0021] Send the device processing result to the device domain client according to the device feedback information; wherein, the device domain client is a simulated terminal established in the device domain according to the client.

[0022] In a second aspect, the present application provides a device simulation and debugging method, which is applied in the user domain and includes:

[0023] Send instruction information to a device simulation network element in the device domain; wherein, the instruction information is used to instruct the device simulation network element to send the instruction information to a remote device located in the device domain, and receive device feedback information sent by the remote device according to the instruction information; wherein, the instruction information is a command prompt for debugging the remote device; the device feedback information records the device reception status and the device processing result; the device reception status indicates that the remote device has received the instruction information; the device processing result is the result information generated by the remote device running the instruction information; the device simulation network element includes a simulation server established in the device domain according to the remote device in the device domain.

[0024] In a possible design, the user domain further includes a user simulation network element. Before sending the instruction information to the device simulation network element in the device domain, the method further includes:

[0025] The user simulation network element receives instruction information sent by a client located in the user domain;

[0026] The user simulation network element sends user feedback information to the client according to the instruction information; wherein, the user feedback information records the user reception status and the user processing result; the user reception status indicates that the user simulation network element has received the instruction information; the user processing result is the result information generated by the user simulation network element according to the instruction information; the user simulation network element is a simulation server established in the user domain according to the remote device.

[0027] In a third aspect, the present application provides a device simulation network element, including: a device domain client and a device domain server;

[0028] The device domain client is used to receive instruction information sent by the user domain; wherein, the instruction information is a command prompt for debugging the remote device;

[0029] The device domain server is used to send the instruction information to a remote device located in the device domain and receive device feedback information sent by the remote device according to the instruction information. The device feedback information records a device reception status and a device processing result. The device reception status indicates that the remote device has received the instruction information. The device processing result is the result information generated by the remote device running the instruction information.

[0030] In a possible design, the device domain server is further used to send a domain reception status to the user domain. The domain reception status indicates that the device simulation network element has received the instruction information.

[0031] The device domain server is further used to send the device processing result to the user domain.

[0032] In a possible design, the device domain client includes a first receiving unit and a first sending unit.

[0033] The first receiving unit is used to receive the instruction information sent by the user domain.

[0034] The first sending unit is used to send the instruction information to the device domain server.

[0035] The first receiving unit is further used to receive server feedback information sent by the device domain server according to the instruction information. The server feedback information records a server reception status. The server reception status indicates that the device domain server has received the instruction information.

[0036] In a possible design, the device domain server includes a second receiving unit and a second sending unit.

[0037] The second receiving unit is used to receive the instruction information sent by the device domain client.

[0038] The second sending unit is used to send the instruction information to the remote device.

[0039] The second receiving unit is further used to receive the device feedback information sent by the remote device according to the instruction information.

[0040] The second sending unit is further used to send the device processing result to the device domain client according to the device feedback information.

[0041] In a fourth aspect, the present application provides a user domain, including a user simulation network element.

[0042] The user simulation network element is used to send instruction information to the device simulation network element in the device domain; wherein, the instruction information is used to instruct the device simulation network element to send the instruction information to a remote device located in the device domain and receive device feedback information sent by the remote device according to the instruction information; wherein, the instruction information is a command prompt for debugging the remote device; the device feedback information records the device reception status and the device processing result; the device reception status indicates that the remote device has received the instruction information; the device processing result is the result information generated by the remote device running the instruction information; the device simulation network element includes a simulation server established in the device domain according to the remote device in the device domain.

[0043] In a possible design, the user simulation network element is further used to receive instruction information sent by a client located in the user domain;

[0044] The user simulation network element is further used to send user feedback information to the client according to the instruction information; wherein, the user feedback information records the user reception status and the user processing result; the user reception status indicates that the user simulation network element has received the instruction information; the user processing result is the result information generated by the user simulation network element according to the instruction information.

[0045] In a fifth aspect, the present application provides a device simulation network element, including at least one processing element or chip for implementing the above first aspect.

[0046] In a sixth aspect, the present application provides a computer program product, including program code, which is used to implement the above first aspect when the computer runs the program code.

[0047] In a seventh aspect, the present application provides a computer-readable storage medium, including the program in the sixth aspect.

[0048] In an eighth aspect, the present application provides a user domain, including at least one processing element or chip for implementing the above second aspect.

[0049] In a ninth aspect, the present application provides a computer program product, including program code, which is used to implement the above second aspect when the computer runs the program code.

[0050] In a tenth aspect, the present application provides a computer-readable storage medium, including the program in the ninth aspect.

[0051] In an eleventh aspect, a communication system is provided, which includes: the device simulation network element in the above first aspect or any possible implementation manner thereof; the system further includes: the user domain in the above second aspect or any possible implementation manner thereof.

[0052] A device simulation debugging method and device provided by the present application divide the two signaling interaction processes of sending an instruction message from the user domain to a device simulation network element and sending the instruction message from the device simulation network element to a remote device into two independent interaction processes by receiving the instruction message sent from the user domain, sending the instruction message to the remote device located in the device domain, and receiving the device feedback message sent by the remote device according to the instruction message; eliminate the steps of sending the instruction message to a relay server and forwarding the instruction message through the relay server, so that the user domain only needs to send the instruction message to the device simulation network element without connecting to the remote device, and can realize one-way simulation debugging and testing operations on the remote device, improve the operation efficiency of debugging and testing the remote device, and avoid the occurrence of jamming when debugging and / or testing the remote device.

[0053] At the same time, the device simulation network element only needs to synchronize the instruction message to the remote device to achieve the technical effect of synchronously debugging the remote device. BRIEF DESCRIPTION OF THE DRAWINGS

[0054] Figure 1 FIG. is a schematic diagram of an application scenario provided by an embodiment of the present application;

[0055] Figure 2 FIG. is another schematic diagram of an application scenario provided by an embodiment of the present application;

[0056] Figure 3 is a network architecture block diagram among a client, a relay server and a remote device provided in the prior art;

[0057] Figure 4 FIG. is a signaling diagram of a device simulation debugging method provided by an embodiment of the present application;

[0058] Figure 5 FIG. is a signaling diagram of another device simulation debugging method provided by an embodiment of the present application;

[0059] Figure 6 FIG. is a schematic structural diagram of a device simulation network element provided by an embodiment of the present application;

[0060] Figure 7 FIG. is a schematic structural diagram of a client in the device domain provided by an embodiment of the present application;

[0061] Figure 8 FIG. is a schematic structural diagram of a server in the device domain provided by an embodiment of the present application;

[0062] Figure 9 FIG. is a schematic structural diagram of a user domain provided by an embodiment of the present application;

[0063] Figure 10 A schematic structural diagram of a device simulation network element provided by an embodiment of the present application;

[0064] Figure 11 A schematic structural diagram of a user domain provided by an embodiment of the present application. Detailed implementation manners

[0065] The following explains some terms in the present application to facilitate understanding by those skilled in the art. It should be noted that when the solutions of the embodiments of the present application are applied to a 5G system, or an existing system, or other systems that may appear in the future, the names of the user domain, user simulation network element, device domain, device simulation network element, and remote device may change, but this does not affect the implementation of the solutions of the embodiments of the present application.

[0066] 1) "Multiple" means two or more, and other quantifiers are similar. "And / or" describes the association relationship of associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist simultaneously, and B exists alone. The character " / " generally represents an "or" relationship between the front and back associated objects.

[0067] 2) "Corresponding" can refer to an association relationship or a binding relationship. A corresponding to B means that there is an association relationship or a binding relationship between A and B.

[0068] It should be noted that the nouns or terms involved in the embodiments of the present application can refer to each other and will not be elaborated.

[0069] Figure 1 A schematic diagram of an application scenario provided by an embodiment of the present application.

[0070] As Figure 1 shown, the user domain 01 is connected to the device simulation network element 021 in one or more device domains 02, and the device simulation network element 021 is connected to the remote device 022 in its corresponding device domain 02, thereby completing the device simulation debugging method of the present application.

[0071] Figure 2 Another schematic diagram of an application scenario provided by an embodiment of the present application.

[0072] As Figure 2As shown in the figure, the user domain 01 includes a user simulation network element 011 and a client 012, and the client 012 is connected to the user simulation network element 011; the device simulation network element 021 includes a device domain client 0211 and a device domain server 0212. The user simulation network element 011 is connected to the device domain client 0211 of one or more device simulation network elements 021 in the device domain 02. The device domain client 0211 is connected to the device domain server 0212 in its corresponding device domain 02, and the device domain server 0212 is connected to the remote device 022 in its corresponding device domain 02, thus completing the device simulation debugging method of the present application.

[0073] In the R & D and testing stage of software products, after coding is completed, a large amount of debugging and testing work is required. And the debugging and testing work needs to be carried out on various hardware devices. How to share and reuse these devices is a problem faced by major companies. To achieve sharing and reuse, it is necessary to cloudify the devices and facilitate the sharing of devices among different users and at different time periods through remote use. The main problem solved by the present invention is the slow file transfer speed when debugging using a remote device remotely.

[0074] In the current industry solutions, there are mainly the following ways to solve the problem:

[0075] Install proxy software on the user side and simulate communication with a remote device through the proxy software.

[0076] Modify the source code of the remote device on the user side and the device side to increase the amount of data transferred by the remote device at one time.

[0077] The above methods all require changing the user's environment or usage habits, and there are relatively large problems in terms of generality and compatibility.

[0078] In the current industry solutions, it is necessary to change the user's environment or usage habits, and there are relatively large problems in terms of generality and compatibility.

[0079] The present invention does not require changing any usage habits of users. It only needs to deploy user simulation network elements and device simulation network elements separately in the user domain and the device domain to achieve the effect of improving file transfer speed.

[0080] This solution mainly optimizes the interaction timing of the remote device protocol through proxy forwarding on the premise of not changing the user's usage habits at all, thereby optimizing the transmission bottleneck caused by the large network TTL delay in the case of remote connection.

[0081] First, please refer to Figure 3 , Figure 3 which provides the network architecture among the client, the relay server, and the remote device in the prior art;

[0082] When the device cannot connect to the network, or the network where the device is located is not accessible from the network where the user is located, a solution of using a relay server + remote device connection is generally adopted. In this solution, there are mainly two performance loss points:

[0083] Performance loss brought by the function of the relay server itself (compared with the scenario of connecting through the local USB cable)

[0084] TTL delay between the network where the user is located and the network where the device is located.

[0085] The test data in a project is as follows:

[0086] After testing, it is found that both the adb connect and adb forward functions will reduce the transmission rate. The test results are as follows:

[0087]

[0088] Remark: Test file size: 23669476 bytes

[0089] We analyzed the main reasons for the performance degradation caused by the native ADB solution:

[0090] For a single connection, the remote device protocol is a strict serial interaction protocol. All commands (including data transfer instructions) need to wait for the remote end to reply and confirm before proceeding to the next action. Therefore, the instructions between the client and the relay server, and between the relay server and the remote device all require several reply cycles. Therefore, when the TTL is large, it will have a very large impact on the transmission rate. This is also the most fundamental reason for the slow CONNECT transmission rate of the remote device.

[0091] First, redirect the remote device TCPPORT to the PC connected by the remote device line through the relay server, and then connect through the remote device Connect. This is a PORT bridging using the remote device connection line when the device has no network. The data is transmitted to the TCP module of the remote device through the remote device line, and there are several layers of forwarding in the middle. There is also a certain performance loss compared to directly accessing through the remote device line.

[0092] Regarding the root causes of the above two problems, our solutions are as follows:

[0093] 1. Reduce the number of signaling interactions between the client on the user side and the server on the device side to avoid data transmission problems caused by TTL delay.

[0094] 2. Avoid using the relay server to connect to the device.

[0095] The specific implementation plan is as follows:

[0096] 1. Install a user simulation network element in the network segment where the user is located, and enable the user's client to communicate with the user simulation network element within the local network, so as to avoid the TTL delay of signaling interaction between the user and the real device.

[0097] 2. Install a device simulation network element within the device domain of the remote device, and use the device simulation network element to communicate with the real device to avoid using adb forward for forwarding.

[0098] 3. Optimize the signaling timing and utilize the cache acceleration of Socket forwarding.

[0099] In this application, by enabling the user domain to send command information to the device simulation network element without connecting to the remote device, one-way simulation debugging and testing operations on the remote device can be achieved, improving the operation efficiency of debugging and testing the remote device and avoiding the occurrence of lags during debugging and / or testing of the remote device.

[0100] Figure 4 It is a signaling diagram of a device simulation debugging method provided by an embodiment of this application. As Figure 1 and Figure 4 shown, this method includes:

[0101] S101: The user domain sends command information to the device simulation network element in the device domain; wherein, the command information is used to instruct the device simulation network element to send the command information to the remote device located in the device domain and receive the device feedback information sent by the remote device according to the command information; wherein, the command information is a command prompt for debugging the remote device; the device feedback information records the device reception status and the device processing result; the device reception status indicates that the remote device has received the command information; the device processing result is the result information generated by the remote device running the command information.

[0102] S102: The device simulation network element receives the command information sent by the user domain; wherein, the command information is a command prompt for debugging and / or testing the remote device.

[0103] In this example, by the method of the device simulation network element receiving the command information and sending the command information to the remote device, the two signaling interaction processes of the user domain sending the command information to the device simulation network element and the device simulation network element sending the command information to the remote device are split into two independent interaction processes; therefore, the user domain can achieve one-way simulation debugging and testing operations on the remote device without connecting to the remote device, only by sending command information to the device simulation network element, improving the operation efficiency of debugging and testing the remote device.

[0104] In this embodiment, the instruction information is command-line data for debugging and / or testing a remote device; among them, the CMD command is used as the instruction information. The CMD command is a command prompt. CMD is the abbreviation of command, that is, the command prompt (CMD), which is located in the directory of C:\Windows\System32 and is the "MS-DOS mode" under OS / 2 and Windows-based operating systems (including Windows 2000 and XP, Vista, and Server 2003).

[0105] The user domain is the logical organizational unit where the client is located; the device domain is the logical organizational unit where the remote device is located; a domain is an independent operating unit in a Windows network. To access each other between domains, a trust relationship (i.e., TrustRelation) needs to be established. The trust relationship is the bridge connecting between domains.

[0106] S103: The device simulation network element sends the domain reception status to the user domain; among them, the domain reception status indicates that the device simulation network element has received the instruction information.

[0107] In this example, by sending the domain reception status to the user domain, the domain reception status that the virtual remote device has received the instruction information is sent to the user domain, so that the user domain can perform other status operations according to the domain reception status; among them, other status operations refer to the threads or processes triggered and / or driven by the user domain based on the fact that the remote device has received the instruction information.

[0108] Optionally, after the device simulation network element sends the domain reception status to the user domain, the method further includes:

[0109] The device simulation network element sends the domain processing result to the user domain.

[0110] In this example, to avoid the user domain having to wait for a long time for the device processing result and reduce the occurrence of the user domain debugging and / or testing the remote device, by sending the domain processing result to the user domain after sending the domain reception status to the user domain, the domain processing result generated by the simulated remote device according to the instruction information is sent to the user domain, so that the user domain can perform other result operations according to the domain processing result; among them, other result operations refer to the threads or processes triggered and / or driven by the user domain based on the fact that the remote device has generated the device processing result.

[0111] S104: The device simulation network element sends the instruction information to the remote device located in the device domain.

[0112] S105: Receive the device feedback information sent by the remote device according to the instruction information; wherein, the device feedback information records the device reception status and the device processing result; the device reception status indicates that the remote device has received the instruction information; the device processing result is the result information generated by the remote device running the instruction information; the device simulation network element includes a simulation server established in the device domain according to the remote device in the device domain.

[0113] In this example, since the device simulation network element includes a simulation server established in the device domain according to the remote device, therefore, the device simulation network element only needs to synchronize the instruction information to the remote device to achieve the technical effect of synchronously debugging between the simulation server and the remote device. By receiving the device feedback information sent by the remote device according to the instruction information, the device simulation network element can know that the remote device has received the instruction information and obtain the result information generated by the remote device according to the instruction information. Therefore, there is no limit on the signaling interaction volume in the communication between the device simulation network element and the remote device, greatly improving the forwarding volume and forwarding rate of the instruction information and ensuring the efficiency of synchronously debugging and testing the remote device.

[0114] The remote device is an object for debugging and testing; the device simulation network element is a simulation server established according to the remote device, and its internal code is the same as that of the remote device. Therefore, the user domain can achieve the same debugging effect on the remote device by sending instruction information to the device simulation network element, improving the device debugging and testing efficiency.

[0115] Exemplarily, use the mock test tool to virtualize a device simulation network element in the device domain according to the remote device; wherein, the mock test is a test method in which, during the test, for some objects that are not easy to construct or obtain, a virtual object is created for testing.

[0116] The remote device is an ADB device, where the full name of ADB is Android Debug Bridge, which acts as a debugging bridge. The full name of adb is Android Debug Bridge, and it acts as a debugging bridge. Adb is a tool in the Android SDK. Using this tool, you can directly operate and manage the Android emulator or a real Android device. An ADB device is a computer device operated and / or managed through ADB.

[0117] S106: The device simulation network element sends the device processing result to the user domain.

[0118] In this example, by sending the device processing result to the user domain, the processing result generated by the remote device according to the instruction information sent by the user domain is sent to the user domain, so that the user domain can perform other result operations according to the device processing result; wherein, the other result operations refer to the threads or processes triggered and / or driven by the user domain based on the device processing result generated by the remote device.

[0119] In this embodiment, a device simulation network element is created based on the DMA or zero-copy technology to implement the forwarding of instruction information and device feedback information by the device simulation network element.

[0120] DMA (Direct Memory Access) is an important feature of all modern computers. It allows hardware devices with different speeds to communicate without relying on a large number of interrupt loads of the CPU.

[0121] The zero-copy technology (also known as zero-copy in English) means that when a computer performs an operation, the CPU does not need to first copy data from a certain memory to another specific area. This technology is usually used to save CPU cycles and memory bandwidth when transferring files over a network.

[0122] Exemplarily, the device simulation network element is a computer module generated by software coding techniques (such as mmap+write, sendFile, sendFile+gather, splice, etc.) running on hardware that supports DMA (Direct Memory Access) and SG-DMA (The Scatter-Gather Direct Memory Access).

[0123] In addition, the present application also provides a device simulation debugging method. The device simulation network element includes a device domain server and a device domain client; a user simulation network element exists in the user domain; the client is located in the user domain, and the remote device is located in the device domain.

[0124] Figure 5 For the signaling diagram of a device simulation debugging method provided by an embodiment of the present application, as Figure 2 and Figure 5 shown, the method includes:

[0125] S201: The user simulation network element receives the instruction information sent by the client located in the user domain;

[0126] S202: The user simulation network element sends user feedback information to the client according to the instruction information; wherein, the user feedback information records the user reception status and the user processing result; the user reception status indicates that the user simulation network element has received the instruction information; the user processing result is the result information generated by the user simulation network element according to the instruction information.

[0127] In this example, the user simulation network element is a simulation server established in the user domain according to the remote device, and its internal code is the same as that of the remote device. Therefore, the client can debug the user simulation network element that simulates the remote device in the user domain, and achieve the same debugging effect on the remote device, avoiding communication bottlenecks such as low channel network speed and low forwarded data volume between cross-domain devices. When the client debugs and / or tests the cross-domain remote device through command information, the problem of slow data transmission efficiency for debugging and / or testing the cross-domain communication device caused by the above communication bottleneck will not occur.

[0128] Meanwhile, the user simulation network element sends user feedback information to the client according to the command information, so that the client can perform other status operations and / or other result operations according to the feedback information, without having to wait until the command information is transmitted to the remote device and the device feedback information generated by the remote device according to the command information is received before performing other status operations and / or other result operations. Therefore, the debugging and testing efficiency of the client is improved. Other status operations refer to the threads or processes triggered and / or driven by the client based on the command information received by the remote device, and other result operations refer to the threads or processes triggered and / or driven by the user domain based on the device processing results generated by the remote device.

[0129] Exemplarily, a mock testing tool is used to virtualize a device simulation network element in the user domain according to the remote device; among them, mock testing is a testing method in which, during the testing process, for some objects that are not easy to construct or obtain, a virtual object is created for testing.

[0130] S203: The user simulation network element sends the command information to the device domain client in the device simulation network element in the device domain; among them, the command information is used to instruct the device simulation network element to send the command information to the remote device located in the device domain and receive the device feedback information sent by the remote device according to the command information; among them, the command information is a command prompt for debugging the remote device; the device feedback information records the device reception status and the device processing result; the device reception status indicates that the remote device has received the command information; the device processing result is the result information generated by the remote device running the command information.

[0131] In this example, by sending the command information to the device domain client, the simulation debugging and testing of the remote device for the client in the user domain and the simulation debugging and testing of the client for the remote device in the device domain can be executed correspondingly or even synchronously to ensure that the command information for debugging and testing the client can ultimately affect the remote device.

[0132] S204: The device domain client receives the instruction information sent by the user domain; among them, the instruction information is a command prompt for debugging and / or testing a remote device.

[0133] In this example, the device domain client is a simulated terminal established by the client in the device domain, and its internal code is the same as that of the client. Therefore, through the instruction information sent by the client via the user simulation network element, the device domain client is driven to perform the same operations as the client in the user domain to serve as a terminal for debugging the remote device. The user domain can send instruction information to the user simulation network element to achieve the same debugging effect on the remote device, improving the device debugging and testing efficiency.

[0134] Exemplarily, a mock test tool is used to virtualize a device simulation network element for the remote device in the user domain; among them, mock testing is a testing method in which, during the testing process, for some objects that are not easy to construct or obtain, a virtual object is created for testing.

[0135] S205: The device domain client sends the instruction information to the device domain server.

[0136] In this example, the device domain server is a simulated server built for the remote device in the device domain. Therefore, the device domain client only needs to send the instruction information to the device domain server to achieve the same debugging and testing effects as the client in the user domain on the remote device. Also, since both the device domain server and the device domain client are virtual servers and terminals in the device domain, a large number of signaling can be quickly exchanged between the device domain server and the device domain client.

[0137] Exemplarily, a mock test tool is used to virtualize a device domain server for the remote device in the device domain; among them, mock testing is a testing method in which, during the testing process, for some objects that are not easy to construct or obtain, a virtual object is created for testing.

[0138] S206: The device domain server receives the instruction information sent by the device domain client.

[0139] In this example, by the method of the device domain server receiving the instruction information sent by the device domain client, the technical effect of the simulated server for the remote device receiving the instruction information from the device domain client is achieved, and further the technical effect of the device domain client simulating the operation of the client in the user domain is achieved.

[0140] S207: The device domain client receives the server feedback information sent by the device domain server according to the instruction information; among them, the server feedback information records the server reception status; the server reception status indicates that the device domain server has received the instruction information.

[0141] In this example, the device domain client receives the server feedback information sent by the device domain server according to the instruction information, indicating that the instruction information has been simulated and sent to the remote device. At this time, it is convenient for the device domain client to perform other status operations; among them, other status operations refer to the threads or processes triggered and / or driven by the device domain client based on the remote device receiving the instruction information.

[0142] S208: The device domain server sends the instruction information to the remote device.

[0143] In this example, the device domain server only needs to synchronize the instruction information to the remote device to achieve the technical effect of synchronizing and debugging between the simulation server and the remote device.

[0144] The remote device is the object for debugging and testing; the device domain server is a simulation server established according to the remote device, and its internal code is the same as that of the remote device. Therefore, the user domain can send instruction information to the device domain server to achieve the same debugging effect on the remote device, improving the device debugging and testing efficiency.

[0145] The remote device is an ADB device. Among them, the full name of ADB is Android Debug Bridge, which acts as a debugging bridge. The full name of adb is Android Debug Bridge, and it acts as a debugging bridge. Adb is a tool in the Android SDK. Using this tool, you can directly operate and manage the Android emulator or a real Android device. An ADB device is a computer device operated and / or managed through ADB.

[0146] S209: The device domain server receives the device feedback information sent by the remote device according to the instruction information.

[0147] In this example, by receiving the device feedback information sent by the remote device according to the instruction information, the device domain server can know that the remote device has received the instruction information and obtain the result information generated by the remote device according to the instruction information. Therefore, there is no limit on the signaling interaction volume in the communication between the device domain server and the remote device, greatly improving the forwarding volume and forwarding rate of the instruction information, and ensuring the efficiency of synchronizing debugging and testing of the remote device.

[0148] S210: The device domain server sends the device processing result to the device domain client according to the device feedback information.

[0149] In this example, the device domain server sends the device processing result to the device domain client according to the device feedback information, so that the device domain client serves as a simulation terminal of the client in the simulated user domain, realizing a closed loop for debugging and testing of remote devices, so that the device domain client can synchronize the device processing result to the client in the user domain subsequently.

[0150] In this embodiment, a device simulation network element is created based on the DMA or zero-copy technology to realize the forwarding of instruction information and device feedback information by the device simulation network element. The device domain server and the device domain client are deployed in the device simulation network element. A user simulation network element is created based on the DMA or zero-copy technology to realize the forwarding of instruction information and device feedback information by the user simulation network element.

[0151] DMA (Direct Memory Access) is an important feature of all modern computers. It allows hardware devices with different speeds to communicate without relying on a large number of CPU interrupt loads.

[0152] Zero-copy technology refers to the situation where the CPU does not need to first copy data from a certain memory location to another specific area when the computer performs an operation. This technology is usually used to save CPU cycles and memory bandwidth when transferring files over a network.

[0153] Exemplarily, the device simulation network element and the user simulation network element are computer modules generated by software coding techniques (mmap+write, sendFile, sendFile+gather, splice, etc.) running on hardware that supports DMA (Direct Memory Access) and SG-DMA (The Scatter-Gather Direct Memory Access).

[0154] Figure 6 It is a schematic structural diagram of a device simulation network element provided by an embodiment of the present application. As Figure 6 shown, the device simulation network element includes: a device domain client 61 and a device domain server 62;

[0155] The device domain client 61 is used to receive the instruction information sent by the user domain; wherein, the instruction information is a command prompt for debugging a remote device;

[0156] The device domain server 62 is used to send the instruction information to the remote device located in the device domain and receive the device feedback information sent by the remote device according to the instruction information; wherein, the device feedback information records the device reception status and the device processing result; the device reception status indicates that the remote device has received the instruction information; the device processing result is the result information generated by the remote device running the instruction information.

[0157] Preferably, the device domain server 52 is further configured to send a domain reception status to the user domain; wherein, the domain reception status indicates that the device simulation network element has received the instruction information;

[0158] The device domain server 62 is further configured to send a device processing result to the user domain.

[0159] Preferably, Figure 7 This is a schematic structural diagram of the device domain client provided by an embodiment of the present application.

[0160] As Figure 7 shown, the device domain client 61 includes: a first receiving unit 71 and a first sending unit 72

[0161] The first receiving unit 71 is configured to receive the instruction information sent by the user domain;

[0162] The first sending unit 72 is configured to send the instruction information to the device domain server;

[0163] The first receiving unit 71 is further configured to receive the server feedback information sent by the device domain server according to the instruction information; wherein, the server feedback information records the server reception status; the server reception status indicates that the device domain server has received the instruction information.

[0164] Preferably, Figure 8 This is a schematic structural diagram of the device domain server provided by an embodiment of the present application.

[0165] As Figure 7 shown, the device domain server 62 includes: a second receiving unit 81 and a second sending unit 82;

[0166] The second receiving unit 81 is configured to receive the instruction information sent by the device domain client;

[0167] The second sending unit 82 is configured to send the instruction information to the remote device;

[0168] The second receiving unit 81 is further configured to receive the device feedback information sent by the remote device according to the instruction information;

[0169] The second sending unit 82 is further configured to send a device processing result to the device domain client according to the device feedback information.

[0170] Figure 9 This is a schematic structural diagram of a user domain provided by an embodiment of the present application. As Figure 9 shown, the user domain includes: a user simulation network element 91;

[0171] The user simulation network element 91 is used to send instruction information to the device simulation network element in the device domain. The instruction information is used to instruct the device simulation network element to send the instruction information to a remote device located in the device domain and receive device feedback information sent by the remote device according to the instruction information. The instruction information is a command prompt for debugging the remote device. The device feedback information records the device reception status and the device processing result. The device reception status indicates that the remote device has received the instruction information. The device processing result is the result information generated by the remote device running the instruction information. The device simulation network element includes a simulation server established in the device domain according to the remote device in the device domain.

[0172] Preferably, the user simulation network element 91 is further used to receive instruction information sent by the client 92 located in the user domain.

[0173] The user simulation network element 91 is further used to send user feedback information to the client 92 according to the instruction information. The user feedback information records the user reception status and the user processing result. The user reception status indicates that the user simulation network element 91 has received the instruction information. The user processing result is the result information generated by the user simulation network element 91 according to the instruction information.

[0174] Figure 10 This is a schematic structural diagram of a device simulation network element provided by an embodiment of the present application. As Figure 10 shown, the network device simulation network element can be used to execute Figure 4 , Figure 6 , Figure 7 and Figure 8 the actions or steps of the terminal device in the shown embodiments. The device simulation network element includes: a device domain client 101, a device domain server 102, a communication interface 103, a memory 104, and a processor 105.

[0175] The processor 105 calls the program to execute the operations of the above method embodiments to implement Figure 10 the various units and modules shown. Among them, the processor 105 can also be a controller, Figure 10 which is represented as "controller / processor 105" in

[0176] Further, the device simulation network element may further include a memory 104, which is used to store the program code and data of the device simulation network element. In addition, the device simulation network element may further include a communication interface 103. The communication interface 103 is used to support the communication between the device simulation network element and other network entities and terminal devices.

[0177] The processor 105, such as a central processing unit (CPU), may also be one or more integrated circuits configured to implement the above methods, such as: one or more application-specific integrated circuits, or, one or more microprocessors, or, one or more field programmable gate arrays, etc. The memory 104 may be a single memory or a collective term for multiple storage elements.

[0178] Figure 11 This is a schematic structural diagram of a user domain provided by an embodiment of the present application. As Figure 11 shown, this user domain of the network can be used to execute Figure 5 and Figure 9 the actions or steps of the terminal device in the embodiments shown. This user domain includes: a user simulation network element 111, a communication interface 112, a memory 113, and a processor 114.

[0179] The processor 114 calls this program and executes the operations of the above method embodiments to implement Figure 11 each unit and module shown. Among them, the processor 114 may also be a controller, Figure 11 which is denoted as "controller / processor 114" in

[0180] The user simulation network element 111 is used to support the sending and receiving of information between the user domain and the device simulation network element and the remote device in the above embodiments, and to support radio communication between the user domain and the device simulation network element and the remote device in the above embodiments. The processor 114 executes various functions for communicating with the user simulation network element 111, the communication interface 112, and the memory 113.

[0181] Further, the user domain may further include a memory 113, which is used to store the program code and data of the user domain. In addition, the user domain may further include a communication interface 112. The communication interface 112 is used to support the communication between the user domain and other network entities and terminal devices.

[0182] An embodiment of the present application provides a communication system, which includes Figure 10 the provided device simulation network element, Figure 11 the provided user domain.

[0183] An embodiment of the present application provides a computer-readable storage medium, including instructions or a program, which, when running on a computer, causes the computer to execute the above Figure 4 steps of the user domain and the device simulation network element.

[0184] An embodiment of the present application provides a computer-readable storage medium, including instructions or a program, which, when running on a computer, causes the computer to execute the above Figure 5 steps of the user simulation network element, the device domain client, and the device domain server.

[0185] An embodiment of the present application provides a computer program product, including program code, which, when the computer runs the program code, is used to execute the above Figure 4 steps of the device simulation network element in the shown embodiment.

[0186] An embodiment of the present application provides a computer program product, including program code, which, when the computer runs the program code, is used to execute the above Figure 5 steps of the device domain client and the device domain server in the device simulation network element in the shown embodiment.

[0187] An embodiment of the present application provides a computer program product, including program code, which, when the computer runs the program code, is used to execute the above Figure 5 steps of the user simulation network element in the shown embodiment.

[0188] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the processes or functions according to the embodiments of the present application are generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center by wire (such as coaxial cable, optical fiber, digital subscriber line (DSL)) or wirelessly (such as infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server or data center that includes one or more available media integrated. The available medium can be a magnetic medium (such as a floppy disk, hard disk, magnetic tape), an optical medium (such as a DVD), or a semiconductor medium (such as a solid state disk (SSD)), etc.

[0189] Those skilled in the art should be able to realize that in the above one or more examples, the functions described in the embodiments of the present application can be implemented by hardware, software, firmware, or any combination thereof. When implemented using software, these functions can be stored in a computer-readable medium or transmitted as one or more instructions or codes on a computer-readable medium. The computer-readable medium includes computer storage media and communication media, where the communication media includes any medium that facilitates the transmission of a computer program from one place to another. The storage media can be any available medium that can be accessed by a general-purpose or special-purpose computer.

[0190] The above are only the specific implementation manners of the present invention, but the protection scope of the present invention is not limited thereto. Any person skilled in the art can easily think of changes or substitutions within the technical scope disclosed by the present invention, and all of them should be covered by the protection scope of the present invention. Therefore, the protection scope of the present invention should be subject to the protection scope of the claims.

Claims

1. A device simulation and debugging method, characterized in that The method is applied to a device simulation network element in a device domain, and includes: Receiving instruction information sent by a user domain; wherein, the user domain includes a user simulation network element and a client, the user simulation network element is a simulation server established in the user domain according to a remote device, the code inside the user simulation network element is the same as the code of the remote device, and the instruction information is a command prompt for debugging the remote device; Sending the instruction information to the remote device located in the device domain, and receiving device feedback information sent by the remote device according to the instruction information; wherein, the device feedback information records a device reception status and a device processing result; the device reception status indicates that the remote device has received the instruction information; the device processing result is result information generated by the remote device running the instruction information; the device simulation network element includes a simulation server established in the device domain according to the remote device in the device domain; Sending the device processing result to the user domain, so that the user domain performs other result operations according to the device processing result, wherein the other result operations refer to threads or processes triggered and / or driven by the user domain based on the device processing result generated by the remote device.

2. The device simulation and debugging method according to claim 1, wherein After receiving the instruction information sent by the user domain, the method further includes: Sending a domain reception status to the user domain; wherein, the domain reception status indicates that the device simulation network element has received the instruction information.

3. The device simulation and debugging method according to claim 1, wherein The device simulation network element includes a device domain server; receiving the instruction information sent by the user domain includes: Receiving the instruction information sent by the user domain; Sending the instruction information to the device domain server; Receiving server-side feedback information sent by the device domain server according to the instruction information; wherein, the server-side feedback information records a server-side reception status; the server-side reception status indicates that the device domain server has received the instruction information; the device domain server is a simulation server established in the device domain according to the remote device in the device domain, and the code of the device domain server is the same as the code of the remote device.

4. The device simulation and debugging method according to claim 1, characterized in that The device simulation network element includes a device domain client; sending the instruction information to the remote device located in the device domain, and receiving the device feedback information sent by the remote device according to the instruction information includes: Receiving the instruction information sent by the device domain client; Sending the instruction information to the remote device; Receiving the device feedback information sent by the remote device according to the instruction information; Sending the device processing result to the device domain client according to the device feedback information; wherein, the device domain client is a simulation terminal established in the device domain according to the client.

5. A device simulation and debugging method, characterized in that, The method is applied to the user domain and includes: Send the instruction information to the device simulation network element in the device domain; wherein, the instruction information is used to instruct the device simulation network element to send the instruction information to a remote device located in the device domain and receive device feedback information sent by the remote device according to the instruction information; wherein, the user domain includes a user simulation network element and a client, the user simulation network element is a simulation server established in the user domain according to the remote device, the code inside the user simulation network element is the same as the code of the remote device, and the instruction information is a command prompt for debugging the remote device; the device feedback information records the device reception status and the device processing result; the device reception status indicates that the remote device has received the instruction information; the device processing result is the result information generated by the remote device running the instruction information; the device simulation network element includes a simulation server established in the device domain according to the remote device in the device domain. Receive the device processing result sent by the device simulation network element and perform other result operations according to the device processing result, wherein the other result operations refer to threads or processes triggered and / or driven by the user domain based on the device processing result generated by the remote device.

6. The device simulation and debugging method according to claim 5, wherein The user domain further includes a user simulation network element. Before sending the instruction information to the device simulation network element in the device domain, the method further includes: The user simulation network element receives the instruction information sent by the client located in the user domain. The user simulation network element sends user feedback information to the client according to the instruction information; wherein, the user feedback information records the user reception status and the user processing result; the user reception status indicates that the user simulation network element has received the instruction information; the user processing result is the result information generated by the user simulation network element according to the instruction information; the user simulation network element is a simulation server established in the user domain according to the remote device.

7. A device simulation network element, characterized in that, Includes: Device domain client and device domain server; The device domain client is used to receive the instruction information sent by the user domain; wherein, the instruction information is a command prompt for debugging the remote device. The device domain server is used to send the instruction information to the remote device located in the device domain, receive the device feedback information sent by the remote device according to the instruction information, and send the device feedback information to the device domain client; wherein, the device feedback information records the device reception status and the device processing result; the device reception status indicates that the remote device has received the instruction information; the device processing result is the result information generated by the remote device running the instruction information, and the code of the device domain server is the same as the code of the remote device. The device domain server is further used to send the device processing result to the user domain so that the user domain performs other result operations according to the device processing result, wherein the other result operations refer to threads or processes triggered and / or driven by the user domain based on the device processing result generated by the remote device.

8. The device simulation network element according to claim 7, wherein The device domain server is further configured to send a domain reception status to the user domain; wherein, the domain reception status indicates that the device simulation network element has received the instruction information.

9. The device simulation network element according to claim 7, wherein The device domain client includes: a first reception unit and a first transmission unit The first reception unit is configured to receive the instruction information sent by the user domain; The first transmission unit is configured to send the instruction information to the device domain server; The first reception unit is further configured to receive the server feedback information sent by the device domain server according to the instruction information; wherein, the server feedback information records a server reception status; the server reception status indicates that the device domain server has received the instruction information.

10. The device simulation network element according to claim 7, characterized in that, The device domain server includes: a second reception unit and a second transmission unit; The second reception unit is configured to receive the instruction information sent by the device domain client; The second transmission unit is configured to send the instruction information to the remote device; The second reception unit is further configured to receive the device feedback information sent by the remote device according to the instruction information; The second transmission unit is further configured to send the device processing result to the device domain client according to the device feedback information.

11. A user domain, characterized in that, Comprising: A user simulation network element and a client; The user simulation network element is configured to send instruction information to a device simulation network element in the device domain; wherein, the instruction information is used to instruct the device simulation network element to send the instruction information to a remote device located in the device domain, and receive the device feedback information sent by the remote device according to the instruction information; wherein, the instruction information is a command prompt for debugging the remote device; the device feedback information records a device reception status and a device processing result; the device reception status indicates that the remote device has received the instruction information; the device processing result is result information generated by the remote device running the instruction information; the device simulation network element includes a simulation server established in the device domain according to the remote device in the device domain, the user simulation network element is a simulation server established in the user domain according to the remote device, and the code inside the user simulation network element is the same as the code of the remote device; The user simulation network element is further configured to receive the device processing result sent by the device simulation network element, and perform other result operations according to the device processing result, wherein, the other result operations refer to threads or processes triggered and / or driven by the user domain based on the device processing result generated by the remote device.

12. The user domain according to claim 11, wherein The user simulation network element is further configured to receive the instruction information sent by the client located in the user domain; The user simulation network element is further configured to send user feedback information to the client according to the instruction information; wherein, the user feedback information records a user reception status and a user processing result; the user reception status indicates that the user simulation network element has received the instruction information; the user processing result is result information generated by the user simulation network element according to the instruction information.

Citation Information

Patent Citations

  • Automated testing method and device based on user interface and equipment

    CN112732576A