CN112671814B - Cross-platform equipment development method, device and system - Google Patents

Cross-platform equipment development method, device and system Download PDF

Info

Publication number
CN112671814B
CN112671814B CN201910979967.1A CN201910979967A CN112671814B CN 112671814 B CN112671814 B CN 112671814B CN 201910979967 A CN201910979967 A CN 201910979967A CN 112671814 B CN112671814 B CN 112671814B
Authority
CN
China
Prior art keywords
mobile device
server
equipment
mobile
local host
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201910979967.1A
Other languages
Chinese (zh)
Other versions
CN112671814A (en
Inventor
金凌云
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing QIYI Century Science and Technology Co Ltd
Original Assignee
Beijing QIYI Century Science and Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing QIYI Century Science and Technology Co Ltd filed Critical Beijing QIYI Century Science and Technology Co Ltd
Priority to CN201910979967.1A priority Critical patent/CN112671814B/en
Publication of CN112671814A publication Critical patent/CN112671814A/en
Application granted granted Critical
Publication of CN112671814B publication Critical patent/CN112671814B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Computer And Data Communications (AREA)

Abstract

The invention provides a cross-platform equipment development method, a device and a system, wherein the method comprises the following steps: under the condition of receiving an event message sent by a server and used for establishing communication connection between a mobile device and the server, simulating the mobile device as a locally connected device, wherein the mobile device and the local host are preinstalled with different operating systems; sending a control instruction for the mobile device to the server so as to control the mobile device. The cross-platform equipment development method provided by the invention can realize cross-platform development without depending on a host which is the same as an operating system of the mobile equipment when developing the mobile equipment, particularly expensive mobile equipment, and reduce development cost and development difficulty.

Description

Cross-platform equipment development method, device and system
Technical Field
The present invention relates to the field of communications technologies, and in particular, to a method, an apparatus, and a system for cross-platform device development.
Background
In the prior art, a local host and a server which are the same as an operating system of a Development object are generally used for system Development, for example, iOS device Development depends heavily on macs, iOS devices and an Integrated Development Environment (IDE) Development tool XCode installed on macs, and developers mainly perform Development and debugging work by connecting iOS devices to local Mac machines in a USB manner, which increases device procurement cost and Development difficulty.
Therefore, the existing device development method has the problem that the existing device development method is too dependent on the related devices which are the same as the operating system of the development device, so that the development cost is large.
Disclosure of Invention
The embodiment of the invention provides a cross-platform equipment development method, a device and a system, which aim to solve the problem that the existing equipment development method excessively depends on related equipment which is the same as an operating system of development equipment, so that the development cost is higher.
In order to solve the technical problem, the invention is realized as follows:
in a first aspect, an embodiment of the present invention provides a cross-platform device development system, including a local host, a server, and a mobile device, where the mobile device and the local host are pre-installed with different operating systems, and the server is configured to send an event message indicating that the mobile device establishes a communication connection with the server to the local host when detecting that the mobile device establishes a communication connection with the server;
the local host is used for simulating the mobile equipment as locally connected equipment under the condition of receiving the event message sent by the server; sending a control instruction for the mobile device to the server so as to control the mobile device;
the server is also used for receiving an operation instruction which is sent by the local host and aims at the mobile equipment; forwarding the control instruction to the mobile device based on a communication protocol supported by an operating system of the mobile device so as to control the mobile device;
the mobile device is used for receiving and responding to the control instruction forwarded by the server.
In a second aspect, an embodiment of the present invention provides a cross-platform device development method, which is applied to a local host, and the method includes:
under the condition of receiving an event message sent by a server and used for establishing communication connection between a mobile device and the server, simulating the mobile device as a locally connected device, wherein the mobile device and the local host are preinstalled with different operating systems;
sending a control instruction for the mobile device to the server so as to control the mobile device.
In a third aspect, an embodiment of the present invention provides another cross-platform device development method, which is applied to a server, and includes:
under the condition that a mobile device is detected to establish communication connection with the server, sending an event message of establishing communication connection between the mobile device and the server to a local host, wherein the mobile device and the local host are preinstalled with different operating systems;
receiving an operation instruction which is sent by the local host and aims at the mobile equipment;
and forwarding the control instruction to the mobile equipment based on a communication protocol supported by an operating system of the mobile equipment so as to control the mobile equipment.
In a fourth aspect, an embodiment of the present invention provides a cross-platform device development apparatus, including:
the device connection module is used for simulating the mobile device as a locally connected device under the condition of receiving an event message for establishing communication connection between the mobile device and the server, wherein the mobile device and the local host are pre-installed with different operating systems;
the sending module is used for sending a control instruction aiming at the mobile equipment to the server so as to control the mobile equipment.
In a fifth aspect, an embodiment of the present invention provides a cross-platform device development apparatus, including:
the mobile device comprises a first sending module, a second sending module and a third sending module, wherein the first sending module is used for sending an event message of establishing communication connection between the mobile device and the server to a local host under the condition that the mobile device is detected to be in communication connection with the server, and different operating systems are pre-installed on the mobile device and the local host;
the receiving module is used for receiving an operation instruction which is sent by the local host and aims at the mobile equipment;
and the second sending module is used for forwarding the control instruction to the mobile equipment based on a communication protocol supported by an operating system of the mobile equipment so as to control the mobile equipment.
In a sixth aspect, an embodiment of the present invention provides a cross-platform device development apparatus, including a processor, a memory, and a computer program stored on the memory and executable on the processor, where the computer program, when executed by the processor, implements the steps in the cross-platform device development method according to the second aspect.
In a seventh aspect, an embodiment of the present invention provides a cross-platform device development apparatus, including a processor, a memory, and a computer program stored on the memory and executable on the processor, where the computer program, when executed by the processor, implements the steps in the cross-platform device development method according to the third aspect.
In an eighth aspect, an embodiment of the present invention provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when executed by a processor, the computer program implements the steps in the cross-platform device development method according to the second aspect or the third aspect.
In the embodiment of the invention, under the condition of receiving the event message of establishing communication connection between the mobile equipment and the server, the mobile equipment is simulated as locally connected equipment, wherein different operating systems are pre-installed on the local host and the mobile equipment, and then the aim of remotely controlling or debugging the mobile equipment can be fulfilled by sending a control instruction aiming at the mobile equipment to the server. Therefore, when mobile equipment, particularly expensive mobile equipment, is developed, cross-platform development can be realized without depending on a host which is the same as an operating system of the mobile equipment, and development cost and development difficulty are reduced.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings needed to be used in the description of the embodiments of the present invention will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art that other drawings can be obtained according to these drawings without inventive exercise.
FIG. 1 is a flowchart of a cross-platform device development method according to an embodiment of the present invention;
fig. 2 is a block diagram of a connection structure between a local host, a server and a mobile device according to an embodiment of the present invention;
FIG. 3 is a flowchart of another cross-platform device development method provided by an embodiment of the present invention;
fig. 4 is a schematic structural diagram of a cross-platform device development apparatus according to an embodiment of the present invention;
fig. 5 is a schematic structural diagram of another cross-platform device development apparatus provided in an embodiment of the present invention;
fig. 6 is a schematic structural diagram of a device connection module of a cross-platform device development apparatus according to an embodiment of the present invention;
fig. 7 is a schematic structural diagram of a cross-platform device development apparatus according to an embodiment of the present invention;
fig. 8 is a schematic structural diagram of another cross-platform device development apparatus provided in an embodiment of the present invention;
fig. 9 is a schematic structural diagram of another cross-platform device development apparatus provided in an embodiment of the present invention;
fig. 10 is a schematic structural diagram of a second sending module of a cross-platform device development apparatus according to an embodiment of the present invention;
fig. 11 is a schematic structural diagram of another cross-platform device development apparatus provided in an embodiment of the present invention;
fig. 12 is a schematic structural diagram of a third sending module of a cross-platform device development apparatus according to an embodiment of the present invention;
fig. 13 is a schematic structural diagram of a local host according to an embodiment of the present invention;
fig. 14 is a schematic structural diagram of a server according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Referring to fig. 1, fig. 1 is a flowchart of a cross-platform device development method provided in an embodiment of the present invention, which is applied to a local host, and as shown in fig. 1, the method includes the following steps:
step 101, simulating a mobile device as a locally connected device when receiving an event message sent by a server, wherein the event message is used for establishing a communication connection between the mobile device and the server, and the mobile device and the local host are preinstalled with different operating systems.
In the embodiment of the present invention, the mobile device may be a mobile terminal device such as a mobile phone, a tablet computer, and a wearable device, the local host may be a local computer such as a desktop computer and a notebook computer used for a developer to develop the mobile device, and the server may be a remote computer connected to the mobile device. The mobile device and the local host may be pre-installed with different operating systems, and the server may also be pre-installed with different operating systems, respectively, for example, the mobile device is a mobile terminal using an iOS system, the local host is a general PC using a Windows system, and the server is also a general PC using a Windows system.
Before the mobile device is developed, the mobile device may establish a communication connection with the server, for example, the mobile device may establish a communication connection with the server through USB, network, or bluetooth. Specifically, the server may create a Device Manager Engine (DME) to monitor a connection state of a Device connection port of the server, for example, monitor whether a Device accesses a USB port or a specific network port of the server, and if it is monitored that the mobile Device establishes a communication connection with the server through the Device connection port, establish a communication channel with the mobile Device through the DME to transmit communication data of the two.
As shown in fig. 2, the server may establish a communication channel with the mobile device through the established DME, through which the server and the mobile device may transmit communication data, wherein the mobile device may be connected to the server through the USB.
More specifically, the server may create a script program for managing or controlling the device status, i.e. the device control engine DME, and may create a multiplexing daemon in the script program to monitor the USB port status of the server, and may further set an agent to connect the USB port address, and after the connection is successful, may send ping data at a preset rate (e.g. every 100ms) to search for a device, and if a device attempts to connect to the USB port, the set agent may receive a notification.
The mobile device may create a dedicated thread (i.e., the thread is not affected by the thread) to monitor the USB port specified by the server, the mobile device may actively connect to the USB port, receive ping data sent by the DME within a preset time (e.g., 100ms) after the connection is successful, and the mobile device may reply pong data to determine to establish a communication channel with the DME immediately after receiving the ping data.
After the server establishes a communication channel with the mobile device, the server may send an event message indicating that the mobile device establishes a communication connection with the server to the local host, and specifically, the event indicating that the mobile device establishes a communication connection with the server may be encapsulated into a data packet and sent to the local host by the DME through a socket, so that the local host may receive the event message indicating that the mobile device establishes a communication connection with the server.
The local host may simulate the mobile device as a locally connected device when knowing that the mobile device and the server have established a communication connection, specifically, the local host may simulate the local device connection signal, for example, the local host may send a simulated device connection signal to a development tool on the local host, so that the development tool may mistakenly consider that the mobile device is connected to the local host, thereby identifying the mobile device.
Optionally, the step 101 includes:
under the condition of receiving an event message that the mobile equipment establishes communication connection with the server through the USB, simulating the mobile equipment as locally connected equipment by simulating a data signal of the USB port connection equipment.
When the mobile device is in communication connection with the server through a USB, the local host may simulate the mobile device as a device connected to the local USB port by simulating a data signal of the USB port connection device, for example, the local host may send the data signal of the simulated USB port connection device to a development tool on the local host, so that the development tool may misunderstand that the mobile device is connected to the local host through a USB mode, and further, the mobile device may be debugged or controlled.
When the mobile device is an iOS device, the sending the data signal of the analog USB port connection device may be sending a series of commands, where the main command rule may be: the method comprises the steps of providing a host computer, wherein the host computer is provided with a plurality of host computers, and each host computer is provided with a plurality of software modules, so that the host computer can be used for processing a plurality of software modules, and each software module comprises a plurality of software modules, wherein each software module comprises a plurality of software modules, and each software module comprises a plurality of software modules.
Optionally, the step 101 includes:
creating a device search engine;
and under the condition that the equipment search engine receives an event message sent by a server and used for establishing communication connection between the mobile equipment and the server, simulating the mobile equipment as locally connected equipment by simulating an equipment connection signal through the equipment search engine.
In order to ensure the performance of the local host, a device search engine may be created, for example, a script program for searching a device connection state may be created, so that an event message that the mobile device establishes a communication connection with the server may be received by the device search engine, and a device connection signal may be simulated by the device search engine to simulate the mobile device as a locally connected device, for example, a simulated device connection signal may be sent to a development tool on the local host by the device search engine, so that the local host may operate explicitly by division of labor.
And 102, sending a control instruction for the mobile equipment to the server so as to control the mobile equipment.
After the mobile device is simulated as a local connection device, since the mobile device is actually connected to the server, a manipulation instruction for the mobile device may be sent to the server to manipulate the mobile device, specifically, after receiving the manipulation instruction for the mobile device sent by the local host, the server may forward the manipulation instruction to the mobile device, and the mobile device may then receive and respond to the manipulation instruction. The manipulation instruction may be an instruction to start an application program on the mobile device, debug a function of the mobile device, or the like.
It should be noted that, in order to ensure that a developer can accurately control the mobile device, the server may transmit the screen data of the mobile device to the local host in real time, so that the developer working at the local host can use the development tool on the local host to remotely control or debug the mobile device based on the screen data of the mobile device displayed on the local host, and can observe the result of the operation instruction of the local host by the mobile device in real time through the screen data transmitted in real time, thereby ensuring smooth remote control of the mobile device.
As shown in fig. 2, the local host may communicate with the server through the usbmux interface service, and a developer may debug or control the mobile device by using an Integrated Development Environment (IDE) on the local host based on screen data of the mobile device transmitted by the server, so as to complete Development of the mobile device.
Therefore, the cross-platform device development method in the embodiment of the invention can realize cross-platform development on the mobile device, especially for the development of iOS devices, can be completed by using a common PC of a Windows system without depending on the iOS devices and Mac devices, thereby reducing the purchase cost of the devices and improving the utilization rate and the development efficiency of the devices.
Optionally, the method further includes:
receiving screen picture data of the mobile device sent by the server, wherein the server obtains operation authority for the mobile device through a communication protocol supported by an operating system of the mobile device.
After the mobile device and the server are in communication connection, the server may intercept screen image data of the mobile device and transmit the intercepted screen image data to the local host, specifically, may intercept the screen image data of the mobile device in real time and transmit the intercepted screen image data to the local host in real time, so that a developer working at the local host may debug or manipulate the mobile device based on the received screen image data, that is, the developer at the local host may observe screen display data of the mobile device, and may conveniently manipulate the mobile device and watch a device operation result. The screen data may include content that the mobile device displays in response to a manipulation instruction of the local host.
More specifically, the server may intercept the screen data of the mobile device once every preset duration (e.g., every 0.2s), for example, intercept the screen data of the mobile device using a libimobilievic protocol for screen interception, compare the similarity between the currently intercepted screen data and the screen data intercepted in the previous frame, if the similarity between the currently intercepted screen data and the screen data intercepted in the previous frame exceeds a preset threshold (e.g., exceeds 99%), discard the currently intercepted screen data, and if the similarity between the currently intercepted screen data and the screen data does not exceed the preset threshold, store the currently intercepted screen data, for example, store the currently intercepted screen data in a cache pool, and the server may sequentially transmit the screen data in the cache pool to the local host according to the interception order.
Before intercepting screen image data of the mobile Device, the server may further obtain an operation permission for the mobile Device to achieve real-time control over the mobile Device, and specifically, the server may construct a Device Handle Engine (DHE) for the mobile Device, such as create a script program for controlling the mobile Device, and then may send a control instruction to the mobile Device through the DHE based on a communication protocol supported by an operating system of the mobile Device to obtain the operation permission for the mobile Device. For example, when the mobile device is an iOS device, a Hyper Text Transfer Protocol (HTTP) specified by a Web Driver Agent (WDA) may be used, and an operation instruction for the mobile device is sent by the device operation engine in a script manner, so as to implement operations on a main interface of the mobile device and an internal application installed on the mobile device, where the WDA is an iOS mobile test framework.
After the server creates the DHE, the server may further encapsulate, through the DHE, an operation protocol commonly used by the mobile device into an interface with a corresponding function, and specifically encapsulate a preset operation protocol of the mobile device into a corresponding operation interface, such as an operation interface of tap (), swap (), input (), and the like.
The server can also convert an operation Event Class received by the server into a calling Event of a corresponding operation interface through the DHE, wherein the operation Event is an Event for controlling the mobile device by a development tool on the local host, and thus, after the server receives a certain operation Event for the mobile device sent by the development tool on the local host, the corresponding operation interface can be called, so that the mobile device can identify the operation Event.
Wherein, the Event Class member can be defined as follows:
event Type: event types, such as click, slide, input, etc.;
event Index: the event numbers are automatically increased from 0, so that each event can be conveniently distinguished;
coordinate: coordinates of where the event occurred;
time: the time at which the event occurred;
duration: the duration of the event;
additional Info: additional information required for the event, such as speed and distance while slipping, etc.
It should be noted that, the step of receiving the screen data of the mobile device sent by the server may be performed before sending the control instruction for the mobile device to the server, or may be performed after sending the control instruction for the mobile device to the server, that is, the local host may first receive the screen data of the mobile device sent by the server, so that a developer may more accurately control the mobile device based on the screen data, or may receive the screen data of the mobile device returned by the server after sending the control instruction to the mobile device, so that a developer may observe a control result of the mobile device in real time through the screen data, and the step of receiving the screen data of the mobile device sent by the server may be performed throughout the entire control process That is, the server may continuously transmit the screen data of the mobile device to the local host in real time.
In the cross-platform device development method in this embodiment, the mobile device is simulated as a locally connected device when an event message that the mobile device establishes a communication connection with the server is received, where the local host and the mobile device are pre-installed with different operating systems, and then a control instruction for the mobile device is sent to the server, so that the purpose of remotely controlling or debugging the mobile device can be achieved. Therefore, when mobile equipment, particularly expensive mobile equipment, is developed, cross-platform development can be realized without depending on a host which is the same as an operating system of the mobile equipment, and development cost and development difficulty are reduced.
Referring to fig. 3, fig. 3 is a flowchart of another cross-platform device development method provided in the embodiment of the present invention, which is applied to a server. As shown in fig. 3, the method comprises the steps of:
step 301, sending an event message for establishing a communication connection between a mobile device and the server to a local host when detecting that the mobile device establishes a communication connection with the server, wherein the mobile device and the local host are pre-installed with different operating systems.
Optionally, before step 301, the method further includes:
creating a device control engine DME;
monitoring the connection state of the equipment connection port of the server through the DME;
under the condition that the mobile device is monitored to establish communication connection with the server through the device connection port, establishing a communication channel with the mobile device through the DME;
the step 301 comprises:
sending, by the DME to the local host, an event message that the mobile device establishes a communication channel with the DME.
Step 302, receiving an operation instruction for the mobile device sent by the local host.
Step 303, forwarding the control instruction to the mobile device based on a communication protocol supported by an operating system of the mobile device, so as to control the mobile device.
Optionally, step 303 includes:
creating a device manipulation engine DHE;
and forwarding the control instruction to the mobile equipment through the DHE based on a communication protocol supported by an operating system of the mobile equipment so as to control the mobile equipment.
Optionally, after the device manipulation engine DHE is created, the method further includes at least one of:
encapsulating a preset operation protocol for the mobile equipment into a corresponding operation interface through the DHE;
and converting the operation event received by the server into a calling event of a corresponding operation interface through the DHE, wherein the operation event is an event for controlling the mobile equipment by the local host.
Optionally, the method further includes:
and intercepting the screen image data of the mobile equipment, and sending the intercepted screen image data to the local host.
Optionally, the intercepting the screen data of the mobile device and sending the intercepted screen data to the local host includes:
intercepting screen picture data of the mobile equipment at intervals of preset time;
comparing the similarity between the currently intercepted screen picture data and the last frame of screen picture data, and storing the currently intercepted screen picture data under the condition that the similarity does not exceed a preset threshold value;
and sending the saved screen picture data to the local host.
It should be noted that, as an implementation manner of the server corresponding to the embodiment shown in fig. 1, a specific implementation manner of the embodiment of the present invention may refer to relevant descriptions in the embodiment shown in fig. 1, and in order to avoid repeated descriptions, the embodiment is not described again.
In the cross-platform device development method in this embodiment, when it is detected that the mobile device establishes a communication connection with the server, the local host may be triggered to simulate the mobile device as a locally connected device by sending an event message indicating that the mobile device establishes a communication connection with the server to the local host, where the local host and the mobile device are preinstalled with different operating systems, and then receive an operating instruction for the mobile device sent by the local host, and forward the operating instruction to the mobile device based on a communication protocol supported by the operating system of the mobile device, so as to operate and control the mobile device, thereby achieving a purpose of remotely operating or debugging the mobile device, and achieving cross-platform development without depending on a host that is the same as the operating system of the mobile device, and reducing development cost and development difficulty.
Referring to fig. 4, fig. 4 is a schematic structural diagram of a cross-platform device development apparatus provided in an embodiment of the present invention, where the cross-platform device development apparatus is disposed in a local host, and as shown in fig. 4, a cross-platform device development apparatus 400 includes:
the device connection module 401 is configured to simulate, when an event message that is sent by a server and used for establishing a communication connection between a mobile device and the server is received, the mobile device as a locally connected device, where the mobile device and a local host are preloaded with different operating systems;
a sending module 402, configured to send a control instruction for the mobile device to the server, so as to control the mobile device.
Optionally, as shown in fig. 5, the cross-platform device development apparatus 400 further includes:
a receiving module 403, configured to receive screen data of the mobile device sent by the server, where the server obtains an operation right for the mobile device through a communication protocol supported by an operating system of the mobile device.
Optionally, the device connection module 401 is configured to, when receiving an event message sent by the server and used for establishing a communication connection between the mobile device and the server through a USB, simulate the mobile device as a locally connected device by simulating a data signal of a USB port connection device.
Optionally, as shown in fig. 6, the device connection module 401 includes:
a creation unit 4011 configured to create an apparatus search engine;
the device connection unit 4012 is configured to simulate, by the device search engine, a device connection signal and simulate the mobile device as a locally connected device when the device search engine receives an event message that the mobile device and the server establish a communication connection, where the event message is sent by the server.
The cross-platform device development apparatus 400 can implement each process implemented by the local host in the method embodiment of fig. 1, and is not described here again to avoid repetition. The cross-platform device development apparatus 400 according to the embodiment of the present invention may simulate the mobile device as a locally connected device when receiving an event message that the mobile device establishes a communication connection with the server, where the local host and the mobile device are pre-installed with different operating systems, and then send a control instruction for the mobile device to the server, so as to achieve the purpose of remotely controlling or debugging the mobile device. Therefore, when mobile equipment, particularly expensive mobile equipment, is developed, cross-platform development can be realized without depending on a host which is the same as an operating system of the mobile equipment, and development cost and development difficulty are reduced.
Referring to fig. 7, fig. 7 is a schematic structural diagram of a cross-platform device development apparatus provided in an embodiment of the present invention, where the cross-platform device development apparatus is disposed in a server, and as shown in fig. 7, a cross-platform device development apparatus 700 includes:
a first sending module 701, configured to send an event message that a mobile device establishes a communication connection with a server to a local host when detecting that the mobile device establishes a communication connection with the server, where the mobile device and the local host are pre-installed with different operating systems;
a receiving module 702, configured to receive an operation instruction for the mobile device sent by the local host;
a second sending module 703 is configured to forward the control instruction to the mobile device based on a communication protocol supported by an operating system of the mobile device, so as to control the mobile device.
Optionally, as shown in fig. 8, the cross-platform device development apparatus 700 further includes:
a third sending module 704, configured to intercept the screen data of the mobile device, and send the intercepted screen data to the local host.
Optionally, as shown in fig. 9, the cross-platform device development apparatus 700 further includes:
a creating module 705 for creating a device control engine DME;
a monitoring module 706, configured to monitor a connection state of a device connection port of the server through the DME;
an establishing module 707, configured to establish a communication channel with the mobile device through the DME when it is monitored that the mobile device establishes a communication connection with a server through the device connection port;
a first sending module 701 is configured to send, to the local host through the DME, an event message for the mobile device to establish a communication channel with the DME.
Optionally, as shown in fig. 10, the second sending module 703 includes:
a creating unit 7031 configured to create a device manipulation engine DHE;
a first sending unit 7032, configured to forward the control instruction to the mobile device through the DHE based on a communication protocol supported by an operating system of the mobile device, so as to control the mobile device.
Optionally, the cross-platform device development apparatus 700 further includes at least one of the following:
an encapsulating module 708, configured to encapsulate, by using the DHE, a preset operation protocol for the mobile device into a corresponding operation interface;
a conversion module 709, configured to convert, through the DHE, an operation event received by the server into a call event of a corresponding operation interface, where the operation event is an event that the local host controls the mobile device.
Fig. 11 only illustrates a case where the cross-platform device development apparatus 700 includes the encapsulation module 708 and the conversion module 709.
Optionally, as shown in fig. 12, the third sending module 704 includes:
an intercepting unit 7041, configured to intercept screen image data of the mobile device every preset duration;
a processing unit 7042, configured to compare a similarity between the currently captured screen image data and the previous frame of screen image data, and store the currently captured screen image data when the similarity does not exceed a preset threshold;
a second sending unit 7043, configured to send the saved screen image data to the local host.
The cross-platform device development apparatus 700 can implement each process implemented by the server in the method embodiment of fig. 3, and is not described here again to avoid repetition. The server of the embodiment of the invention can trigger the local host to simulate the mobile device as the locally connected device by sending the event message of the communication connection between the mobile device and the server to the local host under the condition of detecting that the communication connection between the mobile device and the server is established, wherein the local host and the mobile device are preinstalled with different operating systems, then the mobile device is controlled by receiving the operating instruction aiming at the mobile device sent by the local host and forwarding the control instruction to the mobile device based on the communication protocol supported by the operating system of the mobile device, so that the aim of remotely controlling or debugging the mobile device can be fulfilled, cross-platform development can be realized without depending on the host which is the same as the operating system of the mobile device, and the development cost and the development difficulty can be reduced.
The embodiment of the invention also provides a cross-platform device development system, which comprises a local host, a server and a mobile device, wherein the mobile device and the local host are pre-installed with different operating systems, and the server is used for sending an event message for establishing communication connection between the mobile device and the server to the local host under the condition of detecting that the mobile device and the server establish communication connection;
the local host is used for simulating the mobile equipment as locally connected equipment under the condition of receiving the event message sent by the server; sending a control instruction for the mobile device to the server so as to control the mobile device;
the server is also used for receiving an operation instruction which is sent by the local host and aims at the mobile equipment; forwarding the control instruction to the mobile device based on a communication protocol supported by an operating system of the mobile device so as to control the mobile device;
the mobile device is used for receiving and responding to the control instruction forwarded by the server.
The cross-platform device development system provided in the embodiment of the present invention may execute the method embodiment, where the local host, the server, and the mobile device may respectively correspond to the implementation schemes of the local host, the server, and the mobile device in the method embodiment, and the implementation principles and technical effects thereof are similar, and are not described herein again.
In the cross-platform device development system of the embodiment of the invention, the local host can simulate the mobile device as a locally connected device under the condition of receiving the event message of establishing communication connection between the mobile device and the server, wherein different operating systems are pre-installed on the local host and the mobile device, and then the purpose of remotely controlling or debugging the mobile device can be realized by sending a control instruction aiming at the mobile device to the server. Therefore, when mobile equipment, particularly expensive mobile equipment, is developed, cross-platform development can be realized without depending on a host which is the same as an operating system of the mobile equipment, and development cost and development difficulty are reduced.
The embodiment of the present invention further provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the computer program implements each process of the above cross-platform device development method embodiment, and can achieve the same technical effect, and in order to avoid repetition, details are not repeated here. The computer-readable storage medium may be a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk.
Referring to fig. 13, fig. 13 is a structural diagram of a local host according to another embodiment of the present invention, and as shown in fig. 13, a local host 1300 includes: a processor 1301, a memory 1302 and a computer program stored on the memory 1302 and operable on the processor, the components in the local host 1300 being coupled together by a bus interface 1303, the computer program when executed by the processor 1301 performing the steps of:
under the condition of receiving an event message sent by a server and used for establishing communication connection between a mobile device and the server, simulating the mobile device as a locally connected device, wherein the mobile device and the local host are preinstalled with different operating systems;
sending a control instruction for the mobile device to the server so as to control the mobile device.
Optionally, the computer program, when executed by the processor 1301, is further configured to:
receiving screen picture data of the mobile device sent by the server, wherein the server obtains operation authority for the mobile device through a communication protocol supported by an operating system of the mobile device.
Optionally, the computer program, when executed by the processor 1301, is further configured to:
creating a device search engine;
and under the condition that the equipment search engine receives an event message for establishing communication connection between the mobile equipment and the server, simulating the mobile equipment as locally connected equipment by simulating an equipment connection signal through the equipment search engine.
Optionally, the computer program, when executed by the processor 1301, is further configured to:
under the condition of receiving an event message sent by a server and used for establishing communication connection between the mobile equipment and the server through a USB, simulating the mobile equipment as locally connected equipment by simulating a data signal of the USB port connection equipment.
Referring to fig. 14, fig. 14 is a block diagram of a server according to another embodiment of the present invention, and as shown in fig. 14, a server 1400 includes: a processor 1401, a memory 1402 and a computer program stored on said memory 1402 and executable on said processor, the various components in the server 1400 being coupled together by means of a bus interface 1403, said computer program realizing the following steps when executed by said processor 1401:
under the condition that a mobile device is detected to establish communication connection with the server, sending an event message of establishing communication connection between the mobile device and the server to a local host, wherein the mobile device and the local host are preinstalled with different operating systems;
receiving an operation instruction which is sent by the local host and aims at the mobile equipment;
and forwarding the control instruction to the mobile equipment based on a communication protocol supported by an operating system of the mobile equipment so as to control the mobile equipment.
Optionally, the computer program, when executed by the processor 1401, is further configured to:
and intercepting the screen image data of the mobile equipment, and sending the intercepted screen image data to the local host.
Optionally, the computer program, when executed by the processor 1401, is further configured to:
creating a device control engine DME;
monitoring the connection state of the equipment connection port of the server through the DME;
under the condition that the mobile device is monitored to establish communication connection with the server through the device connection port, establishing a communication channel with the mobile device through the DME;
sending, by the DME to the local host, an event message that the mobile device establishes a communication channel with the DME.
Optionally, the computer program, when executed by the processor 1401, is further configured to:
creating a device manipulation engine DHE;
and forwarding the control instruction to the mobile equipment through the DHE based on a communication protocol supported by an operating system of the mobile equipment so as to control the mobile equipment.
Optionally, the computer program, when executed by the processor 1401, is further configured to:
encapsulating a preset operation protocol for the mobile equipment into a corresponding operation interface through the DHE;
and converting the operation event received by the server into a calling event of a corresponding operation interface through the DHE, wherein the operation event is an event for controlling the mobile equipment by a development tool on the local host.
Optionally, the computer program, when executed by the processor 1401, is further configured to:
intercepting screen picture data of the mobile equipment at intervals of preset time;
comparing the similarity between the currently intercepted screen picture data and the last frame of screen picture data, and storing the currently intercepted screen picture data under the condition that the similarity does not exceed a preset threshold value;
and sending the saved screen picture data to the local host.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which is stored in a storage medium (such as ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal (such as a mobile phone, a computer, a server, an air conditioner, or a network device) to execute the method according to the embodiments of the present invention.
While the present invention has been described with reference to the embodiments shown in the drawings, the present invention is not limited to the embodiments, which are illustrative and not restrictive, and it will be apparent to those skilled in the art that various changes and modifications can be made therein without departing from the spirit and scope of the invention as defined in the appended claims.

Claims (14)

1. A cross-platform device development system is characterized by comprising a local host, a server and a mobile device, wherein the mobile device and the local host are preinstalled with different operating systems, the mobile device uses an iOS system, and the local host uses a Windows system, wherein the server is used for sending an event message for establishing communication connection between the mobile device and the server to the local host when detecting that the mobile device and the server are in communication connection;
the local host is used for simulating the mobile equipment as locally connected equipment under the condition of receiving the event message sent by the server; sending a control instruction for the mobile device to the server so as to control the mobile device;
the server is also used for receiving a control instruction which is sent by the local host and aims at the mobile equipment; forwarding the control instruction to the mobile device based on a communication protocol supported by an operating system of the mobile device so as to control the mobile device;
the mobile equipment is used for receiving and responding to the control instruction forwarded by the server;
wherein the server is specifically configured to create a device control engine DME; monitoring the connection state of the equipment connection port of the server through the DME; under the condition that the mobile device is monitored to establish communication connection with the server through the device connection port, establishing a communication channel with the mobile device through the DME; sending, by the DME, an event message to the local host that the mobile device establishes a communication channel with the DME;
the local host is specifically used for creating a device search engine; and under the condition that the equipment search engine receives an event message sent by a server and used for establishing communication connection between the mobile equipment and the server, simulating the mobile equipment as locally connected equipment by simulating an equipment connection signal through the equipment search engine.
2. A cross-platform device development method applied to a local host is characterized by comprising the following steps:
under the condition of receiving an event message sent by a server and used for establishing communication connection between a mobile device and the server, simulating the mobile device as a locally connected device, wherein the mobile device and a local host are pre-installed with different operating systems, the mobile device uses an iOS system, and the local host uses a Windows system;
sending a control instruction for the mobile device to the server so as to control the mobile device;
the simulating the mobile device as a locally connected device under the condition of receiving the event message sent by the server and used for establishing the communication connection between the mobile device and the server comprises the following steps:
creating a device search engine;
and under the condition that the equipment search engine receives an event message sent by a server and used for establishing communication connection between the mobile equipment and the server, simulating the mobile equipment as locally connected equipment by simulating an equipment connection signal through the equipment search engine.
3. The method of claim 2, further comprising:
receiving screen picture data of the mobile device sent by the server, wherein the server obtains operation authority for the mobile device through a communication protocol supported by an operating system of the mobile device.
4. The method of claim 2, wherein simulating the mobile device as a locally connected device in case of receiving an event message sent by a server that the mobile device establishes a communication connection with the server comprises:
under the condition of receiving an event message sent by a server and used for establishing communication connection between mobile equipment and the server through a USB, simulating the mobile equipment as locally connected equipment by simulating a data signal of the USB port connection equipment.
5. A cross-platform device development method applied to a server is characterized by comprising the following steps:
under the condition that a mobile device is detected to establish communication connection with the server, sending an event message of the mobile device establishing communication connection with the server to a local host, wherein the mobile device and the local host are preinstalled with different operating systems, the mobile device uses an iOS system, and the local host uses a Windows system;
receiving a control instruction which is sent by the local host and aims at the mobile equipment;
forwarding the control instruction to the mobile device based on a communication protocol supported by an operating system of the mobile device so as to control the mobile device;
before the sending, to the local host, the event message that the mobile device establishes the communication connection with the server in the case that it is detected that the mobile device establishes the communication connection with the server, the method further includes:
creating a device control engine DME;
monitoring the connection state of the equipment connection port of the server through the DME;
under the condition that the mobile device is monitored to establish communication connection with the server through the device connection port, establishing a communication channel with the mobile device through the DME;
the sending, to the local host, the event message that the mobile device establishes the communication connection with the server when detecting that the mobile device establishes the communication connection with the server includes:
sending, by the DME to the local host, an event message that the mobile device establishes a communication channel with the DME.
6. The method of claim 5, further comprising:
and intercepting the screen image data of the mobile equipment, and sending the intercepted screen image data to the local host.
7. The method of claim 5 or 6, wherein forwarding the manipulation instruction to the mobile device based on a communication protocol supported by an operating system of the mobile device to manipulate the mobile device comprises:
creating a device manipulation engine DHE;
and forwarding the control instruction to the mobile equipment through the DHE based on a communication protocol supported by an operating system of the mobile equipment so as to control the mobile equipment.
8. The method according to claim 7, wherein after said creating a device handling engine DHE, the method further comprises at least one of:
encapsulating a preset operation protocol for the mobile equipment into a corresponding operation interface through the DHE;
and converting the operation event received by the server into a calling event of a corresponding operation interface through the DHE, wherein the operation event is an event for controlling the mobile equipment by the local host.
9. The method of claim 6, wherein intercepting screen data of the mobile device and sending the intercepted screen data to the local host comprises:
intercepting screen picture data of the mobile equipment at intervals of preset time;
comparing the similarity between the currently intercepted screen picture data and the last frame of screen picture data, and storing the currently intercepted screen picture data under the condition that the similarity does not exceed a preset threshold value;
and sending the saved screen picture data to the local host.
10. A cross-platform device development apparatus disposed on a local host, comprising:
the device connection module is used for simulating the mobile device as a locally connected device under the condition of receiving an event message sent by a server and used for establishing communication connection between the mobile device and the server, wherein different operating systems are pre-installed on the mobile device and the local host, the mobile device uses an iOS system, and the local host uses a Windows system;
the sending module is used for sending a control instruction aiming at the mobile equipment to the server so as to control the mobile equipment;
the device connection module includes:
a creation unit for creating a device search engine;
and the equipment connection unit is used for simulating the mobile equipment into locally connected equipment by simulating an equipment connection signal through the equipment search engine under the condition that the equipment search engine receives an event message which is sent by the server and used for establishing communication connection between the mobile equipment and the server.
11. The utility model provides a cross-platform equipment development device, sets up in the server, its characterized in that includes:
the mobile device comprises a first sending module, a second sending module and a third sending module, wherein the first sending module is used for sending an event message of establishing communication connection between the mobile device and the server to a local host under the condition that the mobile device is detected to be in communication connection with the server, different operating systems are pre-installed on the mobile device and the local host, the mobile device uses an iOS system, and the local host uses a Windows system;
the receiving module is used for receiving a control instruction which is sent by the local host and aims at the mobile equipment;
a second sending module, configured to forward the control instruction to the mobile device based on a communication protocol supported by an operating system of the mobile device, so as to control the mobile device;
the cross-platform device development apparatus further includes:
a creation module for creating a device control engine DME;
the monitoring module is used for monitoring the connection state of the equipment connection port of the server through the DME;
the establishing module is used for establishing a communication channel with the mobile equipment through the DME under the condition that the mobile equipment is monitored to establish communication connection with the server through the equipment connecting port;
the first sending module is configured to send, by the DME, an event message to the local host that the mobile device establishes a communication channel with the DME.
12. A cross-platform device development apparatus comprising a processor, a memory, and a computer program stored on the memory and executable on the processor, the computer program, when executed by the processor, implementing the steps in the cross-platform device development method according to any one of claims 2 to 4.
13. A cross-platform device development apparatus comprising a processor, a memory, and a computer program stored on the memory and executable on the processor, the computer program when executed by the processor implementing the steps in the cross-platform device development method according to any one of claims 5 to 9.
14. A computer-readable storage medium, having stored thereon a computer program which, when executed by a processor, implements the steps in the cross-platform device development method of any one of claims 2 to 4; alternatively, the computer program when executed by a processor implements the steps in the cross-platform device development method of any one of claims 5 to 9.
CN201910979967.1A 2019-10-15 2019-10-15 Cross-platform equipment development method, device and system Active CN112671814B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910979967.1A CN112671814B (en) 2019-10-15 2019-10-15 Cross-platform equipment development method, device and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910979967.1A CN112671814B (en) 2019-10-15 2019-10-15 Cross-platform equipment development method, device and system

Publications (2)

Publication Number Publication Date
CN112671814A CN112671814A (en) 2021-04-16
CN112671814B true CN112671814B (en) 2022-04-12

Family

ID=75400366

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910979967.1A Active CN112671814B (en) 2019-10-15 2019-10-15 Cross-platform equipment development method, device and system

Country Status (1)

Country Link
CN (1) CN112671814B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113709243B (en) * 2021-08-27 2024-04-30 广州博冠信息科技有限公司 Equipment remote control method and device, electronic equipment and storage medium

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103262025A (en) * 2010-10-01 2013-08-21 Flex Electronics ID Co.,Ltd. Cross-environment communication using application space API

Family Cites Families (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8898629B2 (en) * 2011-04-06 2014-11-25 Media Direct, Inc. Systems and methods for a mobile application development and deployment platform
US20140189544A1 (en) * 2012-12-27 2014-07-03 Nvidia Corporation Web-based graphics development system and method of graphics program interaction therewith
CN104298591B (en) * 2013-07-18 2017-07-07 阿里巴巴集团控股有限公司 A kind of WebApp remote debugging methods and system
CN104967585B (en) * 2014-04-15 2018-07-20 腾讯科技(深圳)有限公司 A kind of method and apparatus of remote debugging mobile terminal
CN108984169B (en) * 2017-06-01 2022-05-03 刘开元 Cross-platform multi-element integrated development system
CN107678939A (en) * 2017-08-29 2018-02-09 苏州惠邦科信息技术有限公司 Android terminal emulation test system
CN107656870A (en) * 2017-09-27 2018-02-02 四川久远银海软件股份有限公司 Using adjustment method and device
CN108282542A (en) * 2018-02-13 2018-07-13 百度在线网络技术(北京)有限公司 Remote operation method and device for test equipment
CN108647028B (en) * 2018-05-09 2024-02-09 广州腾讯科技有限公司 Application information processing method and device

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103262025A (en) * 2010-10-01 2013-08-21 Flex Electronics ID Co.,Ltd. Cross-environment communication using application space API

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
"Cross-platform mobile development approaches";S. Charkaoui等;《2014 Third IEEE International Colloquium in Information Science and Technology (CIST)》;20150122;全文 *
"跨平台移动应用开发系统的设计与实现";熊亚蒙;《电子测试》;20171212;全文 *

Also Published As

Publication number Publication date
CN112671814A (en) 2021-04-16

Similar Documents

Publication Publication Date Title
US20140223300A1 (en) Remote assistance method, system and terminal
US11340859B2 (en) Synchronous display method, storage medium and electronic device
CN108763086A (en) Script method for recording, terminal and computer readable storage medium based on remote real machine
CN112380093A (en) Operation and maintenance processing method and device and computer equipment
WO2018077041A1 (en) Method and apparatus for running application
WO2019057089A1 (en) Network card image packet capture method, terminal, and readable storage medium
CN108280020B (en) Monitoring method and device of computer equipment, terminal and computer storage medium
CN104079717A (en) Method for displaying device interface and server
CN111159047A (en) Android equipment auxiliary debugging device with visual interface and operation method thereof
CN113037545A (en) Network simulation method, device, equipment and storage medium
CN113608812A (en) Remote control method, device, system and storage medium
CN110275787B (en) Online platform data transmission method, device, medium and electronic equipment
CN107911388B (en) Method and system for supervising mobile terminal application
CN112671814B (en) Cross-platform equipment development method, device and system
CN107102937B (en) User interface testing method and device
CN111061448A (en) Log information display method and device, electronic equipment and storage medium
CN108123937B (en) Multithreading monitoring method and system for monitoring mobile terminal application
CN108255547B (en) Application program control method and device
CN109683780A (en) Control method, system and the controlled terminal of mobile terminal
CN109634856B (en) IOS intelligent terminal remote real machine debugging system and method based on cloud service
CN104079634A (en) Method, device and system for displaying device interface
CN108737337B (en) Equipment processing method, device, server and system
CN116800638A (en) Network detection method, device, electronic equipment and storage medium
CN110893616B (en) Remote control method and device, computer equipment and storage medium
US20160328200A1 (en) Testing screens of a multi-screen device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant