CN114095495B - Terminal control method, device, storage medium and apparatus - Google Patents

Terminal control method, device, storage medium and apparatus Download PDF

Info

Publication number
CN114095495B
CN114095495B CN202111427728.9A CN202111427728A CN114095495B CN 114095495 B CN114095495 B CN 114095495B CN 202111427728 A CN202111427728 A CN 202111427728A CN 114095495 B CN114095495 B CN 114095495B
Authority
CN
China
Prior art keywords
terminal
execution
control instruction
catalog
management script
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
CN202111427728.9A
Other languages
Chinese (zh)
Other versions
CN114095495A (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 Qihoo Technology Co Ltd
Original Assignee
Beijing Qihoo 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 Qihoo Technology Co Ltd filed Critical Beijing Qihoo Technology Co Ltd
Priority to CN202111427728.9A priority Critical patent/CN114095495B/en
Publication of CN114095495A publication Critical patent/CN114095495A/en
Application granted granted Critical
Publication of CN114095495B publication Critical patent/CN114095495B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/06Protocols specially adapted for file transfer, e.g. file transfer protocol [FTP]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44505Configuring for program initiating, e.g. using registry, configuration files
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/04Processing captured monitoring data, e.g. for logfile generation
    • H04L43/045Processing captured monitoring data, e.g. for logfile generation for graphical visualisation of monitoring data
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/12Protocols specially adapted for proprietary or special-purpose networking environments, e.g. medical networks, sensor networks, networks in vehicles or remote metering networks
    • H04L67/125Protocols specially adapted for proprietary or special-purpose networking environments, e.g. medical networks, sensor networks, networks in vehicles or remote metering networks involving control of end-device applications over a network
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02PCLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
    • Y02P90/00Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
    • Y02P90/02Total factory control, e.g. smart factories, flexible manufacturing systems [FMS] or integrated manufacturing systems [IMS]

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Software Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Theoretical Computer Science (AREA)
  • Medical Informatics (AREA)
  • General Health & Medical Sciences (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computing Systems (AREA)
  • Health & Medical Sciences (AREA)
  • Stored Programmes (AREA)

Abstract

The invention relates to the technical field of Internet, and discloses a terminal control method, equipment, a storage medium and a device, wherein the method comprises the following steps: when an interface call request is received, task parameters of a preset workflow processing platform are obtained, a target file is downloaded from a file server according to the task parameters, an execution catalog of a preset management script is generated according to the target file, a control instruction is generated according to the preset management script and the execution catalog, and the control instruction is sent to a target terminal so that the target terminal executes the control instruction; when receiving the interface call request, the invention generates the execution catalog of the preset management script based on the task parameters of the preset workflow processing platform, and sends the control instruction to the target terminal according to the preset management script and the execution catalog, thereby controlling the target terminal based on the traceable execution catalog and further realizing the visualization and traceability of the terminal control.

Description

Terminal control method, device, storage medium and apparatus
Technical Field
The present invention relates to the field of internet technologies, and in particular, to a terminal control method, a device, a storage medium, and a device.
Background
Currently, a cloud platform is used as a core management system to generally manage a large number of windows and Linux terminals. However, in the prior art, when the cloud platform controls the terminal, the control process cannot be traced back, and the visualization is poor.
The foregoing is provided merely for the purpose of facilitating understanding of the technical solutions of the present invention and is not intended to represent an admission that the foregoing is prior art.
Disclosure of Invention
The invention mainly aims to provide a terminal control method, equipment, a storage medium and a device, and aims to solve the technical problems that a cloud platform cannot trace back a control process and is poor in visualization when the cloud platform controls a terminal in the prior art.
In order to achieve the above object, the present invention provides a terminal control method, comprising the steps of:
when an interface call request is received, acquiring task parameters of a preset workflow processing platform;
downloading a target file from a file server according to the task parameters, and generating an execution catalog of a preset management script according to the target file;
generating a control instruction according to the preset management script and the execution catalog, and sending the control instruction to a target terminal so that the target terminal executes the control instruction.
Optionally, before the step of downloading the target file from the file server according to the task parameter and generating the execution catalog of the preset management script according to the target file, the method further includes:
acquiring the calling times of a preset management script, and judging whether the preset management script is called for the first time or not according to the calling times;
and when the preset management script is called for the first time, configuring the preset management script.
Optionally, the step of configuring the preset management script when the preset management script is called for the first time includes:
when the preset management script is called for the first time, initializing a virtual running environment corresponding to the preset management script;
and installing a file package corresponding to the preset management script so as to configure the preset management script.
Optionally, the step of downloading the target file from the file server according to the task parameter and generating the execution catalog of the preset management script according to the target file includes:
determining a file storage address according to the task parameters, and downloading a target file from a file server according to the file storage address;
And acquiring configuration information of a preset management script, and generating an execution catalog of the preset management script according to the configuration information and the target file.
Optionally, the step of obtaining configuration information of a preset management script and generating an execution catalog of the preset management script according to the configuration information and the target file includes:
acquiring configuration information of a preset management script, and generating an initial catalog of the preset management script according to the configuration information and the target file;
and acquiring the history control information of the target terminal, and adjusting the initial catalog according to the history control information to obtain an execution catalog of the preset management script.
Optionally, the step of generating a control instruction according to the preset management script and the execution catalog, and sending the control instruction to a target terminal, so that the target terminal executes the control instruction includes:
determining a configuration file according to the execution catalog, and executing the preset management script according to the configuration file to generate a control instruction;
and sending the control instruction to a target terminal so that the target terminal executes the control instruction.
Optionally, before the step of sending the control instruction to the target terminal to enable the target terminal to execute the control instruction, the method further includes:
acquiring terminal information of a target terminal, and carrying out security verification on the target terminal according to the terminal information;
accordingly, the sending the control instruction to the target terminal so that the target terminal executes the control instruction includes:
and when the verification is passed, the control instruction is sent to the target terminal, so that the target terminal executes the control instruction.
Optionally, after the step of generating the control instruction according to the preset management script and the execution catalog and sending the control instruction to the target terminal to enable the target terminal to execute the control instruction, the method further includes:
receiving an execution result fed back by the target terminal according to the control instruction;
and when the execution result is that the execution fails, the control instruction is sent to the target terminal again, so that the target terminal executes the control instruction.
Optionally, when the execution result is that the execution fails, the step of retransmitting the control instruction to the target terminal so that the target terminal executes the control instruction further includes:
Receiving a re-execution result fed back by the target terminal according to the control instruction;
when the re-execution result is that the execution fails, generating reminding information and sending the reminding information to a management terminal;
and receiving a manual control instruction fed back by the management terminal, and sending the manual control instruction to the target terminal.
Optionally, the step of generating the reminding information and sending the reminding information to the management terminal when the re-execution result is that the execution fails includes:
when the re-execution result is that the execution fails, determining control information according to the execution catalog and the control instruction;
generating reminding information according to the control information, and sending the reminding information to a management terminal.
Optionally, after the step of receiving the manual control instruction fed back by the management terminal and sending the manual control instruction to the target terminal, the method further includes:
generating a control log according to the execution result, the re-execution result and the control instruction;
and storing the control log into a storage space corresponding to the target terminal.
Optionally, the step of acquiring task parameters of the preset workflow processing platform when the interface call request is received includes:
When an interface call request is received, starting a preset workflow processing platform;
and acquiring task parameters of the preset workflow processing platform.
In addition, in order to achieve the above object, the present invention also proposes a terminal control device comprising a memory, a processor and a terminal control program stored on the memory and executable on the processor, the terminal control program being configured to implement the terminal control method as described above.
In addition, in order to achieve the above object, the present invention also proposes a storage medium having stored thereon a terminal control program which, when executed by a processor, implements the terminal control method as described above.
In addition, to achieve the above object, the present invention also proposes a terminal control device including: the system comprises a parameter acquisition module, a catalog generation module and an instruction generation module;
the parameter acquisition module is used for acquiring task parameters of a preset workflow processing platform when receiving an interface call request;
the catalog generation module is used for downloading a target file from a file server according to the task parameters and generating an execution catalog of a preset management script according to the target file;
The instruction generation module is used for generating a control instruction according to the preset management script and the execution catalog, and sending the control instruction to a target terminal so that the target terminal executes the control instruction.
Optionally, the terminal control device further includes: a script configuration module;
the script configuration module is used for acquiring the calling times of a preset management script and judging whether the preset management script is called for the first time or not according to the calling times;
the script configuration module is further configured to configure the preset management script when the preset management script is called for the first time.
Optionally, the script configuration module is further configured to initialize a virtual running environment corresponding to the preset management script when the preset management script is called for the first time;
the script configuration module is further configured to install a file packet corresponding to the preset management script, so as to configure the preset management script.
Optionally, the catalog generating module is further configured to determine a file storage address according to the task parameter, and download the target file from the file server according to the file storage address;
The catalog generation module is further used for acquiring configuration information of a preset management script and generating an execution catalog of the preset management script according to the configuration information and the target file.
Optionally, the catalog generation module is further configured to obtain configuration information of a preset management script, and generate an initial catalog of the preset management script according to the configuration information and the target file;
the catalog generation module is also used for acquiring the history control information of the target terminal, and adjusting the initial catalog according to the history control information to obtain an execution catalog of the preset management script.
Optionally, the instruction generating module is further configured to determine a configuration file according to the execution catalog, and execute the preset management script according to the configuration file to generate a control instruction;
the instruction generating module is further configured to send the control instruction to a target terminal, so that the target terminal executes the control instruction.
When an interface call request is received, task parameters of a preset workflow processing platform are acquired, a target file is downloaded from a file server according to the task parameters, an execution catalog of a preset management script is generated according to the target file, a control instruction is generated according to the preset management script and the execution catalog, and the control instruction is sent to a target terminal so that the target terminal executes the control instruction; when receiving the interface call request, the invention generates the execution catalog of the preset management script based on the task parameters of the preset workflow processing platform, and sends the control instruction to the target terminal according to the preset management script and the execution catalog, thereby controlling the target terminal based on the traceable execution catalog and further realizing the visualization and traceability of the terminal control.
Drawings
Fig. 1 is a schematic structural diagram of a terminal control device of a hardware running environment according to an embodiment of the present invention;
fig. 2 is a schematic flow chart of a first embodiment of a terminal control method according to the present invention;
FIG. 3 is a flowchart of a second embodiment of the terminal control method of the present invention;
FIG. 4 is a flowchart of a third embodiment of a terminal control method according to the present invention;
fig. 5 is a block diagram showing the structure of a first embodiment of the terminal control device of the present invention.
The achievement of the objects, functional features and advantages of the present invention will be further described with reference to the accompanying drawings, in conjunction with the embodiments.
Detailed Description
It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the invention.
Referring to fig. 1, fig. 1 is a schematic diagram of a terminal control device of a hardware running environment according to an embodiment of the present invention.
As shown in fig. 1, the terminal control apparatus may include: a processor 1001, such as a central processing unit (Central Processing Unit, CPU), a communication bus 1002, a user interface 1003, a network interface 1004, a memory 1005. Wherein the communication bus 1002 is used to enable connected communication between these components. The user interface 1003 may include a Display (Display), and the optional user interface 1003 may also include a standard wired interface, a wireless interface, and the wired interface for the user interface 1003 may be a USB interface in the present invention. The network interface 1004 may optionally include a standard wired interface, a Wireless interface (e.g., a Wireless-Fidelity (Wi-Fi) interface). The Memory 1005 may be a high-speed random access Memory (Random Access Memory, RAM) Memory or a stable Memory (NVM), such as a disk Memory. The memory 1005 may also optionally be a storage device separate from the processor 1001 described above.
It will be appreciated by those skilled in the art that the structure shown in fig. 1 does not constitute a limitation of the terminal control apparatus, and may include more or fewer components than shown, or may combine certain components, or a different arrangement of components.
As shown in fig. 1, an operating system, a network communication module, a user interface module, and a terminal control program may be included in a memory 1005, which is considered to be one type of computer storage medium.
In the terminal control device shown in fig. 1, the network interface 1004 is mainly used for connecting to a background server, and performing data communication with the background server; the user interface 1003 is mainly used for connecting user equipment; the terminal control apparatus calls a terminal control program stored in the memory 1005 through the processor 1001 and executes the terminal control method provided by the embodiment of the present invention.
Based on the above hardware structure, an embodiment of the terminal control method of the present invention is provided.
Referring to fig. 2, fig. 2 is a flowchart of a first embodiment of a terminal control method according to the present invention, and the first embodiment of the terminal control method according to the present invention is provided.
In a first embodiment, the terminal control method includes the steps of:
step S10: and when receiving the interface call request, acquiring task parameters of a preset workflow processing platform.
It should be understood that the execution body of the method of the present embodiment may be a terminal control device having functions of data processing, network communication, and program running, such as a server, or other electronic devices capable of implementing the same or similar functions, which is not limited in this embodiment.
It should be noted that, the user may initiate an interface call request through a terminal control program on the terminal control device; the interface calling request can be initiated by a terminal control program on the user terminal, and then the user terminal sends the interface calling request to the terminal control device. The user terminal may be a terminal device that establishes a communication connection with the terminal control device in advance, which is not limited in this embodiment.
The preset workflow processing platform may be an Airflow, which is a platform for describing, executing and monitoring workflows.
The task parameters of the preset workflow processing platform may be directed acyclic graph (Directed Acyclic Graph, DAG) parameters. Wherein, the DAG can organize all the work needing to be operated according to the dependency relationship, and the DAG describes the execution sequence of all the work.
Step S20: and downloading a target file from a file server according to the task parameters, and generating an execution catalog of a preset management script according to the target file.
It should be noted that the execution directory of the preset management script may be an allowable playlist.
It should be appreciated that downloading the target file from the file server based on the task parameter may be determining a file storage address based on the task parameter and downloading the target file from the file server based on the file storage address.
It may be understood that determining the file storage address according to the task parameter may be determining the current task according to the task parameter, and searching the file storage address corresponding to the current task in the preset address table. The preset address table contains the corresponding relation between the task and the file storage address, and the corresponding relation between the task and the file storage address can be recorded in advance.
Step S30: generating a control instruction according to the preset management script and the execution catalog, and sending the control instruction to a target terminal so that the target terminal executes the control instruction.
It should be appreciated that generating the control instruction according to the preset management script and the execution directory may be determining a configuration file according to the execution directory, and executing the preset management script according to the configuration file to generate the control instruction.
It should be appreciated that determining the configuration file from the execution catalog may be executing an allowable playlist to obtain the configuration file.
It can be understood that when the allowable script runs, the control instruction is automatically generated, and in this embodiment, in order to improve accuracy of terminal control, a preset management script is executed according to a configuration file to generate the control instruction.
In a first embodiment, it is disclosed that when an interface call request is received, task parameters of a preset workflow processing platform are obtained, a target file is downloaded from a file server according to the task parameters, an execution catalog of a preset management script is generated according to the target file, a control instruction is generated according to the preset management script and the execution catalog, and the control instruction is sent to a target terminal, so that the target terminal executes the control instruction; in the embodiment, when receiving the interface call request, an execution catalog of the preset management script is generated based on the task parameters of the preset workflow processing platform, and the control instruction is sent to the target terminal according to the preset management script and the execution catalog, so that the target terminal can be controlled based on the traceable execution catalog, and further visualization and traceability of terminal control are realized.
Referring to fig. 3, fig. 3 is a flowchart illustrating a second embodiment of the terminal control method according to the present invention, and the second embodiment of the terminal control method according to the present invention is proposed based on the first embodiment shown in fig. 2.
In a second embodiment, the step S10 includes:
step S101: and when receiving the interface call request, starting a preset workflow processing platform.
It should be understood that if the preset workflow processing platform is in the start state in real time, resource waste may be caused. Therefore, in this embodiment, the preset workflow processing platform is normally in a closed state, and is started only when the interface call request is received.
It should be noted that the preset workflow processing platform may be Airflow, which is a platform for describing, executing and monitoring a workflow.
In a specific implementation, for example, when the http interface is invoked, airflow is started.
Step S102: and acquiring task parameters of the preset workflow processing platform.
It should be noted that the task parameters of the preset workflow processing platform may be directed acyclic graph (Directed Acyclic Graph, DAG) parameters. Wherein, the DAG can organize all the work needing to be operated according to the dependency relationship, and the DAG describes the execution sequence of all the work.
In a second embodiment, a preset workflow processing platform is started when an interface call request is received, and task parameters of the preset workflow processing platform are obtained; in this embodiment, the preset workflow processing platform is started only when the interface call request is received, so that the waste of operation resources is avoided.
In a second embodiment, before the step S20, the method further includes:
step S110: acquiring the calling times of a preset management script, and judging whether the preset management script is called for the first time or not according to the calling times.
It should be noted that the preset management script may be an allowable script, which may be used to manage each terminal in the fields of state management, software installation, and the like.
It should be appreciated that when the script is first invoked, script execution errors may result if the script is not configured. Therefore, in order to avoid the above-mentioned drawbacks, in this embodiment, it may be determined in advance whether the preset management script is called for the first time, and when the preset management script is called for the first time, the preset management script is configured.
It may be understood that determining whether the preset management script is invoked for the first time according to the number of invocations may be to match the number of invocations with a preset threshold, and determine whether the preset management script is invoked for the first time according to a matching result. The preset threshold may be preset, for example, 0 is set as the preset threshold.
It should be appreciated that when the number of calls matches the preset threshold, determining that the preset management script was first called; and when the calling times are not matched with the preset threshold value, judging that the preset management script is not called for the first time.
Step S120: and when the preset management script is called for the first time, configuring the preset management script.
It is understood that configuring the preset management script may be initializing the runtime environment of the preset management script.
In a specific implementation, for example, a Python virtual environment for an Anstable execution is initialized.
Further, in order to ensure that the preset management script is properly configured, the step S120 includes:
when the preset management script is called for the first time, initializing a virtual running environment corresponding to the preset management script;
and installing a file package corresponding to the preset management script so as to configure the preset management script.
It should be noted that the virtual running environment may be a Python virtual environment, and the file package may be a Python package.
In a specific implementation, for example, when an stable is first called, a Python virtual environment executed by the stable is initialized, and a Python package corresponding to the stable is installed.
In a second embodiment, it is disclosed that the number of times of calling the preset management script is obtained, whether the preset management script is called for the first time is judged according to the number of times of calling, and when the preset management script is called for the first time, the preset management script is configured; in the embodiment, when the preset management script is called for the first time, the preset management script is configured in advance, so that the reliability of the preset management script is ensured.
In a second embodiment, the step S20 includes:
step S201: and determining a file storage address according to the task parameter, and downloading the target file from the file server according to the file storage address.
It may be understood that determining the file storage address according to the task parameter may be determining the current task according to the task parameter, and searching the file storage address corresponding to the current task in the preset address table. The preset address table contains the corresponding relation between the task and the file storage address, and the corresponding relation between the task and the file storage address can be recorded in advance.
Step S202: and acquiring configuration information of a preset management script, and generating an execution catalog of the preset management script according to the configuration information and the target file.
It should be noted that, the configuration information may be information such as script version, script running setting, script parameters, and the like.
It should be understood that, in practical applications, if the execution directory of the preset management script is directly generated according to the target file, a larger target file needs to be downloaded from the file server, which results in slow generation speed of the execution directory. Therefore, in order to overcome the above-mentioned drawbacks, in this embodiment, the configuration information of the preset management script may be obtained first, and then the configuration information may be modified according to the target file, so as to obtain the execution catalog of the preset management script.
It should be noted that the execution directory of the preset management script may be an allowable playlist.
Further, in order to improve accuracy of the execution directory, the step S202 includes:
acquiring configuration information of a preset management script, and generating an initial catalog of the preset management script according to the configuration information and the target file;
and acquiring the history control information of the target terminal, and adjusting the initial catalog according to the history control information to obtain an execution catalog of the preset management script.
It should be understood that, the execution catalog of the preset management script is directly generated according to the configuration information and the target file, and there may be a case that the execution catalog does not meet the actual requirement of the user. Therefore, in order to overcome the above-described drawbacks, in the present embodiment, the execution catalog is also adjusted in conjunction with the history control information of the target terminal.
In a second embodiment, determining a file storage address according to task parameters, downloading a target file from a file server according to the file storage address, acquiring configuration information of a preset management script, and generating an execution catalog of the preset management script according to the configuration information and the target file; in this embodiment, the configuration information of the preset management script is obtained first, and then the configuration information is modified according to the target file, so as to obtain the execution catalog of the preset management script, thereby reducing the downloading amount of the file and improving the generation speed of the execution catalog.
In a second embodiment, the step S30 includes:
step S301: and determining a configuration file according to the execution catalog, and executing the preset management script according to the configuration file to generate a control instruction.
It should be appreciated that determining the configuration file from the execution catalog may be executing an allowable playlist to obtain the configuration file.
It can be understood that when the allowable script runs, the control instruction is automatically generated, and in this embodiment, in order to improve accuracy of terminal control, a preset management script is executed according to a configuration file to generate the control instruction.
Step S302: and sending the control instruction to a target terminal so that the target terminal executes the control instruction.
The target terminal may be a control terminal, and the target terminal is managed by the server.
It should be understood that different terminals correspond to different communication modes. Therefore, the control instruction may be sent to the target terminal by searching for the communication connection corresponding to the target terminal and sending the control instruction to the target terminal through the communication connection.
Further, in order to improve the security of the terminal control, before step S302, the method further includes:
Acquiring terminal information of a target terminal, and carrying out security verification on the target terminal according to the terminal information;
accordingly, the step S302 includes:
and when the verification is passed, the control instruction is sent to the target terminal, so that the target terminal executes the control instruction.
It should be understood that in practical applications, there are also situations where the target terminal is not secure. Therefore, before the control instruction is sent to the target terminal, the target terminal can be verified.
The terminal information may be information such as a terminal model number, a terminal identifier, and a terminal position.
It may be understood that the security verification of the target terminal according to the terminal information may be to match the terminal information with the abnormal information and perform the security verification of the target terminal according to the matching result. Wherein, the abnormality information may be set in advance.
It should be understood that when the matching result is that the matching is successful, it may be determined that the target terminal verification is not passed; and when the matching result is that the matching fails, the target terminal verification can be judged to pass.
In a second embodiment, determining a configuration file according to an execution catalog, executing a preset management script according to the configuration file to generate a control instruction, and sending the control instruction to a target terminal so that the target terminal executes the control instruction; because the configuration file is additionally determined to execute the preset management script, the accuracy of the control instruction is improved.
Referring to fig. 4, fig. 4 is a schematic flow chart of a third embodiment of the terminal control method according to the present invention, and based on the second embodiment shown in fig. 3, the third embodiment of the terminal control method according to the present invention is proposed.
In a third embodiment, after the step S30, the method further includes:
step S40: and receiving an execution result fed back by the target terminal according to the control instruction.
It should be noted that, the execution result may be execution success or execution failure.
It can be understood that the target terminal may execute the control instruction after receiving the control instruction, and feed back the control instruction to the server.
Step S50: and when the execution result is that the execution fails, the control instruction is sent to the target terminal again, so that the target terminal executes the control instruction.
It should be understood that, when the execution result is an execution failure, in order to ensure the correct execution of the target terminal, in this embodiment, the control instruction may be sent to the target terminal again, so that the target terminal executes the control instruction.
Further, in order to manually control the terminal after the re-execution failure, after the step S50, the method further includes:
receiving a re-execution result fed back by the target terminal according to the control instruction;
When the re-execution result is that the execution fails, generating reminding information and sending the reminding information to a management terminal;
and receiving a manual control instruction fed back by the management terminal, and sending the manual control instruction to the target terminal.
Note that the reminding information may be preset, for example, a "terminal control failure" is used as the reminding information.
The management terminal may be preset, and the management terminal may establish communication connection with the terminal control device in advance.
It should be understood that, after receiving the reminding information, the management terminal may display the reminding information to remind the management personnel, and the management personnel may initiate a manual control instruction based on the reminding information, and send the manual control instruction to the terminal control device, where the terminal control device sends the manual control instruction to the target terminal.
Further, in order to make the reminding information more conform to the user requirement, when the execution result is that the execution fails, the control instruction is sent to the target terminal again, so that after the target terminal executes the control instruction, the method further includes:
when the re-execution result is that the execution fails, determining control information according to the execution catalog and the control instruction;
Generating reminding information according to the control information, and sending the reminding information to a management terminal.
It should be understood that determining the control information based on the execution catalog and the control instructions may be aggregating the execution catalog and the control instructions to obtain the control information.
It is understood that the generation of the reminder information based on the control information may be to use the control information as the reminder information.
Further, in order to facilitate the user to query the control information, after receiving the manual control instruction fed back by the management terminal and sending the manual control instruction to the target terminal, the method further includes:
generating a control log according to the execution result, the re-execution result and the control instruction;
and storing the control log into a storage space corresponding to the target terminal.
It should be understood that generating the control log according to the execution result, the re-execution result, and the control instruction may be writing the execution result, the re-execution result, and the control instruction into the log, and obtaining the control log.
It can be understood that different terminals set different storage spaces in the terminal control device, and in this embodiment, the control log may be stored in the storage space corresponding to the target terminal for subsequent query.
In a third embodiment, it is disclosed that an execution result fed back by the target terminal according to the control instruction is received, and when the execution result is that the execution fails, the control instruction is sent to the target terminal again, so that the target terminal executes the control instruction; in this embodiment, after the execution failure, the control instruction is retransmitted, so that the reliability of terminal control is improved.
In addition, the embodiment of the invention also provides a storage medium, wherein the storage medium stores a terminal control program, and the terminal control program realizes the terminal control method when being executed by a processor.
In addition, referring to fig. 5, an embodiment of the present invention further proposes a terminal control device, where the terminal control device includes: a parameter acquisition module 10, a catalog generation module 20, and an instruction generation module 30;
in a first embodiment, the terminal control method includes the steps of:
the parameter obtaining module 10 is configured to obtain task parameters of a preset workflow processing platform when receiving an interface call request.
It should be noted that, the user may initiate an interface call request through a terminal control program on the terminal control device; the interface calling request can be initiated by a terminal control program on the user terminal, and then the user terminal sends the interface calling request to the terminal control device. The user terminal may be a terminal device that establishes a communication connection with the terminal control device in advance, which is not limited in this embodiment.
The preset workflow processing platform may be an Airflow, which is a platform for describing, executing and monitoring workflows.
The task parameters of the preset workflow processing platform may be directed acyclic graph (Directed Acyclic Graph, DAG) parameters. Wherein, the DAG can organize all the work needing to be operated according to the dependency relationship, and the DAG describes the execution sequence of all the work.
The catalog generation module 20 is configured to download a target file from a file server according to the task parameter, and generate an execution catalog of a preset management script according to the target file.
It should be noted that the execution directory of the preset management script may be an allowable playlist.
It should be appreciated that downloading the target file from the file server based on the task parameter may be determining a file storage address based on the task parameter and downloading the target file from the file server based on the file storage address.
It may be understood that determining the file storage address according to the task parameter may be determining the current task according to the task parameter, and searching the file storage address corresponding to the current task in the preset address table. The preset address table contains the corresponding relation between the task and the file storage address, and the corresponding relation between the task and the file storage address can be recorded in advance.
The instruction generating module 30 is configured to generate a control instruction according to the preset management script and the execution catalog, and send the control instruction to a target terminal, so that the target terminal executes the control instruction.
It should be appreciated that generating the control instruction according to the preset management script and the execution directory may be determining a configuration file according to the execution directory, and executing the preset management script according to the configuration file to generate the control instruction.
It should be appreciated that determining the configuration file from the execution catalog may be executing an allowable playlist to obtain the configuration file.
It can be understood that when the allowable script runs, the control instruction is automatically generated, and in this embodiment, in order to improve accuracy of terminal control, a preset management script is executed according to a configuration file to generate the control instruction.
In this embodiment, it is disclosed that when an interface call request is received, task parameters of a preset workflow processing platform are obtained, a target file is downloaded from a file server according to the task parameters, an execution catalog of a preset management script is generated according to the target file, a control instruction is generated according to the preset management script and the execution catalog, and the control instruction is sent to a target terminal, so that the target terminal executes the control instruction; in the embodiment, when receiving the interface call request, an execution catalog of the preset management script is generated based on the task parameters of the preset workflow processing platform, and the control instruction is sent to the target terminal according to the preset management script and the execution catalog, so that the target terminal can be controlled based on the traceable execution catalog, and further visualization and traceability of terminal control are realized.
Other embodiments or specific implementation manners of the terminal control device according to the present invention may refer to the above method embodiments, and are not described herein again.
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 system 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 system. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or system that comprises the element.
The foregoing embodiment numbers of the present invention are merely for the purpose of description, and do not represent the advantages or disadvantages of the embodiments. In the unit claims enumerating several means, several of these means may be embodied by one and the same item of hardware. The use of the terms first, second, third, etc. do not denote any order, but rather the terms first, second, third, etc. are used to interpret the terms as names.
From the above description of the embodiments, it will be clear to those skilled in the art that the above-described embodiment method may be implemented by means of software plus a necessary general hardware platform, but of course may also be implemented by means of hardware, but in many cases the former is a preferred embodiment. Based on such understanding, the technical solution of the present invention may be embodied essentially or in a part contributing to the prior art in the form of a software product stored in a storage medium (e.g. read only memory mirror (Read Only Memory image, ROM)/random access memory (Random Access Memory, RAM), magnetic disk, optical disk), comprising instructions for causing a terminal device (which may be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to perform the method according to the embodiments of the present invention.
The foregoing description is only of the preferred embodiments of the present invention, and is not intended to limit the scope of the invention, but rather is intended to cover any equivalents of the structures or equivalent processes disclosed herein or in the alternative, which may be employed directly or indirectly in other related arts.

Claims (20)

1. A terminal control method, characterized in that the terminal control method comprises the steps of:
when an interface call request is received, acquiring task parameters of a preset workflow processing platform;
downloading a target file from a file server according to the task parameters, and generating an execution catalog of a preset management script according to the target file, wherein the execution catalog is used for tracing the control process of a target terminal;
generating a control instruction according to the preset management script and the execution catalog, and sending the control instruction to a target terminal so that the target terminal executes the control instruction.
2. The terminal control method according to claim 1, wherein before the step of downloading the target file from the file server according to the task parameter and generating the execution catalog of the preset management script according to the target file, further comprising:
Acquiring the calling times of a preset management script, and judging whether the preset management script is called for the first time or not according to the calling times;
and when the preset management script is called for the first time, configuring the preset management script.
3. The terminal control method according to claim 2, wherein the step of configuring the preset management script when the preset management script is called for the first time, comprises:
when the preset management script is called for the first time, initializing a virtual running environment corresponding to the preset management script;
and installing a file package corresponding to the preset management script so as to configure the preset management script.
4. The terminal control method as claimed in claim 1, wherein the step of downloading a target file from a file server according to the task parameter and generating an execution directory of a preset management script according to the target file comprises:
determining a file storage address according to the task parameters, and downloading a target file from a file server according to the file storage address;
and acquiring configuration information of a preset management script, and generating an execution catalog of the preset management script according to the configuration information and the target file.
5. The terminal control method as claimed in claim 4, wherein the step of obtaining configuration information of a preset management script and generating an execution catalog of the preset management script according to the configuration information and the object file comprises:
acquiring configuration information of a preset management script, and generating an initial catalog of the preset management script according to the configuration information and the target file;
and acquiring the history control information of the target terminal, and adjusting the initial catalog according to the history control information to obtain an execution catalog of the preset management script.
6. The terminal control method according to any one of claims 1 to 5, characterized in that the step of generating a control instruction according to the preset management script and the execution catalog and transmitting the control instruction to a target terminal to cause the target terminal to execute the control instruction comprises:
determining a configuration file according to the execution catalog, and executing the preset management script according to the configuration file to generate a control instruction;
and sending the control instruction to a target terminal so that the target terminal executes the control instruction.
7. The terminal control method of claim 6, wherein before the step of transmitting the control instruction to a target terminal to cause the target terminal to execute the control instruction, further comprising:
acquiring terminal information of a target terminal, and carrying out security verification on the target terminal according to the terminal information;
accordingly, the sending the control instruction to the target terminal so that the target terminal executes the control instruction includes:
and when the verification is passed, the control instruction is sent to the target terminal, so that the target terminal executes the control instruction.
8. The terminal control method according to any one of claims 1 to 5, wherein after the step of generating a control instruction according to the preset management script and the execution catalog and transmitting the control instruction to a target terminal to cause the target terminal to execute the control instruction, further comprising:
receiving an execution result fed back by the target terminal according to the control instruction;
and when the execution result is that the execution fails, the control instruction is sent to the target terminal again, so that the target terminal executes the control instruction.
9. The terminal control method according to claim 8, wherein the step of, when the execution result is that the execution fails, retransmitting the control instruction to the target terminal to cause the target terminal to execute the control instruction, further comprises:
receiving a re-execution result fed back by the target terminal according to the control instruction;
when the re-execution result is that the execution fails, generating reminding information and sending the reminding information to a management terminal;
and receiving a manual control instruction fed back by the management terminal, and sending the manual control instruction to the target terminal.
10. The terminal control method according to claim 9, wherein the step of generating a reminder when the re-execution result is an execution failure, and transmitting the reminder to a management terminal, comprises:
when the re-execution result is that the execution fails, determining control information according to the execution catalog and the control instruction;
generating reminding information according to the control information, and sending the reminding information to a management terminal.
11. The terminal control method according to claim 9, wherein after the step of receiving the manual control instruction fed back by the management terminal and transmitting the manual control instruction to the target terminal, further comprising:
Generating a control log according to the execution result, the re-execution result and the control instruction;
and storing the control log into a storage space corresponding to the target terminal.
12. The terminal control method according to any one of claims 1 to 5, wherein the step of acquiring task parameters of a preset workflow processing platform when receiving an interface call request includes:
when an interface call request is received, starting a preset workflow processing platform;
and acquiring task parameters of the preset workflow processing platform.
13. A terminal control apparatus, characterized in that the terminal control apparatus comprises: a memory, a processor, and a terminal control program stored on the memory and executable on the processor, which when executed by the processor, implements the terminal control method according to any one of claims 1 to 12.
14. A storage medium having stored thereon a terminal control program which when executed by a processor implements the terminal control method according to any one of claims 1 to 12.
15. A terminal control apparatus, characterized in that the terminal control apparatus comprises: the system comprises a parameter acquisition module, a catalog generation module and an instruction generation module;
The parameter acquisition module is used for acquiring task parameters of a preset workflow processing platform when receiving an interface call request;
the catalog generation module is used for downloading a target file from a file server according to the task parameters, and generating an execution catalog of a preset management script according to the target file, wherein the execution catalog is used for tracing the control process of the target terminal;
the instruction generation module is used for generating a control instruction according to the preset management script and the execution catalog, and sending the control instruction to a target terminal so that the target terminal executes the control instruction.
16. The terminal control apparatus according to claim 15, wherein the terminal control apparatus further comprises: a script configuration module;
the script configuration module is used for acquiring the calling times of a preset management script and judging whether the preset management script is called for the first time or not according to the calling times;
the script configuration module is further configured to configure the preset management script when the preset management script is called for the first time.
17. The terminal control device according to claim 16, wherein the script configuration module is further configured to initialize a virtual running environment corresponding to a preset management script when the preset management script is called for the first time;
The script configuration module is further configured to install a file packet corresponding to the preset management script, so as to configure the preset management script.
18. The terminal control apparatus according to claim 15, wherein the catalog generation module is further configured to determine a file storage address according to the task parameter, and download the target file from the file server according to the file storage address;
the catalog generation module is further used for acquiring configuration information of a preset management script and generating an execution catalog of the preset management script according to the configuration information and the target file.
19. The terminal control device according to claim 18, wherein the catalog generation module is further configured to obtain configuration information of a preset management script, and generate an initial catalog of the preset management script according to the configuration information and the target file;
the catalog generation module is also used for acquiring the history control information of the target terminal, and adjusting the initial catalog according to the history control information to obtain an execution catalog of the preset management script.
20. The terminal control apparatus according to any one of claims 15 to 19, wherein the instruction generation module is further configured to determine a configuration file according to the execution catalog, and execute the preset management script according to the configuration file to generate a control instruction;
The instruction generating module is further configured to send the control instruction to a target terminal, so that the target terminal executes the control instruction.
CN202111427728.9A 2021-11-29 2021-11-29 Terminal control method, device, storage medium and apparatus Active CN114095495B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111427728.9A CN114095495B (en) 2021-11-29 2021-11-29 Terminal control method, device, storage medium and apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111427728.9A CN114095495B (en) 2021-11-29 2021-11-29 Terminal control method, device, storage medium and apparatus

Publications (2)

Publication Number Publication Date
CN114095495A CN114095495A (en) 2022-02-25
CN114095495B true CN114095495B (en) 2023-12-05

Family

ID=80305201

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111427728.9A Active CN114095495B (en) 2021-11-29 2021-11-29 Terminal control method, device, storage medium and apparatus

Country Status (1)

Country Link
CN (1) CN114095495B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007183691A (en) * 2005-12-29 2007-07-19 Hewlett-Packard Development Co Lp Workflow script execution system and method therefor
CN110609779A (en) * 2019-08-20 2019-12-24 腾讯科技(深圳)有限公司 Data processing method and device, electronic equipment and computer readable storage medium
CN111061555A (en) * 2019-12-22 2020-04-24 济南浪潮数据技术有限公司 Operation and maintenance method based on infrastructure and related device
CN112579101A (en) * 2020-12-21 2021-03-30 广州博冠信息科技有限公司 Task script control method and device, electronic equipment and storage medium
CN112651705A (en) * 2020-12-15 2021-04-13 下一代互联网重大应用技术(北京)工程研究中心有限公司 Mail processing method, device, equipment and medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007183691A (en) * 2005-12-29 2007-07-19 Hewlett-Packard Development Co Lp Workflow script execution system and method therefor
CN110609779A (en) * 2019-08-20 2019-12-24 腾讯科技(深圳)有限公司 Data processing method and device, electronic equipment and computer readable storage medium
CN111061555A (en) * 2019-12-22 2020-04-24 济南浪潮数据技术有限公司 Operation and maintenance method based on infrastructure and related device
CN112651705A (en) * 2020-12-15 2021-04-13 下一代互联网重大应用技术(北京)工程研究中心有限公司 Mail processing method, device, equipment and medium
CN112579101A (en) * 2020-12-21 2021-03-30 广州博冠信息科技有限公司 Task script control method and device, electronic equipment and storage medium

Also Published As

Publication number Publication date
CN114095495A (en) 2022-02-25

Similar Documents

Publication Publication Date Title
CN105302722B (en) CTS automatic testing method and device
CN110058894B (en) Method, apparatus and computer program product for executing applications in a hybrid cloud
CN110659131B (en) Task processing method, electronic device, computer equipment and storage medium
CN112130871A (en) Method and device for remotely deploying middleware, computer equipment and storage medium
CN110727575B (en) Information processing method, system, device and storage medium
CN111949314A (en) Method and device for generating application installation package, server and storage medium
CN111078200A (en) Task construction method, device, equipment, medium and system
CN110851151B (en) Method, device, terminal, server and storage medium for pre-installing application
CN113064630A (en) Mobile terminal APP automatic packaging method and system, electronic device and storage medium
CN113687858A (en) Configuration file checking method and device, electronic equipment and storage medium
CN114546588A (en) Task deployment method and device, storage medium and electronic device
CN114006815B (en) Automatic deployment method and device for cloud platform nodes, nodes and storage medium
CN114095495B (en) Terminal control method, device, storage medium and apparatus
CN115357258B (en) Application deployment method and device, storage medium and electronic device
CN110874278A (en) Embedding method of external system, workflow system, device and storage medium
CN113419814B (en) Virtual machine creating method, device, equipment and storage medium in cloud platform
CN113254158B (en) Deployment method and device of deep learning system
CN112685102B (en) Gateway plug-in hot loading method, device, equipment and medium
CN116820663A (en) Mirror image construction method, device, storage medium and apparatus
CN113378180A (en) Vulnerability detection method and device, computer equipment and readable storage medium
CN113495735A (en) Upgrade package installation method, device, equipment and readable storage medium
CN114095498A (en) Cluster environment deployment method, system, computer equipment and storage medium
CN116112821A (en) Terminal control method, device, storage medium and apparatus
CN114816965A (en) Data verification method and device
CN112973129A (en) Game deployment method and device, electronic equipment and computer-readable storage medium

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