CN110750314A - Command execution method and system of micro-service terminal - Google Patents

Command execution method and system of micro-service terminal Download PDF

Info

Publication number
CN110750314A
CN110750314A CN201911014789.5A CN201911014789A CN110750314A CN 110750314 A CN110750314 A CN 110750314A CN 201911014789 A CN201911014789 A CN 201911014789A CN 110750314 A CN110750314 A CN 110750314A
Authority
CN
China
Prior art keywords
micro
service
terminal
command
target terminal
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.)
Pending
Application number
CN201911014789.5A
Other languages
Chinese (zh)
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.)
Hangzhou Dbappsecurity Technology Co Ltd
Original Assignee
Hangzhou Dbappsecurity 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 Hangzhou Dbappsecurity Technology Co Ltd filed Critical Hangzhou Dbappsecurity Technology Co Ltd
Priority to CN201911014789.5A priority Critical patent/CN110750314A/en
Publication of CN110750314A publication Critical patent/CN110750314A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • 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
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/51Discovery or management thereof, e.g. service location protocol [SLP] or web services

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer And Data Communications (AREA)
  • Telephonic Communication Services (AREA)

Abstract

The invention provides a command execution method and a system of a micro-service terminal, which are applied to a micro-service cluster server, wherein the micro-service cluster server is connected with a plurality of micro-service terminals, and the method comprises the following steps: acquiring a micro-service access request; the access request includes: the name of the micro-service terminal to be accessed is configured with an execution command; searching a target terminal in a plurality of micro service terminals based on the name of the micro service terminal to be accessed; and sending the configuration execution command to the target terminal so that the target terminal executes the configuration execution command. According to the method and the system, the technical problem of low command execution efficiency of the micro-service terminal in the prior art is solved by a mode that the micro-service cluster server accesses the target micro-service terminal.

Description

Command execution method and system of micro-service terminal
Technical Field
The present invention relates to the field of micro service technologies, and in particular, to a method and a system for executing a command of a micro service terminal.
Background
In some projects, the micro-service is high-speed, stable and reliable, the service capability can be dynamically expanded, and the micro-service has great value for enterprise business. In a plurality of micro-service clusters, once one micro-service terminal and a plurality of micro-service terminals are needed to execute commands, the execution of the commands is difficult to realize, and only the micro-service terminals are independently accessed to execute the commands, so that the efficient operation of executing the micro-service commands cannot be achieved.
The above problems are often difficult to directly execute commands, and only the commands are executed in the micro-service terminal, and because of a plurality of micro-services, the trouble of searching for the terminal is generated when the terminals execute the commands under the condition of a plurality of terminals.
In the prior art, most of using methods are to enumerate and query related terminals for command execution on a micro-service terminal, so that the technical problem of low efficiency of terminal command execution exists.
Disclosure of Invention
In view of the above, an object of the present invention is to provide a method and a system for executing a command of a micro service terminal, so as to alleviate the technical problem in the prior art that the execution efficiency of the command of the micro service terminal is low.
In a first aspect, an embodiment of the present invention provides a method for executing a command of a micro service terminal, where the method is applied to a micro service cluster server, where the micro service cluster server is connected to multiple micro service terminals, and the method includes: acquiring a micro-service access request; the access request includes: the name of the micro-service terminal to be accessed is configured with an execution command; searching a target terminal in the micro service terminals based on the name of the micro service terminal to be accessed; and sending the configuration execution command to a target terminal so that the target terminal executes the configuration execution command.
Further, before obtaining the micro-service access request, the method further comprises: and creating names of a plurality of micro service terminals in the micro service cluster server.
Further, after sending the configuration execution command to a target terminal to make the target terminal execute the configuration execution command, the method further includes: and acquiring the information record returned by the target terminal.
Further, the method further comprises: acquiring a configuration adjustment command sent by a target terminal; the target terminal is one of the micro service terminals; and respectively sending the configuration adjustment command to the micro service terminals so that the micro service terminals perform system configuration adjustment based on the configuration adjustment command.
In a second aspect, an embodiment of the present invention further provides a command execution system for a microservice terminal, which is applied to a microservice cluster server, where the microservice cluster server is connected to a plurality of microservice terminals, and the system includes: the device comprises an acquisition module, a search module and an execution module; the acquisition module is used for acquiring a micro-service access request; the access request includes: the name of the micro-service terminal to be accessed is configured with an execution command; the searching module is used for searching a target terminal in the micro service terminals based on the name of the micro service terminal to be accessed; the execution module is configured to send the configuration execution command to a target terminal, so that the target terminal executes the configuration execution command.
Further, the system further comprises: and the creating module is used for creating the names of a plurality of micro-service terminals in the micro-service cluster server.
Further, the system further comprises: and the recording module is used for acquiring the information record returned by the target terminal.
Further, the system further comprises: a terminal configuration adjustment module configured to: acquiring a configuration adjustment command sent by a target terminal; the target terminal is one of the micro service terminals; and respectively sending the configuration adjustment command to the micro service terminals so that the micro service terminals perform system configuration adjustment based on the configuration adjustment command.
In a third aspect, an embodiment of the present invention further provides an electronic device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, where the processor implements the steps of the method according to the first aspect when executing the computer program.
In a fourth aspect, the present invention further provides a computer-readable medium having non-volatile program code executable by a processor, where the program code causes the processor to execute the method according to the first aspect.
The invention provides a command execution method and a system of a micro-service terminal, which are applied to a micro-service cluster server, wherein the micro-service cluster server is connected with a plurality of micro-service terminals, and the method comprises the following steps: acquiring a micro-service access request; searching a target terminal in a plurality of micro service terminals based on the name of the micro service terminal to be accessed; and sending the configuration execution command to the target terminal so that the target terminal executes the configuration execution command. According to the method and the system, the technical problem of low command execution efficiency of the micro-service terminal in the prior art is solved by a mode that the micro-service cluster server accesses the target micro-service terminal.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and other drawings can be obtained by those skilled in the art without creative efforts.
Fig. 1 is a flowchart of a command execution method of a microservice terminal according to an embodiment of the present invention;
fig. 2 is a flowchart of another command execution method of a microservice terminal according to an embodiment of the present invention;
fig. 3 is a schematic diagram of a command execution system of a microservice terminal according to an embodiment of the present invention;
fig. 4 is a schematic diagram of another command execution system of a microservice terminal according to an embodiment of the present invention.
Detailed Description
The technical solutions of the present invention will be described clearly and completely with reference to the accompanying drawings, and it should be understood that the described embodiments are some, but not all embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The first embodiment is as follows:
fig. 1 is a flowchart of a command execution method of a micro service terminal, which is applied to a micro service cluster server, where the micro service cluster server is connected to a plurality of micro service terminals. As shown in fig. 1, the method specifically includes the following steps:
step S102, acquiring a micro-service access request; the access request includes: and configuring an execution command according to the name of the micro service terminal to be accessed.
Alternatively, the configuration execution command may be a command for the terminal to execute a restart service, or a command for modifying some contents of the terminal.
And step S104, searching a target terminal in the micro service terminals based on the name of the micro service terminal to be accessed.
And step S106, sending the configuration execution command to the target terminal so that the target terminal executes the configuration execution command.
The invention provides a command execution method of a micro-service terminal, which is applied to a micro-service cluster server, wherein the micro-service cluster server is connected with a plurality of micro-service terminals, and the method comprises the following steps: acquiring a micro-service access request; searching a target terminal in a plurality of micro service terminals based on the name of the micro service terminal to be accessed; and sending the configuration execution command to the target terminal so that the target terminal executes the configuration execution command. According to the method and the system, the technical problem of low command execution efficiency of the micro-service terminal in the prior art is solved by the mode that the micro-service cluster server accesses the target micro-service terminal, and the technical effect of improving the command execution efficiency of the micro-service terminal is achieved.
Optionally, before step S102, the method provided in the embodiment of the present invention further includes:
and creating names of a plurality of micro service terminals in the micro service cluster server.
Specifically, the user creates the name of the related micro-service terminal and the precondition and the command content of the configuration execution in the micro-service cluster server in advance.
Optionally, the method provided in the embodiment of the present invention further includes:
acquiring a configuration adjustment command sent by a target terminal; the target terminal is one of the micro service terminals;
and respectively sending the configuration adjustment command to the micro service terminals so that the micro service terminals perform system configuration adjustment based on the configuration adjustment command.
Optionally, after step S106, the method provided in the embodiment of the present invention further includes:
and acquiring the information record returned by the target terminal.
A specific implementation flow of the command execution method of the micro service terminal according to the embodiment of the present invention is illustrated below, as shown in fig. 2, where a processing procedure in the micro service cluster server is shown in the figure. Specifically, each micro service terminal monitors service configuration and system configuration modification, and when the service configuration and the system configuration are modified, sends information to a processing program in the micro service cluster server, the processing program sends execution command content to the micro service terminal, the micro service terminal executes the execution command after receiving the execution command, and returns the information to processing program recording information after executing the command; if the service configuration and system configuration are not adjusted, no information is sent to the handler.
As shown in fig. 2, a processing program in the microservice terminal may directly send a microservice to perform command execution, send a microservice terminal name and a command for configuration execution to the processing program, and after receiving the command, the processing program automatically searches the received microservice terminal to obtain a corresponding terminal, and then the microservice terminal receives the command to perform command execution, and returns information to the processing program recording information after executing the command.
As can be seen from the above description, the command execution method for the micro service terminal according to the embodiment of the present invention achieves the technical effect of improving the efficiency of executing the command by the multiple terminals by connecting the multiple terminals in the micro service cluster with one server and then sending the command to the corresponding terminal through the processing program in the server.
Example two:
fig. 3 is a schematic diagram of a command execution system of a micro service terminal, which is applied to a micro service cluster server, wherein the micro service cluster server is connected to a plurality of micro service terminals according to an embodiment of the present invention. Specifically, as shown in fig. 3, the system includes: an acquisition module 10, a search module 20 and an execution module 30.
Specifically, the obtaining module 10 is configured to obtain a micro-service access request; the access request includes: and configuring an execution command according to the name of the micro service terminal to be accessed.
And the searching module 20 is configured to search a target terminal in the multiple microservice terminals based on the name of the microservice terminal to be accessed.
And an executing module 30, configured to send the configuration executing command to the target terminal, so that the target terminal executes the configuration executing command.
The invention provides a command execution system of a micro-service terminal, which comprises: acquiring a micro-service access request through an acquisition module; searching a target terminal in a plurality of micro-service terminals through a searching module based on the name of the micro-service terminal to be accessed; and finally, sending the configuration execution command to the target terminal through the execution module so that the target terminal executes the configuration execution command. According to the method and the system, the technical problem of low command execution efficiency of the micro-service terminal in the prior art is solved by the mode that the micro-service cluster server accesses the target micro-service terminal, and the technical effect of improving the command execution efficiency of the micro-service terminal is achieved.
Optionally, fig. 4 is a schematic diagram of another command execution system of a microservice terminal provided in an embodiment of the present invention. As shown in fig. 4, the system further includes: and a creating module 40, configured to create names of multiple micro service terminals in the micro service cluster server.
Optionally, as shown in fig. 4, the system further includes: and the recording module 50 is used for acquiring the information record returned by the target terminal.
Optionally, as shown in fig. 4, the system further includes: a terminal configuration adjustment module 60 configured to:
acquiring a configuration adjustment command sent by a target terminal; the target terminal is one of the micro service terminals;
and respectively sending the configuration adjustment command to the micro service terminals so that the micro service terminals perform system configuration adjustment based on the configuration adjustment command.
The embodiment of the present invention further provides an electronic device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the method in the first embodiment when executing the computer program.
The embodiment of the present invention further provides a computer readable medium having a non-volatile program code executable by a processor, where the program code causes the processor to execute the method in the first embodiment.
Finally, it should be noted that: the above embodiments are only used to illustrate the technical solution of the present invention, and not to limit the same; while the invention has been described in detail and with reference to the foregoing embodiments, it will be understood by those skilled in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some or all of the technical features may be equivalently replaced; and the modifications or the substitutions do not make the essence of the corresponding technical solutions depart from the scope of the technical solutions of the embodiments of the present invention.

Claims (10)

1. A command execution method of a micro service terminal is applied to a micro service cluster server, and the micro service cluster server is connected with a plurality of micro service terminals, and the method comprises the following steps:
acquiring a micro-service access request; the access request includes: the name of the micro-service terminal to be accessed is configured with an execution command;
searching a target terminal in the micro service terminals based on the name of the micro service terminal to be accessed;
and sending the configuration execution command to a target terminal so that the target terminal executes the configuration execution command.
2. The method of claim 1, wherein prior to obtaining a microservice access request, the method further comprises:
and creating names of a plurality of micro service terminals in the micro service cluster server.
3. The method of claim 1, wherein after sending the configuration execution command to a target terminal to cause the target terminal to execute the configuration execution command, the method further comprises:
and acquiring the information record returned by the target terminal.
4. The method of claim 1, further comprising:
acquiring a configuration adjustment command sent by a target terminal; the target terminal is one of the micro service terminals;
and respectively sending the configuration adjustment command to the micro service terminals so that the micro service terminals perform system configuration adjustment based on the configuration adjustment command.
5. A command execution system of a microservice terminal is applied to a microservice cluster server, and the microservice cluster server is connected with a plurality of microservice terminals, and the system comprises: the device comprises an acquisition module, a search module and an execution module; wherein,
the acquisition module is used for acquiring a micro-service access request; the access request includes: the name of the micro-service terminal to be accessed is configured with an execution command;
the searching module is used for searching a target terminal in the micro service terminals based on the name of the micro service terminal to be accessed;
the execution module is configured to send the configuration execution command to a target terminal, so that the target terminal executes the configuration execution command.
6. The system of claim 5, further comprising: and the creating module is used for creating the names of a plurality of micro-service terminals in the micro-service cluster server.
7. The system of claim 5, further comprising: and the recording module is used for acquiring the information record returned by the target terminal.
8. The system of claim 5, further comprising: a terminal configuration adjustment module configured to:
acquiring a configuration adjustment command sent by a target terminal; the target terminal is one of the micro service terminals;
and respectively sending the configuration adjustment command to the micro service terminals so that the micro service terminals perform system configuration adjustment based on the configuration adjustment command.
9. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the steps of the method of any of the preceding claims 1 to 4 are implemented when the computer program is executed by the processor.
10. A computer-readable medium having non-volatile program code executable by a processor, wherein the program code causes the processor to perform the method of any of claims 1-4.
CN201911014789.5A 2019-10-23 2019-10-23 Command execution method and system of micro-service terminal Pending CN110750314A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911014789.5A CN110750314A (en) 2019-10-23 2019-10-23 Command execution method and system of micro-service terminal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911014789.5A CN110750314A (en) 2019-10-23 2019-10-23 Command execution method and system of micro-service terminal

Publications (1)

Publication Number Publication Date
CN110750314A true CN110750314A (en) 2020-02-04

Family

ID=69279581

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911014789.5A Pending CN110750314A (en) 2019-10-23 2019-10-23 Command execution method and system of micro-service terminal

Country Status (1)

Country Link
CN (1) CN110750314A (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10037232B1 (en) * 2017-01-31 2018-07-31 Ca, Inc. Alarms with stack trace spanning logical and physical architecture
CN109033805A (en) * 2018-09-30 2018-12-18 山东电工电气集团新能科技有限公司 Intelligent power distribution terminal and authorization and authentication method with micro services authorization identifying function
CN109286633A (en) * 2018-10-26 2019-01-29 深圳市华云中盛科技有限公司 Single sign-on method, device, computer equipment and storage medium
CN109327551A (en) * 2018-12-04 2019-02-12 浩云科技股份有限公司 By the method and device of internet of things equipment access platform of internet of things, server
CN109683988A (en) * 2018-12-25 2019-04-26 鼎信信息科技有限责任公司 Micro services start method, apparatus, computer equipment and storage medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10037232B1 (en) * 2017-01-31 2018-07-31 Ca, Inc. Alarms with stack trace spanning logical and physical architecture
CN109033805A (en) * 2018-09-30 2018-12-18 山东电工电气集团新能科技有限公司 Intelligent power distribution terminal and authorization and authentication method with micro services authorization identifying function
CN109286633A (en) * 2018-10-26 2019-01-29 深圳市华云中盛科技有限公司 Single sign-on method, device, computer equipment and storage medium
CN109327551A (en) * 2018-12-04 2019-02-12 浩云科技股份有限公司 By the method and device of internet of things equipment access platform of internet of things, server
CN109683988A (en) * 2018-12-25 2019-04-26 鼎信信息科技有限责任公司 Micro services start method, apparatus, computer equipment and storage medium

Similar Documents

Publication Publication Date Title
US10320623B2 (en) Techniques for tracking resource usage statistics per transaction across multiple layers of protocols
US20170185678A1 (en) Crawler system and method
CN107577420B (en) File processing method and device and server
US11573725B2 (en) Object migration method, device, and system
US20160277496A1 (en) Method, server and system for application synchronization
WO2016184175A1 (en) Database processing method and apparatus
US20130104135A1 (en) Data center operation
CN110175157B (en) Query method and query device for column storage file
US9529578B2 (en) Automated service version upgrading
CN111240892A (en) Data backup method and device
CN115329170A (en) Webpage crawling method, device, equipment and storage medium
CN113590433B (en) Data management method, data management system, and computer-readable storage medium
CN114020368A (en) Information processing method and device based on state machine and storage medium
CN106776131B (en) Data backup method and server
CN109005163B (en) HTTP dynamic request service calling method
CN112883088B (en) Data processing method, device, equipment and storage medium
CN111767126A (en) System and method for distributed batch processing
CN104639666A (en) Domain name access method and device
CN110750314A (en) Command execution method and system of micro-service terminal
US12001458B2 (en) Multi-cloud object store access
CN114238407A (en) Pre-compiling method and system based on sub-library and sub-table middleware
CN113779122A (en) Method and apparatus for exporting data
EP3046307B1 (en) Processing method, device and system for data of distributed storage system
US12073263B1 (en) Dynamic processing of API requests
US20230289354A1 (en) Endpoint scan and profile generation

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
RJ01 Rejection of invention patent application after publication

Application publication date: 20200204