Disclosure of Invention
The application provides a device simulation debugging method and device, which are used for solving the problems of blocking and low data transmission efficiency when remote devices are debugged and/or tested through a transit server.
In a first aspect, the present application provides a device simulation debugging method, where 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 instruction information is a command prompt for debugging remote equipment;
The method comprises the steps of sending instruction information to remote equipment located in an equipment domain, and receiving equipment feedback information sent by the remote equipment according to the instruction information, wherein the equipment feedback information records equipment receiving state and equipment processing results, the equipment receiving state represents that the remote equipment has received the instruction information, the equipment processing results are result information generated by the remote equipment running the instruction information, and the equipment simulation network element comprises a simulation server built in the equipment domain according to remote equipment in the equipment domain.
In one possible design, after the receiving the instruction information sent by the user domain, the method further includes:
Transmitting a domain receiving state to the user domain, wherein the domain receiving state characterizes that the equipment simulation network element has received the instruction information;
After receiving the device feedback information sent by the remote device according to the instruction information, the method further comprises the following steps:
And sending the device processing result to the user domain.
In one possible design, the device simulation network element includes a device domain server, and the receiving instruction information sent by the user domain includes:
receiving instruction information sent by the user domain;
The instruction information is sent to a device domain server;
The equipment domain server receives the server feedback information sent by the equipment domain server according to the instruction information, wherein the server feedback information records a server receiving state, the server receiving state represents that the equipment domain server has received the instruction information, and the equipment domain server is an analog server established in an equipment domain according to remote equipment in the equipment domain.
In one possible design, the device simulation network element includes a device domain client, the sending the instruction information to a remote device located in the device domain, and receiving device feedback information sent by the remote device according to the instruction information, including:
Receiving instruction information sent by the equipment domain client;
transmitting the instruction information to the remote device;
receiving the equipment feedback information sent by the remote equipment according to the instruction information;
And 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 a device domain according to the client.
In a second aspect, the present application provides a device simulation debugging method, where the method is applied to a user domain, and includes:
the method comprises the steps of sending instruction information to a device simulation network element in a device domain, wherein the instruction information is used for instructing the device simulation network element to send the instruction information to remote devices in the device domain and receiving device feedback information sent by the remote devices according to the instruction information, the instruction information is a command prompt for debugging the remote devices, the device feedback information records a device receiving state and a device processing result, the device receiving state represents that the remote devices have received the instruction information, the device processing result is result information generated by the remote devices running the instruction information, and the device simulation network element comprises a simulation server built in the device domain according to the remote devices in the device domain.
In one possible design, the user domain further includes a user emulation network element, and before the instruction information is sent to the device emulation network element in the device domain, the method further includes:
The user simulation network element receives instruction information sent by a client side positioned 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 a user receiving state and a user processing result, the user receiving state represents 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, and the user simulation network element is a simulation server established in the user domain according to remote equipment.
In a third aspect, the present application provides an equipment simulation network element, including an equipment domain client and an equipment domain server;
The device domain client is used for receiving instruction information sent by a user domain, wherein the instruction information is a command prompt for debugging remote equipment;
The equipment domain service end is used for sending the instruction information to remote equipment located in the equipment domain and receiving equipment feedback information sent by the remote equipment according to the instruction information, wherein the equipment feedback information records equipment receiving states and equipment processing results, the equipment receiving states represent that the remote equipment has received the instruction information, and the equipment processing results are result information generated by the remote equipment running the instruction information.
In one possible design, the device domain server is further configured to send a domain receipt status to the user domain, where the domain receipt status characterizes that the device emulation network element has received the instruction information;
the device domain server is further configured to send the device processing result to the user domain.
In one possible design, the device domain client includes a first receiving unit and a first transmitting unit;
The first receiving unit is used for receiving instruction information sent by the user domain;
the first sending unit is used for sending the instruction information to a device domain server;
The first receiving unit is further configured to receive server feedback information sent by the device domain server according to the instruction information, where the server feedback information records a server receiving state, and the server receiving state characterizes that the device domain server has received the instruction information.
In one possible design, the device domain server includes a second receiving unit and a second sending unit;
the second receiving unit is used for receiving instruction information sent by the equipment domain client;
The second sending unit is used for sending the instruction information to the remote equipment;
The second receiving unit is further configured to receive the device feedback information sent by the remote device according to the instruction information;
The second sending unit is further configured to send the device processing result to the device domain client according to the device feedback information.
In a fourth aspect, the present application provides a user domain comprising a user-emulated network element;
The user simulation network element is used for sending instruction information to a device simulation network element in a device domain, wherein the instruction information is used for instructing the device simulation network element to send the instruction information to remote devices in the device domain and receiving device feedback information sent by the remote devices according to the instruction information, the instruction information is a command prompt for debugging the remote devices, the device feedback information records a device receiving state and a device processing result, the device receiving state represents that the remote devices have received the instruction information, the device processing result is result information generated by the remote devices running the instruction information, and the device simulation network element comprises a simulation server built in the device domain according to the remote devices in the device domain.
In one possible design, the user simulation network element is further configured to receive instruction information sent by a client located in the user domain;
The user simulation network element is further used for sending user feedback information to the client according to the instruction information, wherein the user feedback information records a user receiving state and a user processing result, the user receiving state represents that the user simulation network element has received the instruction information, and the user processing result is result information generated by the user simulation network element according to the instruction information.
In a fifth aspect, the present application provides a device emulation network element comprising at least one processing element or chip for performing the above implementations of the first aspect.
In a sixth aspect, the present application provides a computer program product comprising program code for performing the implementation of the above first aspect when the computer runs the program code.
In a seventh aspect, the present application provides a computer-readable storage medium including a sixth program.
In an eighth aspect, the present application provides a user domain comprising at least one processing element or chip for performing the implementation of the above second aspect.
In a ninth aspect, the application provides a computer program product comprising program code for performing the implementation of the above second aspect when the program code is run by the computer.
In a tenth aspect, the present application provides a computer-readable storage medium including the program of the ninth aspect.
In an eleventh aspect, a communication system is provided, the system comprising the device emulation network element of the first aspect or any possible implementation thereof, and the system further comprising the user domain of the second aspect or any possible implementation thereof.
According to the equipment simulation debugging method and equipment, the user domain sends the instruction information to the remote equipment located in the equipment domain by receiving the instruction information sent by the user domain, and receives the equipment feedback information sent by the remote equipment according to the instruction information, the user domain sends the instruction information to the equipment simulation network element, and the equipment simulation network element sends the instruction information to two signaling interaction processes of the remote equipment, so that the two independent interaction processes which are independent of each other are divided, the step of sending the instruction information to the transit server is eliminated, and the step of forwarding the instruction information through the transit server is eliminated, so that the user domain can realize unidirectional simulation debugging and testing operation of the remote equipment without connecting the remote equipment only by sending the instruction information to the equipment simulation network element, the debugging and testing operation efficiency of the remote equipment is improved, and the occurrence of a clamping situation of the remote equipment is avoided.
Meanwhile, the equipment simulation network element can realize the technical effect of synchronously debugging the remote equipment only by synchronizing instruction information with the remote equipment.
Detailed Description
Some terms used in the present application are explained below to facilitate understanding by those skilled in the art. It should be noted that, when the solution of the embodiment of the present application is applied to a 5G system, or an existing system, or other systems that may occur in the future, names of a user domain, a user analog network element, a device domain, a device analog network element, and a remote device may change, but this does not affect implementation of the solution of the embodiment of the present application.
1) "Plurality" means two or more, and the like. "and/or" describes an association relationship of an association object, and indicates that there may be three relationships, for example, a and/or B, and may indicate that there are three cases of a alone, a and B together, and B alone. The character "/" generally indicates that the context-dependent object is an "or" relationship.
2) The "corresponding" may refer to an association or binding relationship, and the correspondence between a and B refers to an association or binding relationship between a and B.
It should be noted that, the terms or terms related to the embodiments of the present application may be referred to each other, and are not repeated.
Fig. 1 is a schematic diagram of an application scenario provided in an embodiment of the present application.
As shown in fig. 1, a user domain 01 is connected with a device simulation network element 021 in one or more device domains 02, and the device simulation network element 021 is connected with a remote device 022 in the device domain 02 where the device simulation network element 021 is located, so as to complete the device simulation debugging method of the present application.
Fig. 2 is a schematic diagram of another application scenario provided in an embodiment of the present application.
As shown in fig. 2, the user domain 01 includes a user simulation network element 011 and a client 012, the client 012 is connected with 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 with the device domain client 0211 of the device simulation network element 021 in one or more device domains 02, the device domain client 0211 is connected with the device domain server 0212 in the device domain 02 where the device domain client 0211 is located, and the device domain server 0212 is connected with a remote device 022 in the device domain 02 where the device domain server 2 is located, so as to complete the device simulation debugging method of the application.
In the development and test stage of the software product, a great deal of debugging and testing work is required after the coding is finished. Whereas debugging and testing work needs to be done on a wide variety of hardware devices. If these devices are shared and multiplexed, this is a problem faced by large companies. To share and multiplex, the equipment needs to be clouded, and the equipment can be conveniently shared among different users and different time periods in a remote use mode. The invention mainly solves the problem of low file transmission speed when remote equipment is used for debugging.
In the current industry solutions, there are mainly the following solutions to the problems:
And installing proxy software at the user side, and simulating remote equipment to communicate in a proxy software mode.
The source codes of the remote devices at the user side and the device side are modified, and the data volume of single transmission of the remote devices is increased.
The above methods all need to change the environment or the use habit of the user, and have great problems in terms of universality and compatibility.
In the current industry solutions, there are great problems in terms of versatility and compatibility in that the environment or usage habits of users need to be changed.
The invention does not need to change any use habit of the user, and only needs to deploy the user simulation network element and the equipment simulation network element in the user domain and the equipment domain respectively/independently so as to achieve the effect of improving the file transmission speed.
The scheme mainly optimizes the interaction time sequence of the remote equipment protocol in a proxy forwarding mode on the premise of not changing the use habit of a user, thereby optimizing the transmission bottleneck caused by large network TTL delay under the condition of remote connection.
First, referring to fig. 3, fig. 3 provides a network architecture between a client, a transit server and a remote device provided in the prior art;
when the device cannot connect to the network or the network where the device is located is not connected to the network where the user is located, a scheme of transferring the connection between the server and the remote device is generally adopted, and in the scheme, 2 performance loss points mainly exist:
performance loss by the transit server function itself (compare with the scenario of local USB connection)
The TTL delay between the network where the user is located to the network where the device is located.
The test data in one item are as follows:
Tests show that both the adb connect and adb forward functions reduce the transmission rate. The test results were as follows:
Remarks test File size 23669476bytes
We analyzed the main cause of performance degradation for ADB native protocols:
For a single connection, the remote device protocol is a strict serial interaction protocol, and all commands (including data transmission instructions) need to wait for the remote end to reply for confirmation and then to perform the next action. Therefore, the instructions between the client and the transfer server, and between the transfer server and the remote device all require several reply cycles, so when the TTL is large, the transmission rate will be greatly affected. This is also the most fundamental reason for the slow transmission rate of the remote device CONNECT.
The remote device TCPPORT is redirected to the PC connected with the remote device line through the transfer server, and then connected through the remote device Connect, so that the data is transmitted to the TCP module of the remote device through the remote device line by using one PORT bridging by using the remote device connecting line under the condition that the device has no network, a plurality of layers of forwarding exist in the middle, and certain loss exists in performance compared with direct access through the remote device line.
For the root cause of the two problems above, our solution is as follows:
1. the signaling interaction times of the client side of the user side and the server side of the equipment side are reduced, and the data transmission problem caused by TTL delay is avoided.
2. The connection of devices using the transit server is avoided.
The specific embodiment is as follows:
1. And installing a user simulation network element in a network section where the user is located, so that the client of the user is communicated with the user simulation network element in the local network, and TTL delay of signaling interaction between the user and real equipment is avoided.
2. And installing a device simulation network element in the device domain of the remote device, and communicating with the real device by using the device simulation network element, so as to avoid using an adb forward forwarding.
3. Optimizing signaling time sequence, and accelerating by utilizing buffer forwarded by Socket.
According to the application, the user domain does not need to be connected with the remote equipment, and only needs to send instruction information to the equipment simulation network element, so that unidirectional simulation debugging and testing operation of the remote equipment can be realized, the operation efficiency of debugging and testing the remote equipment is improved, and the occurrence of the condition that the remote equipment is blocked during debugging and/or testing is avoided.
Fig. 4 is a signaling diagram of a device simulation debugging method according to an embodiment of the present application, as shown in fig. 1 and fig. 4, where the method includes:
The method comprises the steps of S101, a user domain sends instruction information to a device simulation network element in a device domain, wherein the instruction information is used for instructing the device simulation network element to send the instruction information to a remote device in the device domain and receiving 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 a device receiving state and a device processing result, the device receiving state represents that the remote device has received the instruction information, and the device processing result is result information generated by the remote device running instruction information.
And S102, the equipment simulation network element receives instruction information sent by a user domain, wherein the instruction information is a command prompt for debugging and/or testing the remote equipment.
In the embodiment, the user domain is used for transmitting the command information to the equipment simulation network element and transmitting the command information to the remote equipment by receiving the command information from the equipment simulation network element and dividing the command information to two signaling interaction processes of the remote equipment by the equipment simulation network element into two independent interaction processes which are independent of each other, so that the user domain can realize unidirectional simulation debugging and testing operation of the remote equipment by only transmitting the command information to the equipment simulation network element without connecting the remote equipment, and the debugging and testing operation efficiency of the remote equipment is improved.
In this embodiment, the command information is command line data for debugging and/or testing the remote device, wherein a CMD command is used as the command information, the CMD command is a command indicator, and CMD is an abbreviation of command, namely command indicator (CMD), and is located under the directory of C: \windows\system32, and is in "MS-DOS mode" under an OS/2, win-based operating System (including Windows2000 and XP, vista, and Server 2003).
The user Domain is a logical organization unit where the client is located, the device Domain is a logical organization unit where the remote device is located, the Domain (Domain) is an independently operated unit in the Windows network, and trust relationship (TrustRelation) needs to be established when the domains access each other. A trust relationship is a bridge that connects from domain to domain.
And S103, the equipment simulation network element transmits a domain receiving state to the user domain, wherein the domain receiving state characterizes that the equipment simulation network element has received instruction information.
In this example, the domain receiving state of the instruction information received by the virtual remote device is sent to the user domain by sending the domain receiving state to the user domain, so that the user domain can execute other state operations according to the domain receiving state, where the other state operations are threads or processes triggered and/or driven by the user domain based on the instruction information received by the remote device.
Optionally, after the device simulation network element sends the domain receiving state to the user domain, the method further includes:
the device simulation network element sends domain processing results to the user domain.
In this example, in order to avoid that the user domain needs to wait for the device processing result for a long time, the situation that the user domain debugs and/or tests the remote device is reduced, the domain processing result generated by simulating the remote device according to the instruction information is sent to the user domain by sending the domain processing result to the user domain after sending the domain receiving state to the user domain, so that the user domain executes other result operations according to the domain processing result, where 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.
And S104, the device simulation network element transmits instruction information to a remote device in the device domain.
S105, receiving equipment feedback information sent by the remote equipment according to the instruction information, wherein the equipment feedback information records equipment receiving state and equipment processing result, the equipment receiving state represents that the remote equipment has received the instruction information, the equipment processing result is result information generated by the remote equipment operation instruction information, and the equipment simulation network element comprises a simulation server established in an equipment domain according to the remote equipment in the equipment domain.
In this example, since the device simulation network element includes the simulation server established in the device domain according to the remote device, the device simulation network element can achieve the technical effect of performing synchronous debugging between the simulation server and the remote device only by synchronizing instruction information with the remote device. The equipment simulation network element can acquire the instruction information received by the remote equipment and obtain the result information generated by the remote equipment according to the instruction information by receiving the equipment feedback information sent by the remote equipment according to the instruction information, so that the communication between the equipment simulation network element and the remote equipment is not limited by the signaling interaction amount, the forwarding amount and the forwarding rate of the instruction information are greatly improved, and the efficiency of synchronous debugging and testing of the remote equipment is ensured.
The equipment simulation network element is a simulation server established according to the remote equipment, and the internal code of the equipment simulation network element is consistent with that of the remote equipment, so that a user domain can realize the same debugging effect on the remote equipment by sending instruction information to the equipment simulation network element, and the equipment debugging and testing efficiency is improved.
A device simulation network element is virtually developed in a device domain according to a remote device by using a mock test tool, wherein a mock test is a test method for creating a virtual object for testing for objects which are not easy to construct or easy to obtain in a test process.
The remote device is an ADB device, where ADB is called AndroidDebugBridge, which is the function of a debug bridge. The full name of adb is Android debug bridge, which acts as a debug bridge. Adb is a tool in AndroidSDK with which an Android simulator or real Android devices can be directly operated and managed. The ADB device is a computer device that operates and/or manages through the ADB.
And S106, the equipment simulation network element sends the equipment processing result to the user domain.
In the embodiment, the processing result generated by the remote device according to the instruction information sent by the user domain is sent to the user domain by sending the device processing result to the user domain, so that the user domain can execute 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.
In this embodiment, the device simulation network element is created based on the DMA or zero copy technology, so as to implement the forwarding instruction information and the device feedback information of the device simulation network element.
DMA (direct memory access) is an important feature of all modern computers, which allows hardware devices of different speeds to communicate without relying on a significant interrupt load of the CPU.
Zero copy (english: zero-copy; also Zero copy) techniques refer to computer operations in which the CPU does not need to copy data from some memory to another specific area first. This technique is typically used to save CPU cycles and memory bandwidth when transmitting files over a network.
Illustratively, the device emulation network element is a computer module that runs on hardware supporting DMA (DirectMemoryAccess) and SG-DMA (THESCATTER-GatherDirectMemoryAccess), generated by software coding techniques (mmap+write, sendFile, sendFile +gather, splice, etc.).
In addition, the application also provides a device simulation debugging method, wherein the device simulation network element comprises a device domain server and a device domain client, the user domain is provided with the user simulation network element, the client is positioned in the user domain, and the remote device is positioned in the device domain.
Fig. 5 is a signaling diagram of a device simulation debugging method according to an embodiment of the present application, as shown in fig. 2 and fig. 5, where the method includes:
S201, a user simulation network element receives instruction information sent by a client side positioned in a user domain;
S202, a user simulation network element sends user feedback information to a client according to instruction information, wherein the user feedback information records a user receiving state and a user processing result, the user receiving state represents that the user simulation network element has received the instruction information, and the user processing result is result information generated by the user simulation network element according to the instruction information.
In this example, the user simulation network element is a simulation server built in the user domain according to the remote device, and the internal code of the user simulation network element is consistent with that of the remote device, so that the client can debug the user simulation network element of the simulation remote device in the user domain, the same debugging effect on the remote device can be achieved, and the problem that the data transmission efficiency of debugging and/or testing the cross-domain communication device is slow due to the communication bottleneck when the client debugs and/or tests the cross-domain remote device through instruction information due to the communication bottleneck is avoided.
Meanwhile, the user simulation network element sends user feedback information to the client according to the instruction information, so that the client can execute other state operations and/or other result operations according to the feedback information, the client can execute other state operations and/or other result operations without waiting until the instruction information is transmitted to the remote device and receiving device feedback information generated by the remote device according to the instruction information, and therefore debugging and testing efficiency of the client are improved, the other state operations refer to threads or processes triggered and/or driven by the client based on the instruction information received by the remote device, and 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.
A device simulation network element is virtually created in a user domain according to a remote device by using a mock test tool, wherein a mock test is a test method for creating a virtual object for testing for objects which are not easy to construct or easy to obtain in the test process.
The method comprises the steps of S203, a user simulation network element sends instruction information to a device domain client in a device simulation network element in a device domain, wherein the instruction information is used for instructing the device simulation network element to send the instruction information to a remote device located in the device domain and receiving 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 a device receiving state and a device processing result, the device receiving state represents that the remote device has received the instruction information, and the device processing result is result information generated by the remote device operation instruction information.
In this example, by sending the instruction information to the device domain client, the remote device simulation debugging and testing for the client in the user domain is realized, and the client simulation debugging and testing for the remote device in the device domain can be correspondingly and even synchronously executed, so as to ensure that the instruction information of the debugging and testing of the client can finally affect the remote device.
And S204, the device domain client receives instruction information sent by the user domain, wherein the instruction information is a command prompt for debugging and/or testing the remote device.
In this example, the device domain client is a simulation terminal built in the device domain according to the client, and the code in the device domain client is consistent with the client, so that the device domain client is driven to execute an operation consistent with the client of the user domain through instruction information sent by the client through the user simulation network element, so as to be used as a terminal for debugging the remote device, and the user domain can realize the effect of performing the same debugging on the remote device through sending the instruction information to the user simulation network element, thereby improving the device debugging and testing efficiency.
A device simulation network element is virtually created in a user domain according to a remote device by using a mock test tool, wherein a mock test is a test method for creating a virtual object for testing for objects which are not easy to construct or easy to obtain in the test process.
And S205, the equipment domain client transmits instruction information to the equipment domain server.
In this example, the device domain server is a simulation server built in the device domain according to the remote device, so the device domain client only needs to send instruction information to the device domain server, and the same debugging and testing effects of the user domain client to the remote device can be achieved.
The mock test is a test method for creating a virtual object for testing some objects which are not easy to construct or easy to obtain in the test process.
S206, the equipment domain server receives instruction information sent by the equipment domain client.
In this example, by means of the device domain server receiving the instruction information sent by the device domain client, the technical effect that the simulation server simulating the remote device receives the instruction information of the device domain client is achieved, and further the technical effect that the device domain client simulates the client operation of the user domain is achieved.
S207, the equipment domain client receives service side feedback information sent by the equipment domain service side according to the instruction information, wherein the service side feedback information records a service side receiving state, and the service side receiving state represents that the equipment domain service side has received the instruction information.
In this example, the device domain client receives the feedback information of the server sent by the device domain server according to the instruction information, and characterizes that the instruction information is sent to the remote device in a simulation mode, so that the device domain client can execute other state operations, wherein the other state operations refer to threads or processes triggered and/or driven by the device domain client based on the remote device receiving the instruction information.
And S208, the device domain server sends the instruction information to the remote device.
In this example, the device domain server side can realize the technical effect of synchronous debugging between the simulation server and the remote device only by synchronizing instruction information with the remote device.
The equipment domain server is a simulation server established according to the remote equipment, and the internal code of the equipment domain server is consistent with that of the remote equipment, so that the user domain can realize the same debugging effect on the remote equipment by sending instruction information to the equipment domain server, and the equipment debugging and testing efficiency is improved.
The remote device is an ADB device, where ADB is called AndroidDebugBridge, which is the function of a debug bridge. The full name of adb is Android debug bridge, which acts as a debug bridge. Adb is a tool in AndroidSDK with which an Android simulator or real Android devices can be directly operated and managed. The ADB device is a computer device that operates and/or manages through the ADB.
S209, the equipment domain server receives equipment feedback information sent by the remote equipment according to the instruction information.
In this example, the device domain server side can learn that the remote device receives the instruction information by receiving the device feedback information sent by the remote device according to the instruction information, and obtain the result information generated by the remote device according to the instruction information, so that the communication between the device domain server side and the remote device has no limitation of signaling interaction amount, the forwarding amount and forwarding rate of the instruction information are greatly improved, and the efficiency of synchronous debugging and testing of the remote device is ensured.
And S210, the equipment domain server side sends an equipment processing result to the equipment domain client side according to the equipment feedback information.
In this example, by means of the device domain server side sending the device processing result to the device domain client side according to the device feedback information, the device domain client side is made to serve as a simulation terminal for simulating the client side of the user domain, so as to implement a closed loop for debugging and testing the remote device, so that the device domain client side can synchronize the device processing result to the client side of the user domain in the following process.
In this embodiment, an equipment simulation network element is created based on a DMA or zero copy technology, so as to implement forwarding instruction information and equipment feedback information of the equipment simulation network element, and an equipment domain server and an equipment domain client are deployed in the equipment simulation network element. And creating a user simulation network element based on a DMA (direct memory access) or zero copy technology, and realizing forwarding instruction information and equipment feedback information of the user simulation network element.
DMA (direct memory access) is an important feature of all modern computers, which allows hardware devices of different speeds to communicate without relying on a significant interrupt load of the CPU.
Zero copy (english: zero-copy; also Zero copy) techniques refer to computer operations in which the CPU does not need to copy data from some memory to another specific area first. This technique is typically used to save CPU cycles and memory bandwidth when transmitting files over a network.
Illustratively, the device-simulated network element and the user-simulated network element are computer modules that run on hardware supporting DMA (DirectMemoryAccess) and SG-DMA (THESCATTER-GatherDirectMemoryAccess), generated by software coding techniques (mmap+write, sendFile, sendFile +gather, splice, etc.).
Fig. 6 is a schematic structural diagram of an equipment simulation network element according to an embodiment of the present application. As shown in fig. 6, the device simulation network element includes a device domain client 61 and a device domain server 62;
The device domain client 61 is configured to receive instruction information sent by a user domain, where the instruction information is a command prompt for debugging a remote device;
The device domain server 62 is configured to send instruction information to a remote device located in a device domain, and receive device feedback information sent by the remote device according to the instruction information, where the device feedback information records a device receiving state and a device processing result, the device receiving state indicates that the remote device has received the instruction information, and the device processing result is result information generated by running the instruction information by the remote device.
Preferably, the device domain server 52 is further configured to send a domain receiving state to the user domain, where the domain receiving state characterizes that the device simulation network element has received the instruction information;
the device domain server 62 is further configured to send the device processing result to the user domain.
Preferably, fig. 7 is a schematic structural diagram of a device domain client according to an embodiment of the present application.
As shown in fig. 7, the device domain client 61 includes a first receiving unit 71 and a first transmitting unit 72
A first receiving unit 71, configured to receive instruction information sent by a user domain;
A first sending unit 72, configured to send instruction information to a device domain server;
The first receiving unit 71 is further configured to receive server feedback information sent by the device domain server according to the instruction information, where the server feedback information records a server receiving state, and the server receiving state indicates that the device domain server has received the instruction information.
Preferably, fig. 8 is a schematic structural diagram of a device domain server provided in an embodiment of the present application.
As shown in fig. 7, the device domain server 62 includes a second receiving unit 81 and a second transmitting unit 82;
A second receiving unit 81, configured to receive instruction information sent by a device domain client;
A second transmitting unit 82 for transmitting instruction information to a remote device;
The second receiving unit 81 is further configured to receive feedback information of the remote device according to the instruction information sending device;
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.
Fig. 9 is a schematic structural diagram of a user domain according to an embodiment of the present application. As shown in fig. 9, the user domain includes a user emulation network element 91;
The user simulation network element 91 is configured to send instruction information to a device simulation network element in a device domain, where 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, where the instruction information is a command prompt for debugging the remote device, the device feedback information records a device receiving state and a device processing result, the device receiving state indicates that the remote device has received the instruction information, the device processing result is result information generated by the remote device running instruction information, and the device simulation network element includes a simulation server established in the device domain according to the remote device in the device domain.
Preferably, the user emulation network element 91 is further configured to receive instruction information sent by the client 92 located in the user domain;
The user simulation network element 91 is further configured to send user feedback information to the client 92 according to the instruction information, where the user feedback information records a user receiving state and a user processing result, the user receiving state characterizes that the user simulation network element 91 has received the instruction information, and the user processing result is result information generated by the user simulation network element 91 according to the instruction information.
Fig. 10 is a schematic structural diagram of an equipment simulation network element according to an embodiment of the present application. As shown in fig. 10, the network device simulation network element may be used to perform actions or steps of the terminal device in the embodiments shown in fig. 4, 6, 7 and 8, where 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.
The processor 105 invokes the program to perform the operations of the above method embodiments to implement the various units and modules shown in fig. 10. The processor 105 may also be a controller, which is indicated as "controller/processor 105" in fig. 10. The device domain server 102 and the device domain client 101 are configured to support information transceiving between the device emulation network element and the user domain, the user emulation network element in the user domain, and the remote device in the above embodiment, and support radio communication between the device emulation network element and the user domain, the user emulation network element in the user domain, and the remote device in the above embodiment. The processor 105 performs various functions for communicating with the device domain client 101, the device domain server 102, the communication interface 103, and the memory 104.
Further, the device emulation network element may further comprise a memory 104, the memory 104 being configured to store program codes and data of the device emulation network element. Furthermore, the device emulation network element may also comprise a communication interface 103. The communication interface 103 is used for supporting the device simulation network element to communicate with other network entities and terminal devices.
The processor 105, such as a central processing unit (centralprocessingunit, 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, or the like. The memory 104 may be one memory or may be a collective term for a plurality of memory elements.
Fig. 11 is a schematic structural diagram of a user domain according to an embodiment of the present application. As shown in fig. 11, the network user domain may be used to perform the actions or steps of the terminal device in the embodiments shown in fig. 5 and 9, and comprises a user emulation network element 111, a communication interface 112, a memory 113 and a processor 114.
The processor 114 invokes the program to perform the operations of the above method embodiments to implement the various units and modules shown in fig. 11. The processor 114 may also be a controller, which is denoted as "controller/processor 114" in fig. 11. The user emulation network element 111 is configured to support information transceiving between the user domain and the device emulation network element and the remote device in the above embodiment, and to support radio communication between the user domain and the device emulation network element and the remote device in the above embodiment. The processor 114 performs various functions for communicating with the user analogue network element 111, the communication interface 112, the memory 113.
Further, the user domain may further include a memory 113, and the memory 113 is used to store program codes and data of the user domain. In addition, the user domain may also include a communication interface 112. The communication interface 112 is used to support the user domain to communicate with other network entities, terminal devices.
The processor 114, such as a central processing unit (centralprocessingunit, 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, or the like. The memory 113 may be one memory or may be a collective term of a plurality of memory elements.
An embodiment of the present application provides a communication system, which includes the device simulation network element provided in fig. 10, and the user domain provided in fig. 11.
An embodiment of the present application provides a computer readable storage medium including instructions or a program which, when run on a computer, cause the computer to perform the steps of the user domain and device emulation network element described above in fig. 4.
An embodiment of the present application provides a computer readable storage medium including instructions or a program, which when executed on a computer, causes the computer to perform the steps of the user emulation network element, the device domain client, and the device domain server described above in fig. 5.
An embodiment of the present application provides a computer program product comprising program code for executing the steps of the device emulation network element in the embodiment shown in fig. 4 described above when the program code is executed by a computer.
An embodiment of the present application provides a computer program product, including program code, when executed by a computer, configured to perform the steps of the device domain client and the device domain server in the device emulation network element in the embodiment shown in fig. 5.
An embodiment of the present application provides a computer program product comprising program code for performing the steps of the user-simulated network element of the embodiment shown in fig. 5 described above when the program code is run by a computer.
In the above embodiments, it may be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented in software, may 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 in accordance with embodiments of the present application are produced in whole or in part. The computer may be a general purpose computer, a special purpose computer, a computer network, or other programmable apparatus. The computer instructions may be stored in or transmitted from one computer-readable storage medium to another, e.g., from one website, computer, server, or data center by wired (e.g., coaxial cable, fiber optic, digital subscriber line (digitalsubscriberline, DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. Computer readable storage media can be any available media that can be accessed by a computer or data storage devices, such as servers, data centers, etc., that contain an integration of one or more available media. The usable medium may be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid state disk (solidstatedisk, SSD)), or the like.
Those skilled in the art will appreciate that in one or more of the examples described above, the functions described in the embodiments of the present application may be implemented in hardware, software, firmware, or any combination thereof. When implemented in software, these functions may be stored on or transmitted over as one or more instructions or code on a computer-readable medium. Computer-readable media includes both computer storage media and communication media including any medium that facilitates transfer of a computer program from one place to another. A storage media may be any available media that can be accessed by a general purpose or special purpose computer.
The foregoing is merely illustrative embodiments of the present invention, but the scope of the present invention is not limited thereto, and any person skilled in the art can easily think about variations or substitutions within the technical scope of the present invention, and the invention should be covered. Therefore, the protection scope of the invention is subject to the protection scope of the claims.