CN113032054B - Service execution method and device, storage medium and electronic device - Google Patents

Service execution method and device, storage medium and electronic device Download PDF

Info

Publication number
CN113032054B
CN113032054B CN202110431261.9A CN202110431261A CN113032054B CN 113032054 B CN113032054 B CN 113032054B CN 202110431261 A CN202110431261 A CN 202110431261A CN 113032054 B CN113032054 B CN 113032054B
Authority
CN
China
Prior art keywords
service
target
information
service information
module
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
CN202110431261.9A
Other languages
Chinese (zh)
Other versions
CN113032054A (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.)
Hangzhou Huacheng Software Technology Co Ltd
Original Assignee
Hangzhou Huacheng Software 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 Huacheng Software Technology Co Ltd filed Critical Hangzhou Huacheng Software Technology Co Ltd
Priority to CN202110431261.9A priority Critical patent/CN113032054B/en
Publication of CN113032054A publication Critical patent/CN113032054A/en
Application granted granted Critical
Publication of CN113032054B publication Critical patent/CN113032054B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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/448Execution paradigms, e.g. implementations of programming paradigms
    • G06F9/4488Object-oriented
    • G06F9/449Object-oriented method invocation or resolution
    • 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

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Telephonic Communication Services (AREA)

Abstract

The embodiment of the invention provides a service execution method, a device, a storage medium and an electronic device, wherein the method comprises the following steps: the front-end module sends a service execution request to the service management module based on the received service execution instruction; the service management module sends a first request to the resource module based on the service execution request, wherein the resource module is used for storing target service information corresponding to target service; the resource module sends a target service request to a target terminal based on the first request, wherein the target service request contains target service information; the target terminal invokes the target service based on the target service information contained in the target service request to instruct the service module to execute the target service. The invention solves the problem of low service execution efficiency in the related technology, thereby achieving the effect of improving the service execution efficiency.

Description

Service execution method and device, storage medium and electronic device
Technical Field
The embodiment of the invention relates to the field of communication, in particular to a service execution method, a device, a storage medium and an electronic device.
Background
Along with the rapid development of the internet industry, all industries are approaching to the internet science and technology age; in order to keep pace with the development of the times, a large number of different types of services, such as micro services capable of executing a required scheme, are introduced to adapt to the update iteration speed of the large environment, wherein the main purpose of introducing the micro services is to facilitate the change of the system functions, because the service change brings a certain difficulty coefficient to the management of the services and the maintenance thereof.
In this regard, a series of open source components for micro services in different fields are created, and these open source components generally provide services in a form similar to a tool kit, and require users to use the services in combination according to practical situations, but this way lacks an orderly management system, so that the service system is bulky, some feature requirements of the services are not necessarily met, and once problems occur in the use process, the difficulty of troubleshooting the problems of the service system will be increased.
Disclosure of Invention
The embodiment of the invention provides a service execution method, a device, a storage medium and an electronic device, which are used for at least solving the problem of low system service management efficiency in the related technology.
According to an embodiment of the present invention, there is provided a service execution method, applied to a service management system, including:
the front-end module sends a service execution request to the service management module based on the received service execution instruction, wherein the service execution instruction is used for indicating to execute a target service;
the service management module sends a first request to a resource module based on the service execution request, wherein the resource module is used for storing target service information corresponding to the target service;
the resource module sends a target service request to a target terminal based on the first request, wherein the target service request comprises the target service information;
and the target terminal calls the target service based on the target service information contained in the target service request so as to instruct a service module to execute the target service.
In an exemplary embodiment, before the target terminal invokes the target service based on the service information included in the first request to instruct a service module to execute the target service, the method further includes:
the target terminal sends a first calling instruction to a service docking script to instruct the service docking script to feed back first service information corresponding to a first service, wherein the first calling instruction is used for instructing the first service;
after receiving the first service information fed back by the service docking script, the target terminal performs verification processing on the first service information, and performs encapsulation processing on the first service information under the condition that a verification processing result meets a first condition so as to obtain encapsulated first service information;
the target terminal sends the packaged first service information to the resource module so as to instruct the resource module to store the first service information; wherein the first service includes the target service.
In an exemplary embodiment, the verifying the first service information by the target terminal includes:
the target terminal performs matching verification on the first service information;
the target terminal determines that the verification processing result meets the first condition under the condition that second service information corresponding to the first service information is matched, wherein the second service information is pre-stored service information of the target terminal;
and under the condition that the target terminal is not matched with second service information corresponding to the first service information, determining that the verification processing result does not meet the first condition, wherein the second service information is service information stored in advance by the target terminal.
In one exemplary embodiment of the present invention,
before the target terminal sends a first call instruction to a service docking script to instruct the service docking script to feed back first service information corresponding to the first service indicated by the first call instruction, the method further includes:
the target terminal acquires target configuration information from an operation and maintenance appointed directory, wherein the target configuration information comprises service information of one or more services;
the target terminal sends the target configuration information to the resource module;
the resource module writes the target configuration information into a management template storage catalog included in the service management system;
the target terminal invoking the target service based on the target service information contained in the target service request to instruct a service module to execute the target service includes: the target terminal calls the target service based on the target service information contained in the target service request to instruct a service module to read the target service information from the target configuration information stored in the management template storage directory, and execute the target service based on the target service information.
In an exemplary embodiment, after the target terminal sends the target configuration information to the resource module, the method further includes:
the target terminal monitors information stored in the operation and maintenance specified directory;
the target terminal acquires other configuration information under the condition that the target terminal monitors that the other configuration information except the target configuration information exists in the operation and maintenance specified directory;
and the target terminal sends the other configuration information to a resource module to instruct the resource module to update the target configuration information stored in the management template storage directory, wherein the updated target configuration information comprises the other configuration information.
According to another embodiment of the present invention, there is provided a service execution apparatus applied to a service management system, including:
the front-end module is used for sending a service execution request to the service management module based on the received service execution instruction, wherein the service execution instruction is used for indicating to execute the target service;
the service management module is used for sending a first request to the resource module based on the service execution request, wherein the resource module is used for storing target service information corresponding to the target service;
the resource module is used for sending a target service request to a target terminal based on the first request, wherein the target service request comprises the target service information;
and the terminal module is used for calling the target service based on the target service information contained in the target service request so as to instruct the service module to execute the target service.
In an exemplary embodiment, the terminal module further includes:
a first instruction sending unit, configured to send a first call instruction to a service docking script to instruct the service docking script to feed back first service information corresponding to a first service, before the service information included in the first request is based on the service information to call the target service to instruct a service module to execute the target service, where the first call instruction is used to instruct the first service;
the verification unit is used for carrying out verification processing on the first service information after receiving the first service information fed back by the service docking script, and carrying out encapsulation processing on the first service information to obtain encapsulated first service information under the condition that a verification processing result meets a first condition;
a first information sending unit, configured to send the encapsulated first service information to the resource module, so as to instruct the resource module to store the first service information; wherein the first service includes the target service.
In an exemplary embodiment, the verification unit includes:
a matching verification subunit, configured to perform matching verification on the first service information;
a first determining subunit, configured to determine that the verification processing result meets the first condition when second service information corresponding to the first service information is matched, where the second service information is service information stored in advance by the target terminal;
and the second determining subunit is used for determining that the verification processing result does not meet the first condition under the condition that second service information corresponding to the first service information is not matched, wherein the second service information is the service information stored in advance by the target terminal.
According to a further embodiment of the invention, there is also provided a storage medium having stored therein a computer program, wherein the computer program is arranged to perform the steps of any of the method embodiments described above when run.
According to a further embodiment of the invention, there is also provided an electronic device comprising a memory having stored therein a computer program and a processor arranged to run the computer program to perform the steps of any of the method embodiments described above.
According to the invention, the target service can be rapidly executed based on the predetermined service information, so that the control of the target service can be conveniently realized by managing the service information, and therefore, the problem of low service execution efficiency in the related technology can be solved, and the effect of improving the system service execution efficiency is achieved.
Drawings
Fig. 1 is a block diagram of a hardware structure of a mobile terminal of a service execution method according to an embodiment of the present invention;
FIG. 2 is a flow chart of a service execution method according to an embodiment of the present invention;
fig. 3 is a block diagram of a service execution apparatus according to an embodiment of the present invention;
FIG. 4 is a block flow diagram I according to an embodiment of the present invention;
FIG. 5 is a second flow diagram according to an embodiment of the present invention;
FIG. 6 is a flow diagram III according to a specific embodiment of the present invention;
fig. 7 is a flow diagram four in accordance with a specific embodiment of the present invention.
Detailed Description
Embodiments of the present invention will be described in detail below with reference to the accompanying drawings in conjunction with the embodiments.
It should be noted that the terms "first," "second," and the like in the description and the claims of the present invention and the above figures are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order.
The method embodiments provided in the embodiments of the present application may be performed in a mobile terminal, a computer terminal or similar computing device. Taking the mobile terminal as an example, fig. 1 is a block diagram of a hardware structure of a mobile terminal according to a service execution method according to an embodiment of the present invention. As shown in fig. 1, a mobile terminal may include one or more (only one is shown in fig. 1) processors 102 (the processor 102 may include, but is not limited to, a microprocessor MCU or a processing device such as a programmable logic device FPGA) and a memory 104 for storing data, wherein the mobile terminal may also include a transmission device 106 for communication functions and an input-output device 108. It will be appreciated by those skilled in the art that the structure shown in fig. 1 is merely illustrative and not limiting of the structure of the mobile terminal described above. For example, the mobile terminal may also include more or fewer components than shown in fig. 1, or have a different configuration than shown in fig. 1.
The memory 104 may be used to store a computer program, for example, a software program of application software and a module, such as a computer program corresponding to a service execution method in an embodiment of the present invention, and the processor 102 executes the computer program stored in the memory 104 to perform various functional applications and data processing, that is, implement the method described above. Memory 104 may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 104 may further include memory remotely located relative to the processor 102, which may be connected to the mobile terminal via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The transmission means 106 is arranged to receive or transmit data via a network. Specific examples of the network described above may include a wireless network provided by a communication provider of the mobile terminal. In one example, the transmission device 106 includes a network adapter (Network Interface Controller, simply referred to as NIC) that can connect to other network devices through a base station to communicate with the internet. In one example, the transmission device 106 may be a Radio Frequency (RF) module, which is used to communicate with the internet wirelessly.
In this embodiment, a service execution method is provided, and the service execution method is applied to a service management system, and fig. 2 is a flowchart of a service execution method according to an embodiment of the present invention, as shown in fig. 2, where the flowchart includes the following steps:
step S202, a front-end module sends a service execution request to a service management module based on a received service execution instruction, wherein the service execution instruction is used for indicating to execute a target service;
in this embodiment, the front-end module may be, but is not limited to, a web front-end, or may be a remote control end, such as a remote console, a mobile control end, etc.; the service management module may be, but is not limited to, a module or device with a management control function, such as a device or module including a CPU (Central Processing Unit ), MCU, FPGA (Field Programmable Gate Array, field programmable gate array), PLC (Programmable Logic Controller ), etc.; the target service may be, but is not limited to, a micro-service to be executed by a service container or a micro-service unit; the service execution instruction and the service execution request can be electric signals with waveforms such as square waves, sawtooth waves, sine waves and the like, can also be data packets containing a plurality of pieces of information, and can be transmitted in an Ethernet or Bluetooth communication mode or in a wireless communication mode such as 3G/4G/5G/quantum communication mode correspondingly; the service management system may be, but is not limited to, a module or device including a client for uploading target service information, a processing end for performing data processing, and a server for executing related services.
Step S204, the service management module sends a first request to the resource module based on the service execution request, wherein the resource module is used for storing target service information corresponding to target service;
in this embodiment, the target service information corresponding to the target service is stored in the resource module in advance, so that when the target service is executed, the target service information can be directly called from the resource module, and then the corresponding port, address information and the like are called according to the target service information to execute the target service, thereby improving the execution efficiency of the target service.
The target service information comprises identification information, identity information, address information, executed micro-service information, configuration information, information of a port required to be called by executing the target service and the like of the target service; the resource module may be, but is not limited to, a device, a module, or a protocol stack that has a storage function and may perform an information forwarding function, for example, a local storage module or a storage device built in the service management system, an external cloud storage, and so on.
Step S206, the resource module sends a target service request to the target terminal based on the first request, wherein the target service request contains target service information;
in this embodiment, the target terminal may be (but is not limited to) an Agent, such as an Agent, and the target service request may be (but is not limited to) an electrical signal with a waveform such as a square wave, a sawtooth wave, a sine wave, or the like, or may be a data packet containing a plurality of information, and the transmission mode of the target service request may be transmitted through ethernet or bluetooth communication, or may be transmitted through a wireless communication mode such as 3G/4G/5G/quantum communication.
In step S208, the target terminal invokes the target service based on the target service information included in the target service request, to instruct the service module to execute the target service.
In this embodiment, the service module may be a built-in device or module such as a single-chip microcomputer or CPU, MCU, FPGA, PLC, or may be an external device or module such as an industrial computer.
Through the steps, the target service can be rapidly executed based on the predetermined service information, so that the control of the target service is conveniently realized by managing the service information, the problem of low execution efficiency of the target service in the related technology is solved, and the execution efficiency of the system service is improved. The main execution body of the above steps may be the aforementioned service management system, or a controller, a processor, or other devices with similar processing capabilities, which are included in the service management system, but not limited thereto.
In an alternative embodiment, before the target terminal invokes the target service based on the service information included in the first request to instruct the service module to execute the target service, the method further includes:
step S2082, the target terminal sends a first calling instruction to the service docking script to instruct the service docking script to feed back first service information corresponding to the first service, wherein the first calling instruction is used for instructing the first service;
step S2084, after receiving the first service information fed back by the service docking script, the target terminal performs verification processing on the first service information, and encapsulates the first service information to obtain encapsulated first service information when the verification processing result meets the first condition;
step S2086, the target terminal sends the packaged first service information to the resource module to instruct the resource module to store the first service information; wherein the first service comprises a target service.
In this embodiment, before the target terminal invokes the service information, the first service information corresponding to the first service needs to be sent to the resource module for storage, so that the corresponding target service information can be invoked quickly when the target service is executed.
The service docking script may be, but is not limited to, storage-data node (child node service storing service), greenplus (large independent script), etc., and it is to be noted that, when the service docking script feeds back the first service information, it is executed by using a root user, if the service needs to be executed by other users, it is required to switch users in the service docking script, and after executing the corresponding action, the service docking script needs to be immediately exited; then the target terminal judges whether the service docking script is normally ended according to the service docking script exit code, and if the service docking script has error information output, the target terminal reports the error information; the service information is packaged to facilitate the resource module to identify the service information, and simultaneously facilitate the transmission of information data, thereby improving the information transmission efficiency; the first service information is checked to ensure validity of the first service information, so as to avoid illegal service execution during service execution.
In an alternative embodiment, the verification processing of the first service information by the target terminal includes:
step S20842, the target terminal performs matching verification on the first service information;
step S20844, determining that the verification processing result meets the first condition when the target terminal is matched with second service information corresponding to the first service information, wherein the second service information is pre-stored service information of the target terminal;
in step S20846, the target terminal determines that the verification result does not satisfy the first condition when the target terminal does not match the second service information corresponding to the first service information, where the second service information is the service information stored in advance by the target terminal.
In this embodiment, the matching of the first service information with the pre-stored second service information is to determine validity of the first service information, so as to avoid the service module from executing the corresponding target service according to the wrong or illegal information, and ensure accurate execution of the service.
In an alternative embodiment, before the target terminal sends the first call instruction to the service docking script to instruct the service docking script to feed back the first service information corresponding to the first service indicated by the first call instruction, the method further includes:
step S20802, the target terminal collects target configuration information from the operation and maintenance appointed catalogue, wherein the target configuration information comprises service information of one or more services;
step S20804, the target terminal sends the target configuration information to the resource module;
step S20806, the resource module writes the target configuration information into a management template storage catalog included in the service management system;
the target terminal calling the target service based on the target service information contained in the target service request to instruct the service module to execute the target service includes:
in step S2088, the target terminal invokes the target service based on the target service information included in the target service request, to instruct the service module to read the target service information from the target configuration information stored in the management template storage directory, and execute the target service based on the target service information.
In this embodiment, the target configuration information is written into the management template storage directory, so that the corresponding configuration can be invoked when the target service is executed.
The target configuration information may be obtained through ethernet or bluetooth communication, or may be obtained through wireless communication modes such as 3G/4G/5G/quantum communication; the management template storage catalog can be a storage module or unit which is arranged in the service management system and used for storing the target configuration information, and can also be an external storage device or module, such as a cloud storage and the like.
In an alternative embodiment, after the target terminal sends the target configuration information to the resource module, the method further includes:
step S208042, the target terminal monitors information stored in the operation and maintenance specified directory;
step S208044, the target terminal collects other configuration information when the target terminal monitors that other configuration information except the target configuration information exists in the operation and maintenance specified directory;
in step S208046, the target terminal sends other configuration information to the resource module to instruct the resource module to update the target configuration information stored in the management template storage directory, where the updated target configuration information includes other configuration information.
In this embodiment, the information stored in the operation and maintenance specified directory is monitored to determine whether new target configuration information is received, so that the corresponding determination of the management mode and the determination of the access control mode can be performed in time according to the received new target configuration information.
For example, when the target terminal monitors that the operation and maintenance designated directory stores a new configuration file, the target terminal reports the new configuration file to the resource module, and then the resource module generates a file information record and files the new configuration file to the management template storage directory.
From the description of the above embodiments, it will be clear to a person skilled in the art that the method according to the above embodiments may be implemented by means of software plus the necessary general hardware platform, but of course also 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. ROM/RAM, magnetic disk, optical disk) comprising instructions for causing a terminal device (which may be a mobile phone, a computer, a server, or a network device, etc.) to perform the method according to the embodiments of the present invention.
The embodiment also provides a service execution device, which is used for implementing the above embodiment and the preferred implementation manner, and is not described in detail. As used below, the term "module" may be a combination of software and/or hardware that implements a predetermined function. While the means described in the following embodiments are preferably implemented in software, implementation in hardware, or a combination of software and hardware, is also possible and contemplated.
Fig. 3 is a block diagram of a service management apparatus according to an embodiment of the present invention, which is applied to a service management system, as shown in fig. 3, and includes:
the front-end module 32 is configured to send a service execution request to the service management module based on a received service execution instruction, where the service execution instruction is used to instruct to execute a target service;
the service management module 34 is configured to send a first request to the resource module based on the service execution request, where the resource module is configured to store target service information corresponding to the target service;
a resource module 36, configured to send a target service request to a target terminal based on the first request, where the target service request includes target service information;
the terminal module 38 is configured to invoke the target service based on the target service information included in the target service request, so as to instruct the service module to execute the target service.
In an alternative embodiment, the terminal module 38 further includes:
a first instruction sending unit 382, configured to send a first call instruction to the service docking script to instruct the service docking script to feed back first service information corresponding to the first service, before calling the target service based on the service information included in the first request to instruct the service module to execute the target service, where the first call instruction is used to instruct the first service;
the verification unit 384 is configured to perform verification processing on the first service information after receiving the first service information fed back by the service docking script, and perform encapsulation processing on the first service information to obtain encapsulated first service information if a verification processing result meets a first condition;
a first information sending unit 386, configured to send the encapsulated first service information to the resource module, so as to instruct the resource module to store the first service information; wherein the first service comprises a target service.
In an alternative embodiment, the verification unit 384 includes:
a matching verification subunit 3842, configured to perform matching verification on the first service information;
a first determining subunit 3844, configured to determine that the verification processing result meets a first condition when the second service information corresponding to the first service information is matched, where the second service information is service information stored in advance by the target terminal;
and a second determining subunit 3846, configured to determine that the verification processing result does not meet the first condition if the second service information corresponding to the first service information is not matched, where the second service information is service information stored in advance by the target terminal.
In an alternative embodiment, the first instruction sending unit 382 includes:
the configuration information collection subunit 3822 is configured to collect, before the target terminal sends a first call instruction to the service docking script to instruct the service docking script to feed back first service information corresponding to the first service indicated by the first call instruction, target configuration information from the operation and maintenance specified directory, where the target configuration information includes service information of one or more services;
a configuration information transmitting subunit 3824, configured to transmit the target configuration information to the resource module;
the terminal module 38 further includes:
and a service execution unit 388 for calling the target service based on the target service information contained in the target service request to instruct the service module to read the target service information from the target configuration information stored in the management template storage directory, and execute the target service based on the target service information.
In an alternative embodiment, configuration information sending subunit 3824 further comprises:
an information monitoring subunit 38242, configured to monitor information stored in the operation and maintenance specified directory after sending the target configuration information to the resource module;
the other information collecting subunit 38244 is configured to collect other configuration information by the target terminal when it is detected that other configuration information except the target configuration information exists in the operation and maintenance specified directory;
the other information sending subunit 38246 is configured to send other configuration information to the resource module, so as to instruct the resource module to update the target configuration information stored in the management template storage directory, where the updated target configuration information includes other configuration information.
As shown in fig. 4, the system includes the following modules:
an access mode determining module 001, configured to determine specification information of access to a target service, and complete an automatic access calling function of the target service;
a management mode determining module 002 for determining service management specifications to implement flexible management functions for different services;
the protocol determining module 003 is used for determining an interaction protocol so as to realize friendly interaction process with a user through a service providing analysis template engine at the front end and the rear end;
the standard acquisition module 004 is used for carrying out standard acquisition so as to realize the standard acquisition determined by the access mode determination module 001 and the management mode determination module 002;
the service management module 005 is configured to perform service management, and mainly complete a general interface where a service needs to implement a function according to a specification provided by the service.
As shown in fig. 5 and 6, the determination of the service management method includes the following steps:
step S501, the agents in the respective servers are responsible for collecting from the designated directory (corresponding to step S501 in fig. 5 and step S601 in fig. 6), and reporting to the resource module (corresponding to step S602 in fig. 6);
in step S502, the action is triggered after the server is managed by the nanotubes, and the resource module records the file information and writes the file information into the specified directory (corresponding to step S501 in fig. 5 and steps S602-S604 in fig. 6). In the process of installing software, each service configuration file copies each service installation configuration to an operation and maintenance appointed directory; when the Agent monitors that the operation and maintenance appointed directory has a new configuration file, actively reporting the new configuration file to a resource service (corresponding to step S605 in FIG. 6); the resource service generates a file information record and files the service configuration file to a specified directory.
In step S503, the service module reads the configuration file from the archived directory and provides related service installation, upgrading, formatting and management of each service function level thereof, and also provides interactive display effect with the front-end interface (corresponding to step S503 in fig. 5).
The determination of the access control mode includes the following:
1) Performing definition of service script names of service access control;
service script names use a large class-type inside angle format, such as Storage-Manager (management node service of Storage service), storage-DataNode (child node service of Storage service), if the large class-type inside angle format cannot be determined, the large class type inside angle can be the same, such as Tomcat-Tomcat, if the cluster mode needs to be controlled through the cluster entrance, then a new class independent script, such as greenplus, needs to be added;
2) Executing the definition of script interface names and parameters of service access control;
the interface names provided by the service scripts are unified in hump format, and the first letter is small. For example:
Storage-Manager deleteDataNode 127.0.0.1。
the parameter names of the service and operation convention are unified to be in hump format, and the first letter is small. For example: busineddress, heatbeataddress.
3) A flow specification for executing script execution of service access control;
the Agent executes all service scripts by using root users, if the service needs to be executed by other users, the users need to be switched in the scripts, and after the corresponding actions are executed, the scripts need to be immediately exited.
And judging whether the script is normally ended or not by the Agent according to the script exit code, if the script has error information output, inputting information beginning with 'errMessage:' in one line, and reporting the error information by the Agent.
4) Defining a service script interface for executing service access control;
the script implementer needs to implement the agreed interfaces according to the specifications and complete the corresponding functions, and also supports the service custom interfaces to interface with the operation and maintenance, and the names and parameters of the custom interfaces are defined by the service side and inform the operation and maintenance.
If the service is required to be automatically pulled up when the service is abnormally exited, a monitoring script monitor of the service also needs to be realized.
It should be noted that: when the service is started through the service script, the service is started first and then the monitor is started; when stopping service, the monitor should be stopped first, and then the service should be stopped; when the service and monitoring are started, it is required to determine whether the service and monitoring are started or not, otherwise unpredictable errors may be caused, for example, when a plurality of monitoring are started, a plurality of services may be pulled.
As shown in fig. 7, the step of the interaction policy from the protocol front end interaction interface of the service access specification determined according to 001 to the business service layer based on the service management system of the module engine service dynamic access includes:
step S701, a Web front end analysis template sends a service request execution instruction;
step S702, service management assembles corresponding requests according to the agreed attributes;
step S703, the service management sends an encapsulation request to the resource module;
step S704, the resource module sends the service request execution instruction to the Agent after packaging the service request execution instruction;
step S705, the Agent sends an instruction for calling the corresponding service to the server;
step S706, the server side realizes corresponding functions according to self configuration;
in step S707, the server feeds back the service result.
It should be noted that, the service management system based on dynamic access of the module engine service, according to 003, makes an interaction protocol, which is mainly reflected in step S701, specifically includes:
the engagement of the Web front end to the service template parsing rule is mainly reflected in service display effect and service implementation function, taking the display effect as an example, for example: a displaypype select, the instruction indicating that the presentation type needs to be presented using a drop-down box form; taking service implementation functions as an example, for example: action stop, the instruction indicating stopping a service function.
Embodiments of the present invention also provide a computer readable storage medium having a computer program stored therein, wherein the computer program is arranged to perform the steps of any of the method embodiments described above when run.
In one exemplary embodiment, the computer readable storage medium may include, but is not limited to: a usb disk, a Read-Only Memory (ROM), a random access Memory (Random Access Memory, RAM), a removable hard disk, a magnetic disk, or an optical disk, or other various media capable of storing a computer program.
An embodiment of the invention also provides an electronic device comprising a memory having stored therein a computer program and a processor arranged to run the computer program to perform the steps of any of the method embodiments described above.
In an exemplary embodiment, the electronic apparatus may further include a transmission device connected to the processor, and an input/output device connected to the processor.
Specific examples in this embodiment may refer to the examples described in the foregoing embodiments and the exemplary implementation, and this embodiment is not described herein.
It will be appreciated by those skilled in the art that the modules or steps of the invention described above may be implemented in a general purpose computing device, they may be concentrated on a single computing device, or distributed across a network of computing devices, they may be implemented in program code executable by computing devices, so that they may be stored in a storage device for execution by computing devices, and in some cases, the steps shown or described may be performed in a different order than that shown or described herein, or they may be separately fabricated into individual integrated circuit modules, or multiple modules or steps of them may be fabricated into a single integrated circuit module. Thus, the present invention is not limited to any specific combination of hardware and software.
The above description is only of the preferred embodiments of the present invention and is not intended to limit the present invention, but various modifications and variations can be made to the present invention by those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the principle of the present invention should be included in the protection scope of the present invention.

Claims (10)

1. A service execution method, applied to a service management system, comprising:
the front-end module sends a service execution request to the service management module based on the received service execution instruction, wherein the service execution instruction is used for indicating to execute a target service;
the service management module sends a first request to a resource module based on the service execution request, wherein the resource module is used for storing target service information corresponding to the target service;
the resource module sends a target service request to a target terminal based on the first request, wherein the target service request comprises the target service information;
and the target terminal calls the target service based on the target service information contained in the target service request so as to instruct a service module to execute the target service.
2. The method of claim 1, wherein before the target terminal invokes the target service based on the service information contained in the first request to instruct a service module to execute the target service, the method further comprises:
the target terminal sends a first calling instruction to a service docking script to instruct the service docking script to feed back first service information corresponding to a first service, wherein the first calling instruction is used for instructing the first service;
after receiving the first service information fed back by the service docking script, the target terminal performs verification processing on the first service information, and performs encapsulation processing on the first service information under the condition that a verification processing result meets a first condition so as to obtain encapsulated first service information;
the target terminal sends the packaged first service information to the resource module so as to instruct the resource module to store the first service information; wherein the first service includes the target service.
3. The method of claim 2, wherein the verifying the first service information by the target terminal comprises:
the target terminal performs matching verification on the first service information;
the target terminal determines that the verification processing result meets the first condition under the condition that second service information corresponding to the first service information is matched, wherein the second service information is pre-stored service information of the target terminal;
and under the condition that the target terminal is not matched with second service information corresponding to the first service information, determining that the verification processing result does not meet the first condition, wherein the second service information is service information stored in advance by the target terminal.
4. The method of claim 2, wherein before the target terminal sends a first call instruction to a service docking script to instruct the service docking script to feed back first service information corresponding to the first service indicated by the first call instruction, the method further comprises:
the target terminal acquires target configuration information from an operation and maintenance appointed directory, wherein the target configuration information comprises service information of one or more services;
the target terminal end sends the target configuration information to the resource module;
the resource module writes the target configuration information into a management template storage catalog included in the service management system;
the target terminal invoking the target service based on the target service information contained in the target service request to instruct a service module to execute the target service includes: the target terminal calls the target service based on the target service information contained in the target service request to instruct a service module to read the target service information from the target configuration information stored in the management template storage directory, and execute the target service based on the target service information.
5. The method of claim 4, wherein after the target terminal sends the target configuration information to the resource module, the method further comprises:
the target terminal monitors information stored in the operation and maintenance specified directory;
the target terminal acquires other configuration information under the condition that the target terminal monitors that the other configuration information except the target configuration information exists in the operation and maintenance specified directory;
and the target terminal sends the other configuration information to a resource module to instruct the resource module to update the target configuration information stored in the management template storage directory, wherein the updated target configuration information comprises the other configuration information.
6. A service execution apparatus, which is applied to a service management system, comprising:
the front-end module is used for sending a service execution request to the service management module based on the received service execution instruction, wherein the service execution instruction is used for indicating to execute the target service;
the service management module is used for sending a first request to the resource module based on the service execution request, wherein the resource module is used for storing target service information corresponding to the target service;
the resource module is used for sending a target service request to a target terminal based on the first request, wherein the target service request comprises the target service information;
and the terminal module is used for calling the target service based on the target service information contained in the target service request so as to instruct the service module to execute the target service.
7. The apparatus of claim 6, wherein the terminal module further comprises:
a first instruction sending unit, configured to send a first call instruction to a service docking script to instruct the service docking script to feed back first service information corresponding to a first service, before the service information included in the first request is based on the service information to call the target service to instruct a service module to execute the target service, where the first call instruction is used to instruct the first service;
the verification unit is used for carrying out verification processing on the first service information after receiving the first service information fed back by the service docking script, and carrying out encapsulation processing on the first service information to obtain encapsulated first service information under the condition that a verification processing result meets a first condition;
a first information sending unit, configured to send the encapsulated first service information to the resource module, so as to instruct the resource module to store the first service information; wherein the first service includes the target service.
8. The apparatus of claim 7, wherein the verification unit comprises:
a matching verification subunit, configured to perform matching verification on the first service information;
a first determining subunit, configured to determine that the verification processing result meets the first condition when second service information corresponding to the first service information is matched, where the second service information is service information stored in advance by the target terminal;
and the second determining subunit is used for determining that the verification processing result does not meet the first condition under the condition that second service information corresponding to the first service information is not matched, wherein the second service information is the service information stored in advance by the target terminal.
9. A storage medium having a computer program stored therein, wherein the computer program is arranged to perform the method of any of claims 1 to 5 when run.
10. An electronic device comprising a memory and a processor, characterized in that the memory has stored therein a computer program, the processor being arranged to run the computer program to perform the method of any of the claims 1 to 5.
CN202110431261.9A 2021-04-21 2021-04-21 Service execution method and device, storage medium and electronic device Active CN113032054B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110431261.9A CN113032054B (en) 2021-04-21 2021-04-21 Service execution method and device, storage medium and electronic device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110431261.9A CN113032054B (en) 2021-04-21 2021-04-21 Service execution method and device, storage medium and electronic device

Publications (2)

Publication Number Publication Date
CN113032054A CN113032054A (en) 2021-06-25
CN113032054B true CN113032054B (en) 2023-07-14

Family

ID=76457173

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110431261.9A Active CN113032054B (en) 2021-04-21 2021-04-21 Service execution method and device, storage medium and electronic device

Country Status (1)

Country Link
CN (1) CN113032054B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113760409B (en) * 2021-09-09 2024-06-18 广州市百果园网络科技有限公司 Service instance management method, device, equipment and storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106020777A (en) * 2016-04-29 2016-10-12 杭州华橙网络科技有限公司 Data processing method, device and system
WO2017000207A1 (en) * 2015-06-30 2017-01-05 深圳市星电商科技有限公司 Data interaction processing method, device and system
WO2017067230A1 (en) * 2015-10-21 2017-04-27 中兴通讯股份有限公司 Software function expansion method and apparatus based on micro service architecture
CN109861842A (en) * 2018-11-23 2019-06-07 阿里巴巴集团控股有限公司 O&M method, apparatus, electronic equipment and the storage medium of server cluster
CN110532020A (en) * 2019-09-04 2019-12-03 中国工商银行股份有限公司 A kind of data processing method of micro services layout, apparatus and system
CN111381835A (en) * 2018-12-28 2020-07-07 ***通信集团江西有限公司 Method, device, equipment and medium for registering and discovering technical service component

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2017000207A1 (en) * 2015-06-30 2017-01-05 深圳市星电商科技有限公司 Data interaction processing method, device and system
WO2017067230A1 (en) * 2015-10-21 2017-04-27 中兴通讯股份有限公司 Software function expansion method and apparatus based on micro service architecture
CN106020777A (en) * 2016-04-29 2016-10-12 杭州华橙网络科技有限公司 Data processing method, device and system
CN109861842A (en) * 2018-11-23 2019-06-07 阿里巴巴集团控股有限公司 O&M method, apparatus, electronic equipment and the storage medium of server cluster
CN111381835A (en) * 2018-12-28 2020-07-07 ***通信集团江西有限公司 Method, device, equipment and medium for registering and discovering technical service component
CN110532020A (en) * 2019-09-04 2019-12-03 中国工商银行股份有限公司 A kind of data processing method of micro services layout, apparatus and system

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
基于微服务框架的地理空间数据服务平台设计与实现技术研究;罗杨;《中国优秀硕士学位论文全文数据库 基础科学辑》(第02期);A008-157 *

Also Published As

Publication number Publication date
CN113032054A (en) 2021-06-25

Similar Documents

Publication Publication Date Title
CN107547589B (en) Data acquisition processing method and device
CN108370341B (en) Resource allocation method, virtual network function manager and network element management system
EP3200071A1 (en) Runtime environment configuration method, device and system
US10187272B2 (en) Interface management service entity, function service entity, and element management method
CN101771565B (en) Analogy method for realizing multitudinous or different baseboard management controllers by single server
WO2017032112A1 (en) Method for communicating with board having no central processing unit and communication device
US11740997B2 (en) Method and apparatus for debugging a device
CN116719700B (en) Method and device for monitoring hardware partition of server host system
CN103109497B (en) For measuring the dynamic-configuration of the interconnect equipment of net neutral energy characteristic
KR102210289B1 (en) Hardware management communication protocol
WO2019062634A1 (en) Communication method and apparatus
CN111625419A (en) Log acquisition method, system, equipment and computer readable storage medium
CN113032054B (en) Service execution method and device, storage medium and electronic device
CN110058900B (en) Data transmission service system based on pluggable component framework
CN108733545B (en) Pressure testing method and device
CN114554618A (en) Wireless access point device, equipment access method, equipment and storage medium
CN113010379B (en) Electronic equipment monitoring system
CN113282308A (en) Mirror image construction method and device, storage medium and electronic device
CN114726789A (en) Method, device, equipment and medium for traffic management and traffic management policy configuration
CN112399446A (en) Edge gateway communication method, device, computer equipment and storage medium
CN110096414A (en) A kind of server monitoring method, device, equipment and medium
CN110955537B (en) Method and device for containing pipes by physical machine
CN113055493B (en) Data packet processing method, device, system, scheduling device and storage medium
CN114461501A (en) Resource abnormality detection method and device, storage medium, and electronic device
CN113076128B (en) Method, device, electronic equipment and storage medium for robot configuration

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