A command execution method, device, system, equipment and storage medium

By enabling network communication services in the mobile terminal, the control terminal can directly send commands to the mobile terminal, solving the problems of cumbersome and inefficient command execution in the prior art, and achieving efficient command execution.

CN116743906BActive Publication Date: 2025-04-15JD DIGITS HAIYI INFORMATION TECHNOLOGY CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202310538688.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-05-12
Publication Date
2025-04-15
Estimated Expiration
2043-05-12

AI Technical Summary

Technical Problem

The existing command execution method requires the help of data cables, and requires the installation of command execution tools and configuration environments. The operation is cumbersome and reduces the efficiency of command execution.

Method used

By enabling network communication services between the mobile terminal and the control terminal in the mobile terminal, the control terminal can send the target command input based on the network address information of the mobile terminal to the mobile terminal, thereby realizing point-to-point direct access without the need for data lines.

Benefits of technology

It greatly simplifies command execution operations, improves command execution efficiency, and reduces dependence on USB data cables and centralized devices.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116743906B_ABST
    Figure CN116743906B_ABST
Patent Text Reader

Abstract

The embodiment of the present invention discloses a command execution method, device, system, equipment and storage medium. The method is applied to a mobile terminal, comprising: starting a network communication service between the mobile terminal and a control terminal, wherein the control terminal has a network communication function; receiving a target command sent by the control terminal through the network communication service, wherein the target command is input in the control terminal based on the network address information of the mobile terminal; and executing the received target command. Through the technical solution of the embodiment of the present invention, the command execution operation can be simplified without the need for a data line, thereby improving the efficiency of command execution.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present invention relate to computer technology, and in particular to a command execution method, apparatus, system, device and storage medium. Background Art

[0002] With the rapid development of computer technology, it is necessary to control the mobile terminal to execute specified commands, for example, to execute commands such as updating the system and installing software.

[0003] At present, a USB data cable is usually used to connect a mobile terminal to an external device, and a command execution tool and a configuration environment are installed in the external device. After the environment configuration is completed, a command is input and sent to the mobile terminal through the data cable for execution.

[0004] However, in the process of implementing the present invention, the inventors found that there are at least the following problems in the prior art:

[0005] The existing command execution method requires the use of a data cable, and requires the installation of command execution tools and configuration environment, which is cumbersome and reduces the efficiency of command execution. Summary of the invention

[0006] Embodiments of the present invention provide a command execution method, apparatus, system, device and storage medium to simplify command execution operations and improve command execution efficiency.

[0007] In a first aspect, an embodiment of the present invention provides a command execution method, which is applied to a mobile terminal and includes:

[0008] Starting a network communication service between the mobile terminal and the control terminal, wherein the control terminal has a network communication function;

[0009] Receiving, through the network communication service, a target command sent by the control terminal, wherein the target command is input in the control terminal based on the network address information of the mobile terminal;

[0010] Execute the received target command.

[0011] In a second aspect, an embodiment of the present invention provides a command execution method, which is applied to a control terminal having a network communication function, comprising:

[0012] Get the network address information of the mobile terminal;

[0013] Obtaining a target command input based on the network address information;

[0014] The target command is sent to the mobile terminal through the pre-enabled network communication service between the mobile terminal and the control terminal, so that the mobile terminal executes the received target command.

[0015] In a third aspect, an embodiment of the present invention further provides a command execution device, which is integrated in a mobile terminal and includes:

[0016] A network communication service activation module, used to activate the network communication service between the mobile terminal and the control terminal;

[0017] A target command receiving module, used for receiving a target command sent by the control terminal through the network communication service, wherein the target command is input in the control terminal based on the network address information of the mobile terminal;

[0018] The target command execution module is used to execute the received target command.

[0019] In a fourth aspect, an embodiment of the present invention further provides a command execution device, which is integrated in a control terminal having a network communication function, and includes:

[0020] A network address information acquisition module is used to obtain the network address information of the mobile terminal;

[0021] A target command acquisition module, used for inputting a target command based on the network address information;

[0022] The target command sending module is used to send the target command to the mobile terminal through the network communication service between the mobile terminal and the control terminal that is pre-opened, so that the mobile terminal executes the received target command.

[0023] In a fifth aspect, an embodiment of the present invention further provides a command execution system, the system comprising: a mobile terminal and a control terminal having a network communication function;

[0024] Wherein, the mobile terminal is used to execute the command execution method provided in the first aspect;

[0025] The control end is used to execute the command execution method provided in the second aspect.

[0026] In a sixth aspect, an embodiment of the present invention further provides an electronic device, the electronic device comprising:

[0027] one or more processors;

[0028] A memory for storing one or more programs;

[0029] When the one or more programs are executed by the one or more processors, the one or more processors implement the command execution method provided by any embodiment of the present invention.

[0030] In a seventh aspect, an embodiment of the present invention further provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements a command execution method as provided in any embodiment of the present invention.

[0031] One embodiment of the above invention has the following advantages or beneficial effects:

[0032] By enabling a network communication service between the mobile terminal and a control terminal with a network communication function in the mobile terminal, and through the network communication service, the control terminal can send a target command input based on the network address information of the mobile terminal to the mobile terminal, thereby utilizing the enabled network communication service to achieve point-to-point direct access without the aid of a data cable, and only requiring the target command to be input based on the network address information of the mobile terminal in the control terminal, without requiring any other operations, which greatly simplifies the command execution operation and improves the command execution efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0033] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0034] Figure 1 is a flowchart of a command execution method provided by an embodiment of the present invention;

[0035] Figure 2 is a flowchart of a command execution method provided by an embodiment of the present invention;

[0036] Figure 3 A schematic diagram of the structure of a command execution device provided by an embodiment of the present invention;

[0037] Figure 4 A schematic diagram of the structure of a command execution device provided by an embodiment of the invention;

[0038] Figure 5 A schematic diagram of the structure of a command execution system provided by an embodiment of the invention;

[0039] Figure 6 It is a structural schematic diagram of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0040] The present invention will be further described in detail below in conjunction with the accompanying drawings and embodiments. It is to be understood that the specific embodiments described herein are only used to explain the present invention, rather than to limit the present invention. It should also be noted that, for ease of description, only parts related to the present invention, rather than all structures, are shown in the accompanying drawings.

[0041] Figure 1 This is a flowchart of a command execution method provided by an embodiment of the present invention. This embodiment is applicable to the case where a control terminal with a network communication function sends a command to be executed to a mobile terminal for execution. The method can be executed by a command execution device, which can be implemented by software and / or hardware and integrated in the mobile terminal. Figure 1 As shown, the method specifically comprises the following steps:

[0042] S110, starting a network communication service between the mobile terminal and the control terminal, wherein the control terminal has a network communication function.

[0043] Among them, the mobile terminal may refer to any mobile device that requires external control commands to execute. For example, the mobile terminal may be but not limited to a mobile phone, a tablet computer, etc. The operating system of the mobile terminal may be but not limited to an Android system or an iOS system. The control terminal may refer to a web page terminal, a client APP with a network communication function, and other applications developed using the HTTP protocol, the WebSocket protocol, or the TCP protocol. Among them, the web page terminal may be a terminal with a web browsing function. For example, the web page terminal may refer to a browser in a terminal device such as a mobile phone, a desktop computer, or a tablet computer. The control terminal itself has a network communication function. The mobile terminal does not have the function of conducting network communication with the control terminal. The network communication service may be a service for providing information transmission between the mobile terminal and the control terminal.

[0044] Specifically, an application APP can be set in the mobile terminal, and the network communication service between the mobile terminal and the control terminal can be enabled by executing the application. For example, after the mobile terminal is started, the application can be automatically triggered to execute, thereby automatically enabling the network communication service between the mobile terminal and the control terminal in the mobile terminal. Alternatively, after the mobile terminal is started, when a command needs to be executed, the user can manually trigger the execution of the application, thereby manually enabling the network communication service between the mobile terminal and the control terminal in the mobile terminal. By enabling the network communication service in the mobile terminal, the mobile terminal has the function of communicating with the control terminal, thereby achieving point-to-point direct access without the need for connection via a data cable, and quickly enabling command execution on the mobile terminal.

[0045] Exemplarily, S110 may include: opening a socket port; and opening a network communication service between the mobile terminal and the control terminal through the socket port based on a preset network communication protocol.

[0046] Among them, the socket port Socket may refer to the interface for the application to communicate through the network protocol, and is also the interface for the application to interact with the network protocol stack. The preset network communication protocol may be a network communication protocol pre-set based on business needs. For example, the preset network communication protocol may include but is not limited to: Hypertext Transfer Protocol or WebSocket Protocol. Among them, the Hypertext Transfer Protocol (HTTP) is a request-response protocol. The WebSocket protocol is a protocol for full-duplex communication on a single TCP (Transmission Control Protocol) connection. WebSocket allows the mobile terminal to actively push data to the control terminal. In WebSocket, the control terminal and the mobile terminal only need to complete a handshake, and a persistent connection can be directly created between the two, and two-way data transmission can be carried out.

[0047] Specifically, a socket port can be opened in the application of the mobile terminal. Through the socket port, a network communication service based on the Hypertext Transfer Protocol can be opened, that is, a virtual Http Server service is opened in the mobile terminal. Or, through the socket port, a network communication service based on the WebSocket protocol can be opened, that is, a virtual WebSocket Server service is opened in the mobile terminal. Among them, Http Server refers to an Http application server based on the Socket layer. WebSocket Server also refers to a WebSocket application server based on the Socket layer.

[0048] S120. Receive a target command sent by the control terminal through a network communication service. The target command is input into the control terminal based on the network address information of the mobile terminal.

[0049] Among them, the target command may refer to a command to be executed by the mobile terminal. For example, the target command may be a system update command, a software installation command, a mobile terminal log capture command, or a mobile terminal status acquisition command, etc. The number of target commands may be one or more, and the specific number is determined by user input. The network address information of the mobile terminal can be used to characterize the location information of the network communication service enabled in the mobile terminal. The network address information of the mobile terminal may include the mobile terminal IP address information and the port number information; or, the network address information may include the mobile terminal domain name information and the port number information. Among them, the mobile terminal IP address information and the mobile terminal domain name information can be used to characterize the specific network location of the mobile terminal. The port number information may refer to the port number of the network communication service enabled in the mobile terminal, so as to distinguish different application services in the network.

[0050] Specifically, the network address information of the mobile terminal can be queried from the mobile terminal log, and all target commands that need to be executed can be input in the control terminal based on the network address information of the mobile terminal. For example, the network address information of the mobile terminal is input in the page search box of the control terminal, so that the control terminal determines and displays the target page corresponding to the network address information. On the target page, the user can input all target commands that need to be executed, and after the input is completed, the sending operation of the target command can be triggered by clicking the submit button. For another example, the network address information of the mobile terminal can be input in the network configuration interface of the control terminal to complete the network configuration, and all target commands that need to be executed can be input in the command control page of the control terminal, so that the control terminal can send all the input target commands to the mobile terminal through the network communication service. Through the network communication service, the mobile terminal can receive all the target commands that currently need to be executed.

[0051] It should be noted that when the control terminal is a web terminal, the target page opened in the control terminal based on the network address information of the mobile terminal comes from the mobile terminal, and the corresponding target page can be pre-configured in the mobile terminal. For example, after the network address information of the mobile terminal is input in the control terminal, the control terminal can directly obtain the target page for inputting instructions from the mobile terminal and display the target page in the control terminal. The control terminal can communicate directly with the mobile terminal without relying on the central server, thereby realizing decentralized command execution and improving command execution efficiency.

[0052] S130: Execute the received target command.

[0053] Specifically, after receiving all target commands, the mobile terminal can parse each target command and execute each target command, thereby completing the command execution operation. During the entire command execution process, the user only needs to input the target command based on the network address information of the mobile terminal in the control terminal, without any other operations, reducing the dependence on USB data cables and centralized devices, thereby greatly simplifying the command execution operation and improving the command execution efficiency. And realize the mobile terminal command execution of a single node.

[0054] The technical solution of this embodiment is to enable the network communication service between the mobile terminal and the control terminal in the mobile terminal, and through the network communication service, the control terminal can send the target command input based on the network address information of the mobile terminal to the mobile terminal, so that point-to-point direct access can be achieved by utilizing the enabled network communication service without the aid of a data cable, and only the target command needs to be input in the control terminal based on the network address information of the mobile terminal, without the need for other operations, which greatly simplifies the command execution operation and improves the command execution efficiency.

[0055] Figure 2This is a flowchart of a command execution method provided by an embodiment of the present invention. This embodiment is applicable to the case where a control terminal with a network communication function sends a command to be executed to a mobile terminal for execution. The method can be executed by a command execution device, which can be implemented by software and / or hardware and integrated in a control terminal with a network communication function. Figure 2 As shown, the method specifically comprises the following steps:

[0056] S210: Obtain network address information of the mobile terminal.

[0057] Among them, the mobile terminal may refer to any mobile device that requires external control commands to execute. For example, the mobile terminal may be but not limited to a mobile phone, a tablet computer, etc. The operating system of the mobile terminal may be but not limited to an Android system or an iOS system. The control terminal may refer to a web page terminal, a client with network communication function, and other applications developed using HTTP protocol, WebSocket protocol or TCP protocol. Among them, the web page terminal may refer to a terminal with a web browsing function. For example, the web page terminal may refer to a browser in a terminal device such as a mobile phone, a desktop computer, or a tablet computer. The control terminal itself has a network communication function. The mobile terminal does not have the function of conducting network communication with the control terminal.

[0058] The network address information of the mobile terminal can be used to characterize the location information of the network communication service opened in the mobile terminal. The network address information of the mobile terminal can include the mobile terminal IP address information and port number information; or the network address information can include the mobile terminal domain name information and port number information. The mobile terminal IP address information and the mobile terminal domain name information can be used to characterize the specific network location of the mobile terminal. The port number information can refer to the port number of the network communication service opened in the mobile terminal, so as to distinguish different application services in the network.

[0059] Specifically, the network address information of the mobile terminal can be queried from the mobile terminal log, and the network address information of the mobile terminal can be input into the control terminal. For example, the network address information of the mobile terminal can be input into the page search box of the control terminal. Alternatively, the network address information of the mobile terminal can be input into the network configuration interface of the control terminal, so that the control terminal can obtain the network address information of the mobile terminal input by the user.

[0060] S220: Obtain a target command based on the network address information input.

[0061] The target command may refer to a command to be executed by the mobile terminal. For example, the target command may be a system update command, a software installation command, a mobile terminal log capture command, or a mobile terminal status acquisition command. The number of target commands may be one or more, and the specific number is determined by user input.

[0062] Specifically, all target commands that need to be executed can be input in the control terminal based on the obtained network address information of the mobile terminal, so that the control terminal can obtain all target commands input by the user.

[0063] Exemplarily, S220 may include: displaying a target page corresponding to the mobile terminal based on the network address information; and acquiring a target command input on the target page. The target page may be a pre-set page for configuring commands to be executed on the mobile terminal.

[0064] Specifically, the control terminal can determine and display the target page corresponding to the network address information of the mobile terminal based on the network address information of the mobile terminal entered by the user in the page search box. On the target page, the user can enter all the target commands that need to be executed, and after the input is completed, the control terminal can obtain all the target commands entered by the user by clicking the submit button, and trigger the sending operation of the target commands. Alternatively, after the network address information of the mobile terminal is entered in the network configuration interface of the control terminal to complete the network configuration, all the target commands that need to be executed can be entered in the command control page of the control terminal.

[0065] It should be noted that when the control terminal is a web terminal, the target page opened in the control terminal based on the network address information of the mobile terminal comes from the mobile terminal, and the corresponding target page can be pre-configured in the mobile terminal. For example, after the network address information of the mobile terminal is input in the control terminal, the control terminal can directly obtain the target page for inputting instructions from the mobile terminal and display the target page in the control terminal. The control terminal can communicate directly with the mobile terminal without relying on the central server, thereby realizing decentralized command execution and improving command execution efficiency.

[0066] S230: Send the target command to the mobile terminal through the pre-enabled network communication service between the mobile terminal and the control terminal, so that the mobile terminal executes the received target command.

[0067] Among them, the network communication service can be a service for providing information transmission between the mobile terminal and the control terminal. Specifically, the network communication service between the mobile terminal and the control terminal can be pre-enabled in the mobile terminal. The specific activation process of the network communication service is: a socket port is opened in the mobile terminal, and through the socket port, based on the preset network communication protocol, the network communication service between the mobile terminal and the control terminal is enabled. For example, through the opened socket port, a network communication service based on the hypertext transfer protocol can be enabled, that is, a virtual HttpServer service is enabled in the mobile terminal. Alternatively, through the opened socket port, a network communication service based on the WebSocket protocol can be enabled, that is, a virtual WebSocket Server service is enabled in the mobile terminal. By enabling the network communication service in the mobile terminal, the mobile terminal has the function of communicating with the control terminal, thereby realizing point-to-point direct access, without the need for connection via a data cable, and quickly realizing command execution of the mobile terminal.

[0068] After the mobile terminal starts the network communication service, the control terminal can send all the obtained target commands to the mobile terminal through the network communication service. The mobile terminal can receive all the target commands that need to be executed currently through the network communication service, and parse each received target command and execute each target command, thereby completing the command execution operation.

[0069] It should be noted that during the entire command execution process, the user only needs to input the target command based on the network address information of the mobile terminal in the control terminal, without any other operations, reducing the dependence on USB data cables and centralized devices, thereby greatly simplifying the command execution operation and improving the command execution efficiency. And realize the mobile terminal command execution of a single node.

[0070] The technical solution of this embodiment is to enable the network communication service between the mobile terminal and the control terminal in the mobile terminal, and through the network communication service, the control terminal can send the target command input based on the network address information of the mobile terminal to the mobile terminal, so that point-to-point direct access can be achieved by utilizing the enabled network communication service without the aid of a data cable, and only the target command needs to be input in the control terminal based on the network address information of the mobile terminal, without the need for other operations, which greatly simplifies the command execution operation and improves the command execution efficiency.

[0071] On the basis of the above technical solution, after S230, the method further includes: obtaining the execution result of the target command through the network communication service; and displaying the execution result of the target command.

[0072] Specifically, the control end can obtain the execution result of each input target command in the mobile end through the network communication service, and display the execution result of each command in the preset display area of ​​the control end, so that the user can more conveniently understand the execution status of each command, greatly improving the user experience.

[0073] Exemplarily, if the preset network communication protocol in the network communication service is the Hypertext Transfer Protocol, a request for obtaining an execution result is sent to the mobile terminal, and the execution result of the target command returned by the mobile terminal based on the result acquisition request is received; if the preset network communication protocol in the network communication service is the WebSocket protocol, the execution result of the target command sent by the mobile terminal after the execution of the target command is completed is received.

[0074] Among them, the Hypertext Transfer Protocol is a request-response protocol. The WebSocket protocol is a protocol for full-duplex communication over a single TCP connection. WebSocket allows the mobile terminal to actively push data to the control terminal.

[0075] Specifically, when the enabled network communication service is a virtual Http Server service, after sending the target command to the mobile terminal, a polling method can be used to send an execution result acquisition request to the mobile terminal. The mobile terminal responds to the received execution result acquisition request and returns the obtained execution result of the target command, so that the control terminal can actively obtain the execution result of the target command. When the enabled network communication service is a virtual WebSocket Server service, when the target command is executed, the mobile terminal can use a real-time push method to directly send the execution result of the target command to the control terminal without sending a request, so that the control terminal can obtain the execution result of the target command more quickly.

[0076] The following is an embodiment of a command execution device provided in an embodiment of the present invention. The device and the command execution method applied to a mobile terminal in the above-mentioned embodiment belong to the same inventive concept. For details not described in detail in the embodiment of the command execution device, reference can be made to the embodiment of the above-mentioned command execution method applied to a mobile terminal.

[0077] Figure 3 This is a schematic diagram of the structure of a command execution device provided by an embodiment of the present invention. This embodiment is applicable to the case where a control terminal with a network communication function sends a command to be executed to a mobile terminal for execution. Figure 3 As shown, the device is integrated in a mobile terminal, and specifically includes: a network communication service starting module 310, a target command receiving module 320 and a target command executing module 330.

[0078] Among them, the network communication service activation module 310 is used to activate the network communication service between the mobile terminal and the control terminal, wherein the control terminal has a network communication function; the target command receiving module 320 is used to receive the target command sent by the control terminal through the network communication service, and the target command is input in the control terminal based on the network address information of the mobile terminal; the target command execution module 330 is used to execute the received target command.

[0079] The technical solution of this embodiment is to enable the network communication service between the mobile terminal and the control terminal in the mobile terminal, and through the network communication service, the control terminal can send the target command input based on the network address information of the mobile terminal to the mobile terminal, so that point-to-point direct access can be achieved by utilizing the enabled network communication service without the aid of a data cable, and only the target command needs to be input in the control terminal based on the network address information of the mobile terminal, without the need for other operations, which greatly simplifies the command execution operation and improves the command execution efficiency.

[0080] Optionally, the network communication service activation module 310 is specifically configured to:

[0081] Opening a socket port; and opening a network communication service between the mobile terminal and the control terminal through the socket port based on a preset network communication protocol.

[0082] Optionally, the preset network communication protocol includes: Hypertext Transfer Protocol or WebSocket Protocol.

[0083] Optionally, the network address information of the mobile terminal includes mobile terminal IP address information and port number information; or, the network address information includes mobile terminal domain name information and port number information.

[0084] The command execution device provided in the embodiment of the present invention can execute the command execution method applied to the mobile terminal provided in the embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the method.

[0085] The following is an embodiment of the command execution device provided in an embodiment of the present invention. The device and the command execution method applied to the control end in the above-mentioned embodiment belong to the same inventive concept. For details not described in detail in the embodiment of the command execution device, reference can be made to the embodiment of the above-mentioned command execution method applied to the control end.

[0086] Figure 4 This is a schematic diagram of the structure of a command execution device provided by an embodiment of the present invention. This embodiment is applicable to the case where a control terminal sends a command to be executed to a mobile terminal for execution. Figure 4As shown, the device is integrated in a control terminal with a network communication function, and specifically includes: a network address information acquisition module 410, a target command acquisition module 420 and a target command sending module 430.

[0087] Among them, the network address information acquisition module 410 is used to obtain the network address information of the mobile terminal; the target command acquisition module 420 is used to input the target command based on the network address information; the target command sending module 430 is used to send the target command to the mobile terminal through the network communication service between the mobile terminal and the control terminal that is pre-opened, so that the mobile terminal executes the received target command.

[0088] The technical solution of this embodiment is to enable the network communication service between the mobile terminal and the control terminal in the mobile terminal, and through the network communication service, the control terminal can send the target command input based on the network address information of the mobile terminal to the mobile terminal, so that point-to-point direct access can be achieved by utilizing the enabled network communication service without the aid of a data cable, and only the target command needs to be input in the control terminal based on the network address information of the mobile terminal, without the need for other operations, which greatly simplifies the command execution operation and improves the command execution efficiency.

[0089] Optionally, the target command acquisition module 420 is specifically configured to:

[0090] Based on the network address information, a target page corresponding to the mobile terminal is displayed; and a target command input on the target page is obtained.

[0091] Optionally, the device further comprises:

[0092] An execution result acquisition module, used to acquire the execution result of the target command through the network communication service after sending the target command to the mobile terminal;

[0093] The execution result display module is used to display the execution result of the target command.

[0094] Optionally, the execution result acquisition module is specifically used to:

[0095] If the preset network communication protocol in the network communication service is the Hypertext Transfer Protocol, sending an execution result acquisition request to the mobile terminal, and receiving the execution result of the target command returned by the mobile terminal based on the result acquisition request;

[0096] If the preset network communication protocol in the network communication service is the WebSocket protocol, the execution result of the target command sent by the mobile terminal after the execution of the target command is completed is received.

[0097] The command execution device provided in the embodiment of the present invention can execute the command execution method applied to the control end provided in the embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the method.

[0098] It is worth noting that in the embodiment of the above-mentioned command execution device, the various units and modules included are only divided according to functional logic, but are not limited to the above-mentioned division, as long as the corresponding functions can be achieved; in addition, the specific names of the functional units are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of the present invention.

[0099] Figure 5 This is a schematic diagram of the structure of a command execution system provided by an embodiment of the present disclosure. This embodiment is applicable to the case where a control terminal sends a command to be executed to a mobile terminal for execution. Figure 5 As shown, the system specifically includes: a mobile terminal 510 and a control terminal 520 with a network communication function.

[0100] The mobile terminal 510 is used to execute the command execution method provided in the above embodiment and applied to the mobile terminal 510. The control terminal 520 is used to execute the command execution method provided in the above embodiment and applied to the control terminal 520.

[0101] The command execution system in the disclosed embodiment enables a network communication service between the mobile terminal and a control terminal having a network communication function in the mobile terminal. Through the network communication service, the control terminal can send a target command input based on the network address information of the mobile terminal to the mobile terminal, thereby utilizing the enabled network communication service to achieve point-to-point direct access without the aid of a data cable, and only requires inputting the target command based on the network address information of the mobile terminal in the control terminal without requiring any other operations, thereby greatly simplifying the command execution operation and improving the command execution efficiency.

[0102] Figure 6 A schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. Figure 6 A block diagram of an exemplary electronic device 12 suitable for use in implementing embodiments of the present invention is shown. Figure 6 The electronic device 12 shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present invention.

[0103] like Figure 6 As shown, the electronic device 12 is in the form of a general purpose computing device. The components of the electronic device 12 may include, but are not limited to: one or more processors or processing units 16, a system memory 28, and a bus 18 that connects various system components (including the system memory 28 and the processing unit 16).

[0104] Bus 18 represents one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, a processor or a local bus using any of a variety of bus architectures. By way of example, these architectures include, but are not limited to, an Industry Standard Architecture (ISA) bus, a Micro Channel Architecture (MAC) bus, an Enhanced ISA bus, a Video Electronics Standards Association (VESA) local bus, and a Peripheral Component Interconnect (PCI) bus.

[0105] The electronic device 12 typically includes a variety of computer system readable media. These media can be any available media that can be accessed by the electronic device 12, including volatile and non-volatile media, removable and non-removable media.

[0106] The system memory 28 may include computer system readable media in the form of volatile memory, such as random access memory (RAM) 30 and / or cache memory 32. The electronic device 12 may further include other removable / non-removable, volatile / non-volatile computer system storage media. By way of example only, the storage system 34 may be used to read and write non-removable, non-volatile magnetic media ( Figure 6 not shown, usually called a "hard drive"). Although Figure 6 Not shown in the figure, a disk drive for reading and writing to a removable non-volatile disk (e.g., a "floppy disk"), and an optical disk drive for reading and writing to a removable non-volatile optical disk (e.g., a CD-ROM, a DVD-ROM, or other optical media) may be provided. In these cases, each drive may be connected to the bus 18 via one or more data medium interfaces. The system memory 28 may include at least one program product having a set (e.g., at least one) of program modules that are configured to perform the functions of the various embodiments of the present invention.

[0107] A program / utility 40 having a set (at least one) of program modules 42 may be stored, for example, in system memory 28, such program modules 42 including, but not limited to, an operating system, one or more application programs, other program modules, and program data, each of which or some combination may include an implementation of a network environment. Program modules 42 generally perform the functions and / or methods of the embodiments described herein.

[0108] The electronic device 12 may also communicate with one or more external devices 14 (e.g., keyboards, pointing devices, displays 24, etc.), may communicate with one or more devices that enable a user to interact with the electronic device 12, and / or may communicate with any device that enables the electronic device 12 to communicate with one or more other computing devices (e.g., network cards, modems, etc.). Such communication may be performed via an input / output (I / O) interface 22. Furthermore, the electronic device 12 may also communicate with one or more networks (e.g., local area networks (LANs), wide area networks (WANs), and / or public networks, such as the Internet) via a network adapter 20. As shown, the network adapter 20 communicates with other modules of the electronic device 12 via a bus 18. It should be understood that, although not shown in the figure, other hardware and / or software modules may be used in conjunction with the electronic device 12, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.

[0109] The processing unit 16 executes various functional applications and data processing by running the program stored in the system memory 28, for example, implementing the command execution method steps applied to the mobile terminal provided in the embodiment of the present invention, the method comprising:

[0110] Start a network communication service between the mobile terminal and the control terminal, wherein the control terminal has a network communication function; receive a target command sent by the control terminal through the network communication service, wherein the target command is input in the control terminal based on the network address information of the mobile terminal; and execute the received target command.

[0111] Alternatively, the command execution method steps for a control terminal with a network communication function provided in the embodiment of the present invention are implemented, and the method includes:

[0112] Acquire network address information of the mobile terminal; acquire a target command input based on the network address information; send the target command to the mobile terminal through a pre-enabled network communication service between the mobile terminal and the control terminal, so that the mobile terminal executes the received target command.

[0113] Of course, those skilled in the art can understand that the processor can also implement the technical solution of the command execution method provided by any embodiment of the present invention.

[0114] This embodiment provides a computer-readable storage medium, on which a computer program is stored. When the program is executed by a processor, the command execution method for a mobile terminal provided in an embodiment of the present invention is implemented. The method includes:

[0115] Start a network communication service between the mobile terminal and the control terminal, wherein the control terminal has a network communication function; receive a target command sent by the control terminal through the network communication service, wherein the target command is input in the control terminal based on the network address information of the mobile terminal; and execute the received target command.

[0116] Alternatively, when the program is executed by the processor, the steps of the command execution method applied to the control terminal with network communication function provided by the embodiment of the present invention are implemented, and the method includes:

[0117] Acquire network address information of the mobile terminal; acquire a target command input based on the network address information; send the target command to the mobile terminal through a pre-enabled network communication service between the mobile terminal and the control terminal, so that the mobile terminal executes the received target command.

[0118] The computer storage medium of the embodiment of the present invention can adopt any combination of one or more computer-readable media. The computer-readable medium can be a computer-readable signal medium or a computer-readable storage medium. The computer-readable storage medium can be, for example, but not limited to: an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples (non-exhaustive list) of computer-readable storage media include: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this document, a computer-readable storage medium can be any tangible medium containing or storing a program, which can be used by an instruction execution system, device or device or used in combination with it.

[0119] Computer-readable signal media may include data signals propagated in baseband or as part of a carrier wave, which carry computer-readable program code. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than a computer-readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device.

[0120] The program code embodied on the computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.

[0121] Computer program code for performing the operations of the present invention may be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages ​​such as Java, Smalltalk, C++, and conventional procedural programming languages ​​such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0122] It should be understood by those skilled in the art that the modules or steps of the present invention described above can be implemented by a general-purpose computing device, they can be concentrated on a single computing device, or distributed on a network composed of multiple computing devices, optionally, they can be implemented by a program code executable by a computer device, so that they can be stored in a storage device and executed by the computing device, or they can be made into individual integrated circuit modules, or multiple modules or steps therein can be made into a single integrated circuit module for implementation. Thus, the present invention is not limited to any specific combination of hardware and software.

[0123] Note that the above are only preferred embodiments of the present invention and the technical principles used. Those skilled in the art will understand that the present invention is not limited to the specific embodiments described herein, and that various obvious changes, readjustments and substitutions can be made by those skilled in the art without departing from the scope of protection of the present invention. Therefore, although the present invention has been described in more detail through the above embodiments, the present invention is not limited to the above embodiments, and may include more other equivalent embodiments without departing from the concept of the present invention, and the scope of the present invention is determined by the scope of the appended claims.

Claims

1. A command execution method, characterized in that: Applied to mobile terminals, including: Starting a network communication service between the mobile terminal and the control terminal, wherein the control terminal has a network communication function; Receiving, through the network communication service, a target command sent by the control terminal, wherein the target command is input in a target page opened in the control terminal based on the network address information of the mobile terminal, wherein the target page is pre-configured in the mobile terminal, and the network address information of the mobile terminal is used to represent the location information of the network communication service opened in the mobile terminal; Execute the received target command.

2. The method according to claim 1, characterized in that The starting of the network communication service between the mobile terminal and the control terminal includes: Open the socket port; Through the socket port, based on a preset network communication protocol, a network communication service between the mobile terminal and the control terminal is enabled.

3. The method according to claim 2, characterized in that The preset network communication protocol includes: Hypertext Transfer Protocol or WebSocket Protocol.

4. The method according to any one of claims 1 to 3, characterized in that: The network address information of the mobile terminal includes the mobile terminal IP address information and port number information; or, the network address information includes the mobile terminal domain name information and port number information.

5. A command execution method, characterized in that: Applicable to control terminals with network communication functions, including: Acquire network address information of the mobile terminal, where the network address information of the mobile terminal is used to represent location information of a network communication service enabled in the mobile terminal; Obtaining a target command input based on the network address information; Sending the target command to the mobile terminal through the pre-enabled network communication service between the mobile terminal and the control terminal, so that the mobile terminal executes the received target command; Among them, the control terminal is a web page terminal, and the target page opened in the control terminal based on the network address information of the mobile terminal originates from the mobile terminal, and the target page is pre-configured by the mobile terminal.

6. The method according to claim 5, characterized in that The obtaining of a target command input based on the network address information includes: Based on the network address information, display the target page corresponding to the mobile terminal; Get the target command entered on the target page.

7. The method according to claim 5, characterized in that After sending the target command to the mobile terminal, the method further includes: Obtaining the execution result of the target command through the network communication service; Display the execution result of the target command.

8. The method according to claim 7, characterized in that The obtaining the execution result of the target command through the network communication service includes: If the preset network communication protocol in the network communication service is the Hypertext Transfer Protocol, sending an execution result acquisition request to the mobile terminal, and receiving the execution result of the target command returned by the mobile terminal based on the result acquisition request; If the preset network communication protocol in the network communication service is the WebSocket protocol, the execution result of the target command sent by the mobile terminal after the execution of the target command is completed is received.

9. A command execution device, characterized in that: Integrated on mobile devices, including: A network communication service activation module, used to activate the network communication service between the mobile terminal and the control terminal, wherein the control terminal has a network communication function; a target command receiving module, used to receive a target command sent by a control terminal through the network communication service, wherein the target command is input in a target page opened in the control terminal based on the network address information of the mobile terminal, wherein the target page is pre-configured in the mobile terminal, and the network address information of the mobile terminal is used to represent the location information of the network communication service opened in the mobile terminal; The target command execution module is used to execute the received target command.

10. A command execution device, characterized in that: Integrated in the control terminal with network communication function, including: A network address information acquisition module, used to acquire network address information of a mobile terminal, wherein the network address information of the mobile terminal is used to represent location information of a network communication service enabled in the mobile terminal; A target command acquisition module, used for inputting a target command based on the network address information; A target command sending module, used to send the target command to the mobile terminal through the network communication service between the mobile terminal and the control terminal that is opened in advance, so that the mobile terminal executes the received target command; Among them, the control terminal is a web page terminal, and the target page opened in the control terminal based on the network address information of the mobile terminal originates from the mobile terminal, and the target page is pre-configured by the mobile terminal.

11. A command execution system, characterized in that: The system comprises: a mobile terminal and a control terminal having a network communication function; Wherein, the mobile terminal is used to execute the command execution method as described in any one of claims 1 to 4; The control end is used to execute the command execution method as described in any one of claims 5-8.

12. An electronic device, characterized in that: The electronic device comprises: one or more processors; A memory for storing one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors implement the command execution method as described in any one of claims 1 to 8.

13. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the command execution method as described in any one of claims 1 to 8 is implemented.

Citation Information

Patent Citations

  • Method, device and equipment for executing Android system command and medium

    CN109871288A

  • Remote terminal control method and device, computer equipment and storage medium

    CN114338632A

  • Through wireless control system who removes equipment operation

    CN204904015U