CN110825391A - Service management method, device, electronic equipment and storage medium - Google Patents

Service management method, device, electronic equipment and storage medium Download PDF

Info

Publication number
CN110825391A
CN110825391A CN201911054615.1A CN201911054615A CN110825391A CN 110825391 A CN110825391 A CN 110825391A CN 201911054615 A CN201911054615 A CN 201911054615A CN 110825391 A CN110825391 A CN 110825391A
Authority
CN
China
Prior art keywords
map data
data structure
target service
target
deployment
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.)
Granted
Application number
CN201911054615.1A
Other languages
Chinese (zh)
Other versions
CN110825391B (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 Kingsoft Cloud Network Technology Co Ltd
Beijing Kingsoft Cloud Technology Co Ltd
Original Assignee
Beijing Kingsoft Cloud Network Technology Co Ltd
Beijing Kingsoft Cloud 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 Kingsoft Cloud Network Technology Co Ltd, Beijing Kingsoft Cloud Technology Co Ltd filed Critical Beijing Kingsoft Cloud Network Technology Co Ltd
Priority to CN201911054615.1A priority Critical patent/CN110825391B/en
Publication of CN110825391A publication Critical patent/CN110825391A/en
Application granted granted Critical
Publication of CN110825391B publication Critical patent/CN110825391B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/40Transformation of program code
    • G06F8/41Compilation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q10/00Administration; Management
    • G06Q10/10Office automation; Time management
    • G06Q10/103Workflow collaboration or project management
    • 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
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Abstract

The embodiment of the application provides a service management method, a service management device, electronic equipment and a storage medium, which are applied to the technical field of computers, wherein the method comprises the following steps: acquiring target services to be deployed and an incidence relation of the target services, wherein the incidence relation comprises a plurality of map data structures, and the map data structures represent the sequence of chained deployment of the target services with dependency relations; and deploying the target services of the map data structures by using a preset thread group according to the sequence of chained deployment of the target services with dependency relationships in the map data structures. According to the service management method, the target services of the map data structures are deployed according to the sequence of chained deployment of the target services with the dependency relationship in the map data structures, automatic deployment of the target services can be achieved, manual workload is reduced, and service deployment efficiency is improved.

Description

Service management method, device, electronic equipment and storage medium
Technical Field
The present application relates to the field of computer technologies, and in particular, to a service management method and apparatus, an electronic device, and a storage medium.
Background
The upper-layer business system of the enterprise cloud comprises two subsystems, namely a tenant console and a business operation platform. The upper layer service system covers hundreds of services such as a plurality of service lines and a plurality of support platforms, and languages used by the services are different, for example, the services include languages such as JAVA, Python, gold, PHP (Hypertext Preprocessor), js (javascript), and the like, and environments and methods for deploying the services are also various, and a technology stack is also not uniform.
In the related art, operators are required to compile, package and deploy each service to a private environment of a user manually, and the manual workload is large.
Disclosure of Invention
An object of the embodiments of the present application is to provide a service management method, an apparatus, an electronic device, and a storage medium, so as to reduce manual workload. The specific technical scheme is as follows:
in a first aspect, an embodiment of the present application provides a service management method, where the method includes:
acquiring target services to be deployed and an incidence relation of the target services, wherein the incidence relation comprises a plurality of map data structures, and the map data structures represent the sequence of chained deployment of the target services with dependency relations;
and deploying the target services of the map data structures according to the sequence of chained deployment of the target services with the dependency relationship in the map data structures by using a preset thread group.
In one possible implementation, the preset thread group includes a plurality of threads, where the plurality of threads are used to deploy, in parallel, a target service of each of the map data structures.
In one possible embodiment, the method further comprises:
obtaining the number of map data structures in the incidence relation to obtain the target number;
and establishing a preset thread group comprising the threads with the target number according to the target number.
In a possible implementation manner, the deploying, by using a preset thread group, the target services of each map data structure according to the sequence of chained deployment of the target services having a dependency relationship in each map data structure includes:
determining a map data structure corresponding to each thread in the preset thread group;
and aiming at each map data structure, deploying the target service of the map data structure by utilizing the thread corresponding to the map data structure based on the sequence of chained deployment of the target services with the dependency relationship in the map data structure.
In a possible implementation manner, the deploying, for each map data structure, the target services of each map data structure by using the threads corresponding to the map data structure based on the sequence of chained deployment of the target services having a dependency relationship in the map data structure includes:
for each map data structure, determining a target service to be deployed currently in the map data structure based on the sequence of chained deployment of each target service with a dependency relationship in the map data structure;
if the target service to be deployed currently in the map data structure is compiled and packaged, acquiring the compiled and packaged target service to be deployed currently and deploying the target service by using a thread corresponding to the map data structure;
if the target service to be deployed currently in the map data structure is not compiled and packaged, compiling, packaging and deploying the target service to be deployed currently by using a thread corresponding to the map data structure;
and returning to each map data structure, and determining the current target service to be deployed in the map data structure based on the sequence of chained deployment of the target services with the dependency relationship in the map data structure, and continuing to execute the step until the target services of the map data structures are deployed completely.
In one possible embodiment, the method further comprises:
caching compiled and packaged target service storage, and storing the identification of each cached compiled and packaged target service to a specified position;
if the target service to be deployed currently in the map data structure is compiled and packaged, the method comprises the following steps:
if the specified position stores the identifier of the target service to be deployed currently in the map data structure;
if the target service to be deployed currently in the map data structure is not compiled and packaged, the method comprises the following steps:
and if the specified position does not store the identifier of the target service to be deployed currently in the map data structure.
In one possible embodiment, the method further comprises:
recording the deployment state of each target service when a preset backup rule is met;
and when a deployment state recovery instruction is acquired, continuing to deploy each target service according to the deployment state.
In a second aspect, an embodiment of the present application provides a service management apparatus, where the apparatus includes:
the system comprises an incidence relation acquisition module, a correlation analysis module and a correlation analysis module, wherein the incidence relation acquisition module is used for acquiring each target service to be deployed and the incidence relation of each target service, the incidence relation comprises a plurality of map data structures, and the map data structures represent the sequence of chained deployment of each target service with a dependency relation;
and the target service deployment module is used for deploying the target services of the map data structures according to the sequence of the chained deployment of the target services with the dependency relationship in the map data structures by using a preset thread group.
In one possible implementation, the preset thread group includes a plurality of threads, where the plurality of threads are used to deploy, in parallel, a target service of each of the map data structures.
In a possible embodiment, the apparatus further comprises:
the target data acquisition module is used for acquiring the number of the map data structures in the incidence relation to obtain the target number;
and the thread group establishing module is used for establishing a preset thread group comprising the threads with the target number according to the target number.
In one possible embodiment, the target service deployment module includes:
the corresponding relation determining submodule is used for determining a map data structure corresponding to each thread in the preset thread group;
and the target service deployment submodule is used for deploying the target service of the map data structure by utilizing the thread corresponding to the map data structure based on the sequence of chained deployment of each target service with dependency relationship in the map data structure aiming at each map data structure.
In one possible embodiment, the target service deployment submodule includes:
the current service determining unit is used for determining the current target service to be deployed in each map data structure based on the sequence of chained deployment of the target services with the dependency relationship in the map data structure;
the first deployment unit is used for acquiring and deploying the compiled and packaged target service to be deployed currently by utilizing a thread corresponding to the map data structure if the target service to be deployed currently in the map data structure is compiled and packaged;
the second deployment unit is used for compiling, packaging and deploying the target service to be deployed currently by utilizing the thread corresponding to the map data structure if the target service to be deployed currently in the map data structure is not compiled and packaged;
and returning to the execution unit, and returning to the current service determination unit to continue executing until the target services of the map data structures are deployed completely.
In a possible embodiment, the apparatus further comprises:
the data caching module is used for caching the compiled and packaged target service storage and storing the identifier of each cached compiled and packaged target service to a specified position;
the first deployment unit is specifically configured to: if the specified position stores the identifier of the target service to be deployed currently in the map data structure, acquiring the compiled and packaged target service to be deployed currently by using the thread corresponding to the map data structure and deploying the target service;
the second deployment unit is specifically configured to, if the identifier of the target service to be currently deployed in the map data structure is not stored in the designated location, compile, package, and deploy the target service to be currently deployed by using a thread corresponding to the map data structure.
In a possible embodiment, the apparatus further comprises:
the deployment state recording module is used for recording the deployment state of each target service when a preset backup rule is met;
and the deployment state recovery module is used for continuing to deploy each target service according to the deployment state when the deployment state recovery instruction is obtained.
In a third aspect, an embodiment of the present application provides an electronic device, including a processor and a memory;
the memory is used for storing a computer program;
the processor is configured to implement the service management method according to any one of the first aspect described above when executing the program stored in the memory.
In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, where a computer program is stored in the computer-readable storage medium, and the computer program, when executed by a processor, implements the service management method according to any one of the first aspect.
According to the service management method, the service management device, the electronic equipment and the storage medium, all target services to be deployed and the incidence relation of all the target services are obtained, wherein the incidence relation comprises a plurality of map data structures, and the map data structures represent the chain deployment sequence of all the target services with dependency relations; and deploying the target services of the map data structures by using a preset thread group according to the sequence of chained deployment of the target services with dependency relationships in the map data structures. The target services of the map data structures are deployed according to the sequence of chained deployment of the target services with the dependency relationship in the map data structures, so that automatic deployment of the target services can be realized, the manual workload is reduced, and the service deployment efficiency is improved. Of course, not all advantages described above need to be achieved at the same time in the practice of any one product or method of the present application.
Drawings
In order to more clearly illustrate the embodiments of the present application 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, it is obvious that the drawings in the following description are only some embodiments of the present application, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
Fig. 1 is a first schematic diagram of a service management method according to an embodiment of the present application;
fig. 2 is a second schematic diagram of a service management method according to an embodiment of the present application;
fig. 3 is a third schematic diagram of a service management method according to an embodiment of the present application;
fig. 4 is a fourth schematic diagram of a service management method according to an embodiment of the present application;
FIG. 5 is a diagram illustrating a service management apparatus according to an embodiment of the present application;
fig. 6 is a schematic diagram of an electronic device according to an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. 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 application.
In the related art, in the process of establishing the private cloud environment, operators need to manually compile, pack and deploy each service to the private environment of users, so that the manual workload is large, and the deployment efficiency is low.
In view of the above, the present application provides a service management method, referring to fig. 1, the method including:
s101, acquiring target services to be deployed and an incidence relation of the target services, wherein the incidence relation comprises a plurality of map data structures, and the map data structures represent the sequence of chained deployment of the target services with dependency relations.
The service management method of the embodiment of the application can be realized by an upper layer service system, and specifically can be realized by a server in the upper layer service system.
The incidence relation of each target service comprises a plurality of MAP Data structures (MAP Data structures), and the MAP Data structures represent the sequence of chained deployment of each target service with dependency relation. In a possible implementation, before S101, the method further includes: and acquiring the dependency relationship of each target service, and determining the association relationship of each target service according to the dependency relationship of each target service. Specifically, a preset script, such as a deployment script, may be used to comb the dependency relationship of each target service, for target services with dependency relationship, a Data Structure of a linked list is used for storage to form a dependency chain, and for target services without dependency relationship, a Data Structure of a MAP Data Structure (hereinafter referred to as MAP) is used for storage, so as to obtain a plurality of MAP linked lists, that is, the association relationship of each target service.
And S102, deploying the target services of the map data structures according to the sequence of chained deployment of the target services with the dependency relationship in the map data structures by using a preset thread group.
The preset thread group comprises threads, and the deployment of each target service is completed through the threads. In a possible implementation manner, the preset thread group includes a plurality of threads, where the plurality of threads are used to deploy the target service of each map data structure in parallel. And the target services of the map data structures are deployed in parallel by utilizing the threads, so that the deployment efficiency of the whole service can be increased, and the service deployment time is saved.
And aiming at each map data structure, sequentially deploying each target service according to the sequence of chained deployment of each target service with a dependency relationship in the map data structure.
For example, the sequence of the chained deployment of the target services with the dependency relationship recorded in the map data structure a is as follows: target service 1 → target service 8 → target service 3 → target service 4, then target service 1, target service 8, target service 3 and target service 4 are deployed in sequence.
For the case of the existence of the branch, the deployment sequence of each branch is not limited, for example, the sequence of the target service chained deployment recorded with the dependency relationship in the map data structure B is: targeted services
Figure BDA0002256228500000071
Target service 4, branch 1 includes target service 8, branch 2 includes target service 3 and target service 5, and the sequence of deployment between branch 1 and branch 2 is not limited. But both leg 1 and leg 2 need to be deployed after target service 1 deployment is complete and before target service 4 deployment.
In the embodiment of the application, the target services of the map data structures are deployed according to the sequence of chained deployment of the target services with the dependency relationship in the map data structures, so that automatic deployment of the target services can be realized, the manual workload is reduced, and the service deployment efficiency is improved.
In a possible embodiment, referring to fig. 2, the method further comprises:
s201, obtaining the number of the map data structures in the association relation to obtain the target number.
Each target service with the dependency relationship is stored in a map data structure in a linked list mode, and no dependency relationship exists among the target services in different map data structures. And acquiring the number of the map data structures in the association relationship as a target number.
S202, establishing a preset thread group comprising the threads with the target number according to the target number.
And establishing threads with the target number according to the target number, wherein the threads with the target number form a preset thread group. And acquiring the number of the map data structures, and executing in parallel by adopting multiple threads in a thread group mode. Specifically, each thread may be responsible for the deployment of each target service in one map data structure. And deploying the target services of the map data structures by using the threads according to the sequence of chained deployment of the target services with the dependency relationship in the map data structures. And adopting a multithreading concurrent deployment method to perform parallel deployment on the target service. And obtaining the linked list corresponding to each thread in each thread, and compiling, packaging and deploying the linked list structure in sequence in a for-loop mode and the like so as to improve the overall deployment efficiency of the service.
In a possible implementation manner, the deploying, by using a preset thread group, the target services of each map data structure according to the sequence of chained deployment of the target services having a dependency relationship in each map data structure includes:
step one, determining a map data structure corresponding to each thread in the preset thread group.
The preset thread group comprises a plurality of threads, and each thread is responsible for deploying target services in different map data structures. The corresponding manner of the threads and the map data structure can be determined by using a related load balancing technology, for example, the corresponding map data structure can be randomly allocated to each thread, or the corresponding map data structure can be equally allocated to each thread.
And step two, aiming at each map data structure, deploying the target service of the map data structure by utilizing the thread corresponding to the map data structure based on the sequence of chained deployment of the target services with the dependency relationship in the map data structure.
In the embodiment of the application, the target services of the map data structures are deployed in parallel by using the multiple threads, so that the deployment efficiency of the whole service can be increased, and the service deployment time can be saved.
In a possible implementation manner, referring to fig. 3, for each map data structure, based on the sequence of chained deployment of target services having dependency relationships in the map data structure, deploying the target service of the map data structure by using a thread corresponding to the map data structure includes:
s301, aiming at each map data structure, determining the current target service to be deployed in the map data structure based on the sequence of chained deployment of the target services with dependency relationship in the map data structure.
And aiming at any map data structure, determining the current target service to be deployed in the map data structure according to the sequence of chained deployment of the target services with the dependency relationship in the map data structure.
S302, if the target service to be deployed currently in the map data structure is compiled and packaged, the compiled and packaged target service to be deployed currently is obtained and deployed by using the thread corresponding to the map data structure.
If the target service to be deployed currently in the map data structure is compiled and packaged, the target service cannot be recompiled and packaged any more, and the compiled and packaged target service deployment can be directly obtained.
And S303, if the target service to be deployed currently in the map data structure is not compiled and packaged, compiling, packaging and deploying the target service to be deployed currently by using the thread corresponding to the map data structure.
If the target service to be deployed currently in the map data structure is not compiled and packaged, the target service needs to be compiled and packaged, and then the target service is deployed after the compiling and packaging are deployed.
And S304, returning to the step S301 to continue executing until the target services of the map data structures are deployed completely.
And after the deployment of one target service is finished, continuously selecting the current target service to be deployed according to the sequence of the chained deployment of the target services with the dependency relationship in the map data structure, and repeatedly executing the steps S301-S303 until the deployment of the target services of the map data structure is finished. It will be appreciated by those skilled in the art that in actual implementation, the method steps of the embodiments of the present application need to be performed for each map data structure.
In the embodiment of the application, the compiled and packaged target service can be directly obtained and used, and the target service is not required to be recompiled and packaged when one service is loaded each time, so that the compiling and packaging time is reduced, the system resources are saved, and the efficiency of service deployment can be further improved.
Whether the target service to be deployed currently exists in the designated storage position can be determined by judging whether the storage position is compiled and packaged. In a possible embodiment, the method further includes: caching compiled and packaged target service storage, and storing the identification of each cached compiled and packaged target service to a specified position;
if the target service to be deployed currently in the map data structure is compiled and packaged, the compiled and packaged target service to be deployed currently is acquired and deployed by using the thread corresponding to the map data structure, and the method comprises the following steps:
if the mark of the target service to be deployed currently in the map data structure is stored in the specified position, acquiring the compiled and packaged target service to be deployed currently by using the thread corresponding to the map data structure and deploying;
if the target service to be deployed currently in the map data structure is not compiled and packaged, compiling, packaging and deploying the target service to be deployed currently by using the thread corresponding to the map data structure, wherein the compiling, packaging and deploying comprise the steps of
If the identifier of the target service to be deployed currently in the map data structure is not stored in the designated location, compiling, packaging and deploying the target service to be deployed currently by using the thread corresponding to the map data structure.
Each target service has a unique identification, such as a Tag number. When the compiled and packaged target service is cached and stored, the identifier of the compiled and packaged target service can be stored in a specified position, such as a memory, and when judging whether the current target service to be deployed is compiled and packaged, the corresponding position in the memory is directly inquired, and whether the identifier of the current target service to be deployed exists is judged.
In one possible approach, referring to fig. 4, the method further includes:
s401, when the preset backup rule is met, recording the deployment state of each target service.
The preset backup rule can be set according to actual conditions, for example, the preset backup rule is set to be set to have no interval of preset time, and the deployment state of each target service is recorded once; or recording the deployment state of each target service once after a certain number of target services are deployed, or recording the deployment state of each target service in real time. The deployment state of the target service represents the deployment situation of each target service, for example, a Point value may be set for each state of the target service, including compiling, packaging, deployment, and the like, and the deployment state of the target service is determined by the Point value of the target service.
And S402, when the deployment state recovery instruction is acquired, continuing to deploy each target service according to the deployment state.
The deployment state recovery instructions may be user input or may be automatically generated by the system. For example, in the service deployment process, when the system is recovered from an unexpected situation such as power failure or downtime, the deployment state recovery instruction is automatically generated. The method can directly continue to execute from the stage represented by the deployment state of each target service downwards in a cache mechanism, code traversal and other modes, so that the effect of continuing to execute at the breakpoint is quickly realized. Further increasing the efficiency of the deployment.
An embodiment of the present application further provides a service management apparatus, referring to fig. 5, where the apparatus includes:
an association relation obtaining module 501, configured to obtain each target service to be deployed and an association relation of each target service, where the association relation includes a plurality of map data structures, and the map data structures indicate a sequence of chained deployments of each target service having a dependency relation;
and the target service deployment module 502 is configured to deploy the target services of the map data structures according to the sequence of chained deployment of the target services having dependency relationships in the map data structures by using a preset thread group.
In a possible manner, the preset thread group includes a plurality of threads, where the plurality of threads are used to deploy the target service of each map data structure in parallel.
In one possible mode, the apparatus further includes:
the target data acquisition module is used for acquiring the number of the map data structures in the incidence relation to obtain the target number;
and the thread group establishing module is used for establishing a preset thread group comprising the threads with the target number according to the target number.
In a possible implementation manner, the target service deployment module 502 includes:
the corresponding relation determining submodule is used for determining a map data structure corresponding to each thread in the preset thread group;
and the target service deployment submodule is used for deploying the target service of the map data structure by utilizing the thread corresponding to the map data structure based on the sequence of chained deployment of each target service with dependency relationship in the map data structure aiming at each map data structure.
In a possible implementation manner, the target service deployment sub-module includes:
the current service determining unit is used for determining the current target service to be deployed in each map data structure based on the sequence of chained deployment of the target services with the dependency relationship in the map data structure;
the first deployment unit is used for acquiring and deploying the compiled and packaged target service to be deployed currently by utilizing a thread corresponding to the map data structure if the target service to be deployed currently in the map data structure is compiled and packaged;
the second deployment unit is used for compiling, packaging and deploying the target service to be deployed currently by utilizing the thread corresponding to the map data structure if the target service to be deployed currently in the map data structure is not compiled and packaged;
and returning to the execution unit, and returning to the current service determination unit to continue executing until the target services of the map data structures are deployed completely.
In a possible embodiment, the above apparatus further comprises:
the data caching module is used for caching the compiled and packaged target service storage and storing the identifier of each cached compiled and packaged target service to a specified position;
the first deployment unit is specifically configured to: if the mark of the target service to be deployed currently in the map data structure is stored in the specified position, acquiring the compiled and packaged target service to be deployed currently by using the thread corresponding to the map data structure and deploying;
the second deployment unit is specifically configured to, if the identifier of the target service to be currently deployed in the map data structure is not stored in the designated location, compile, package, and deploy the target service to be currently deployed by using a thread corresponding to the map data structure.
An embodiment of the present application further provides an electronic device, including: a processor and a memory;
the memory is used for storing computer programs;
when the processor is used for executing the computer program stored in the memory, the following steps are realized:
acquiring target services to be deployed and an incidence relation of the target services, wherein the incidence relation comprises a plurality of map data structures, and the map data structures represent the sequence of chained deployment of the target services with dependency relations;
and deploying the target services of the map data structures according to the sequence of chained deployment of the target services with the dependency relationship in the map data structures by using a preset thread group.
Optionally, referring to fig. 6, the electronic device according to the embodiment of the present application further includes a communication interface 602 and a communication bus 604, where the processor 601, the communication interface 602, and the memory 603 complete communication with each other through the communication bus 604.
Optionally, when the processor is configured to execute the computer program stored in the memory, any of the service management methods may also be implemented.
The communication bus mentioned in the electronic device may be a PCI (Peripheral component interconnect) bus, an EISA (Extended Industry standard architecture) bus, or the like. The communication bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is shown, but this does not mean that there is only one bus or one type of bus.
The communication interface is used for communication between the electronic equipment and other equipment.
The Memory may include a RAM (Random Access Memory) or an NVM (Non-Volatile Memory), such as at least one disk Memory. Optionally, the memory may also be at least one memory device located remotely from the processor.
The Processor may be a general-purpose Processor, including a Central Processing Unit (CPU), a Network Processor (NP), and the like; but also a DSP (Digital Signal Processing), an ASIC (Application Specific Integrated Circuit), an FPGA (Field Programmable Gate Array) or other Programmable logic device, discrete Gate or transistor logic device, discrete hardware component.
An embodiment of the present application further provides a computer-readable storage medium, where a computer program is stored in the computer-readable storage medium, and when the computer program is executed by a processor, the computer program implements the following steps:
acquiring target services to be deployed and an incidence relation of the target services, wherein the incidence relation comprises a plurality of map data structures, and the map data structures represent the sequence of chained deployment of the target services with dependency relations;
and deploying the target services of the map data structures according to the sequence of chained deployment of the target services with the dependency relationship in the map data structures by using a preset thread group.
Optionally, the computer program, when executed by a processor, is further capable of implementing any of the service management methods described above.
It should be noted that, in this document, the technical features in the various alternatives can be combined to form the scheme as long as the technical features are not contradictory, and the scheme is within the scope of the disclosure of the present application. Relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
All the embodiments in the present specification are described in a related manner, and the same and similar parts among the embodiments may be referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, for the embodiments of the apparatus, the electronic device, and the storage medium, since they are substantially similar to the method embodiments, the description is relatively simple, and for the relevant points, reference may be made to the partial description of the method embodiments.
The above description is only for the preferred embodiment of the present application, and is not intended to limit the scope of the present application. Any modification, equivalent replacement, improvement and the like made within the spirit and principle of the present application are included in the protection scope of the present application.

Claims (16)

1. A method for service management, the method comprising:
acquiring target services to be deployed and an incidence relation of the target services, wherein the incidence relation comprises a plurality of map data structures, and the map data structures represent the sequence of chained deployment of the target services with dependency relations;
and deploying the target services of the map data structures according to the sequence of chained deployment of the target services with the dependency relationship in the map data structures by using a preset thread group.
2. The method of claim 1, wherein the predetermined thread group comprises a plurality of threads, and wherein the plurality of threads are configured to deploy a target service for each of the map data structures in parallel.
3. The method of claim 2, further comprising:
obtaining the number of map data structures in the incidence relation to obtain the target number;
and establishing a preset thread group comprising the threads with the target number according to the target number.
4. The method according to claim 2, wherein the deploying, by using a preset thread group, the target services of the map data structures according to the sequence of chained deployment of the target services having a dependency relationship in the map data structures comprises:
determining a map data structure corresponding to each thread in the preset thread group;
and aiming at each map data structure, deploying the target service of the map data structure by utilizing the thread corresponding to the map data structure based on the sequence of chained deployment of the target services with the dependency relationship in the map data structure.
5. The method according to claim 4, wherein the deploying, for each map data structure, the target services of each map data structure by using the thread corresponding to the map data structure based on the sequence of chained deployment of the target services having the dependency relationship in the map data structure comprises:
for each map data structure, determining a target service to be deployed currently in the map data structure based on the sequence of chained deployment of each target service with a dependency relationship in the map data structure;
if the target service to be deployed currently in the map data structure is compiled and packaged, acquiring the compiled and packaged target service to be deployed currently and deploying the target service by using a thread corresponding to the map data structure;
if the target service to be deployed currently in the map data structure is not compiled and packaged, compiling, packaging and deploying the target service to be deployed currently by using a thread corresponding to the map data structure;
and returning to each map data structure, and determining the current target service to be deployed in the map data structure based on the sequence of chained deployment of the target services with the dependency relationship in the map data structure, and continuing to execute the step until the target services of the map data structures are deployed completely.
6. The method of claim 5, further comprising:
caching compiled and packaged target service storage, and storing the identification of each cached compiled and packaged target service to a specified position;
if the target service to be deployed currently in the map data structure is compiled and packaged, the method comprises the following steps:
if the specified position stores the identifier of the target service to be deployed currently in the map data structure;
if the target service to be deployed currently in the map data structure is not compiled and packaged, the method comprises the following steps:
and if the specified position does not store the identifier of the target service to be deployed currently in the map data structure.
7. The method of claim 1, further comprising:
recording the deployment state of each target service when a preset backup rule is met;
and when a deployment state recovery instruction is acquired, continuing to deploy each target service according to the deployment state.
8. A service management apparatus, characterized in that the apparatus comprises:
the system comprises an incidence relation acquisition module, a correlation analysis module and a correlation analysis module, wherein the incidence relation acquisition module is used for acquiring each target service to be deployed and the incidence relation of each target service, the incidence relation comprises a plurality of map data structures, and the map data structures represent the sequence of chained deployment of each target service with a dependency relation;
and the target service deployment module is used for deploying the target services of the map data structures according to the sequence of the chained deployment of the target services with the dependency relationship in the map data structures by using a preset thread group.
9. The apparatus of claim 8, wherein the predetermined thread group comprises a plurality of threads, and wherein the plurality of threads are configured to deploy a target service for each of the map data structures in parallel.
10. The apparatus of claim 9, further comprising:
the target data acquisition module is used for acquiring the number of the map data structures in the incidence relation to obtain the target number;
and the thread group establishing module is used for establishing a preset thread group comprising the threads with the target number according to the target number.
11. The apparatus of claim 9, wherein the target service deployment module comprises:
the corresponding relation determining submodule is used for determining a map data structure corresponding to each thread in the preset thread group;
and the target service deployment submodule is used for deploying the target service of the map data structure by utilizing the thread corresponding to the map data structure based on the sequence of chained deployment of each target service with dependency relationship in the map data structure aiming at each map data structure.
12. The apparatus of claim 11, wherein the target service deployment submodule comprises:
the current service determining unit is used for determining the current target service to be deployed in each map data structure based on the sequence of chained deployment of the target services with the dependency relationship in the map data structure;
the first deployment unit is used for acquiring and deploying the compiled and packaged target service to be deployed currently by utilizing a thread corresponding to the map data structure if the target service to be deployed currently in the map data structure is compiled and packaged;
the second deployment unit is used for compiling, packaging and deploying the target service to be deployed currently by utilizing the thread corresponding to the map data structure if the target service to be deployed currently in the map data structure is not compiled and packaged;
and returning to the execution unit, and returning to the current service determination unit to continue executing until the target services of the map data structures are deployed completely.
13. The apparatus of claim 12, further comprising:
the data caching module is used for caching the compiled and packaged target service storage and storing the identifier of each cached compiled and packaged target service to a specified position;
the first deployment unit is specifically configured to: if the specified position stores the identifier of the target service to be deployed currently in the map data structure, acquiring the compiled and packaged target service to be deployed currently by using the thread corresponding to the map data structure and deploying the target service;
the second deployment unit is specifically configured to, if the identifier of the target service to be currently deployed in the map data structure is not stored in the designated location, compile, package, and deploy the target service to be currently deployed by using a thread corresponding to the map data structure.
14. The apparatus of claim 8, further comprising:
the deployment state recording module is used for recording the deployment state of each target service when a preset backup rule is met;
and the deployment state recovery module is used for continuing to deploy each target service according to the deployment state when the deployment state recovery instruction is obtained.
15. An electronic device comprising a processor and a memory;
the memory is used for storing a computer program;
the processor is configured to implement the service management method according to any one of claims 1 to 7 when executing the program stored in the memory.
16. A computer-readable storage medium, in which a computer program is stored, which, when being executed by a processor, carries out the service management method of any one of claims 1 to 7.
CN201911054615.1A 2019-10-31 2019-10-31 Service management method, device, electronic equipment and storage medium Active CN110825391B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911054615.1A CN110825391B (en) 2019-10-31 2019-10-31 Service management method, device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911054615.1A CN110825391B (en) 2019-10-31 2019-10-31 Service management method, device, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN110825391A true CN110825391A (en) 2020-02-21
CN110825391B CN110825391B (en) 2023-10-13

Family

ID=69552135

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911054615.1A Active CN110825391B (en) 2019-10-31 2019-10-31 Service management method, device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN110825391B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113098960A (en) * 2021-03-31 2021-07-09 北京三快在线科技有限公司 Service operation method, device, server and storage medium
CN113094052A (en) * 2021-06-09 2021-07-09 中电金信软件有限公司 Application construction method and device, computer equipment and storage medium

Citations (22)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070294364A1 (en) * 2006-06-15 2007-12-20 International Business Machines Corporation Management of composite software services
US20110231552A1 (en) * 2010-03-19 2011-09-22 Carter Stephen R Techniques for intelligent service deployment
US20150378701A1 (en) * 2014-06-26 2015-12-31 Microsoft Corporation Cross-environment orchestration of deployment activities
CN105487881A (en) * 2015-08-20 2016-04-13 广州爱九游信息技术有限公司 Software installation package packaging method, device and system
CN106156198A (en) * 2015-04-22 2016-11-23 阿里巴巴集团控股有限公司 Task executing method based on distributed data base and device
US20170054798A1 (en) * 2015-08-19 2017-02-23 International Business Machines Corporation Scheduling Software Deployment
CN106547613A (en) * 2016-10-20 2017-03-29 西北工业大学 The scheduling of task handling process and fault recovery method
CN107368359A (en) * 2017-05-31 2017-11-21 杭州大搜车汽车服务有限公司 A kind of asynchronous task performs method and its storage medium, device
CN107784479A (en) * 2017-02-16 2018-03-09 平安科技(深圳)有限公司 A kind of business flow processing method and apparatus
US20180091624A1 (en) * 2016-09-25 2018-03-29 Salesforce.Com, Inc. Staging and deployment to multiple service clouds
CN107870845A (en) * 2017-10-19 2018-04-03 北京工业大数据创新中心有限公司 Towards the management method and system of micro services framework applications
CN108595180A (en) * 2018-03-14 2018-09-28 广东能龙教育股份有限公司 Micro-service automatic deployment method based on dependency chain
CN108762769A (en) * 2018-06-04 2018-11-06 万惠投资管理有限公司 Micro services application layout and dispositions method, device and terminal
CN109327490A (en) * 2017-07-31 2019-02-12 杭州华为数字技术有限公司 A kind of method and apparatus for disposing cloud service component
CN109491763A (en) * 2018-11-14 2019-03-19 北京奇艺世纪科技有限公司 A kind of system deployment method, apparatus and electronic equipment
CN109542462A (en) * 2018-10-17 2019-03-29 平安科技(深圳)有限公司 A kind of system environments dispositions method, storage medium and server
CN109558237A (en) * 2017-09-27 2019-04-02 北京国双科技有限公司 A kind of task status management method and device
CN109725785A (en) * 2018-05-08 2019-05-07 中国平安人寿保险股份有限公司 Task execution situation method for tracing, device, equipment and readable storage medium storing program for executing
CN109901926A (en) * 2019-01-25 2019-06-18 平安科技(深圳)有限公司 Method, server and storage medium based on big data behavior scheduling application task
CN110347398A (en) * 2018-04-08 2019-10-18 阿里巴巴集团控股有限公司 A kind of packaging method and device of application program
CN110391938A (en) * 2019-07-26 2019-10-29 北京百度网讯科技有限公司 Method and apparatus for deployment services
CN110673936A (en) * 2019-09-18 2020-01-10 平安科技(深圳)有限公司 Breakpoint continuous operation method and device for arranging service, storage medium and electronic equipment

Patent Citations (22)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070294364A1 (en) * 2006-06-15 2007-12-20 International Business Machines Corporation Management of composite software services
US20110231552A1 (en) * 2010-03-19 2011-09-22 Carter Stephen R Techniques for intelligent service deployment
US20150378701A1 (en) * 2014-06-26 2015-12-31 Microsoft Corporation Cross-environment orchestration of deployment activities
CN106156198A (en) * 2015-04-22 2016-11-23 阿里巴巴集团控股有限公司 Task executing method based on distributed data base and device
US20170054798A1 (en) * 2015-08-19 2017-02-23 International Business Machines Corporation Scheduling Software Deployment
CN105487881A (en) * 2015-08-20 2016-04-13 广州爱九游信息技术有限公司 Software installation package packaging method, device and system
US20180091624A1 (en) * 2016-09-25 2018-03-29 Salesforce.Com, Inc. Staging and deployment to multiple service clouds
CN106547613A (en) * 2016-10-20 2017-03-29 西北工业大学 The scheduling of task handling process and fault recovery method
CN107784479A (en) * 2017-02-16 2018-03-09 平安科技(深圳)有限公司 A kind of business flow processing method and apparatus
CN107368359A (en) * 2017-05-31 2017-11-21 杭州大搜车汽车服务有限公司 A kind of asynchronous task performs method and its storage medium, device
CN109327490A (en) * 2017-07-31 2019-02-12 杭州华为数字技术有限公司 A kind of method and apparatus for disposing cloud service component
CN109558237A (en) * 2017-09-27 2019-04-02 北京国双科技有限公司 A kind of task status management method and device
CN107870845A (en) * 2017-10-19 2018-04-03 北京工业大数据创新中心有限公司 Towards the management method and system of micro services framework applications
CN108595180A (en) * 2018-03-14 2018-09-28 广东能龙教育股份有限公司 Micro-service automatic deployment method based on dependency chain
CN110347398A (en) * 2018-04-08 2019-10-18 阿里巴巴集团控股有限公司 A kind of packaging method and device of application program
CN109725785A (en) * 2018-05-08 2019-05-07 中国平安人寿保险股份有限公司 Task execution situation method for tracing, device, equipment and readable storage medium storing program for executing
CN108762769A (en) * 2018-06-04 2018-11-06 万惠投资管理有限公司 Micro services application layout and dispositions method, device and terminal
CN109542462A (en) * 2018-10-17 2019-03-29 平安科技(深圳)有限公司 A kind of system environments dispositions method, storage medium and server
CN109491763A (en) * 2018-11-14 2019-03-19 北京奇艺世纪科技有限公司 A kind of system deployment method, apparatus and electronic equipment
CN109901926A (en) * 2019-01-25 2019-06-18 平安科技(深圳)有限公司 Method, server and storage medium based on big data behavior scheduling application task
CN110391938A (en) * 2019-07-26 2019-10-29 北京百度网讯科技有限公司 Method and apparatus for deployment services
CN110673936A (en) * 2019-09-18 2020-01-10 平安科技(深圳)有限公司 Breakpoint continuous operation method and device for arranging service, storage medium and electronic equipment

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113098960A (en) * 2021-03-31 2021-07-09 北京三快在线科技有限公司 Service operation method, device, server and storage medium
CN113094052A (en) * 2021-06-09 2021-07-09 中电金信软件有限公司 Application construction method and device, computer equipment and storage medium

Also Published As

Publication number Publication date
CN110825391B (en) 2023-10-13

Similar Documents

Publication Publication Date Title
US20190324772A1 (en) Method and device for processing smart contracts
CN108399132B (en) Scheduling test method, device and storage medium
CN109491763B (en) System deployment method and device and electronic equipment
US20160188304A1 (en) Execution optimization of mobile applications
US20120185845A1 (en) Detecting Applications in a Virtualization Environment
CN110231994B (en) Memory analysis method, memory analysis device and computer readable storage medium
Shahriar et al. Testing of memory leak in android applications
CN111949899B (en) Service integration method and service platform
CN109388946B (en) Malicious process detection method and device, electronic equipment and storage medium
CN110825391B (en) Service management method, device, electronic equipment and storage medium
CN107145365B (en) Method for generating application program installation package and method and device for loading application program
CN111782523A (en) Cloud service deployment test method and device, electronic equipment and storage medium
CN111124480A (en) Application package generation method and device, electronic equipment and storage medium
KR20190015327A (en) Methods and Devices to Prevent Servers from Attacking
CN114595461A (en) Data processing method and device
CN109960658B (en) Application programming interface testing method and device, electronic equipment and storage medium
CN108089895B (en) Activity registration method and device in plug-in, electronic equipment and storage medium
CN115297024B (en) Performance test method and device of network security equipment and electronic equipment
CN110750270A (en) Method and device for deploying packaged software
CN105912467A (en) Performance test method and device
JP6665576B2 (en) Support device, support method, and program
US11157583B2 (en) Software detection based on user accounts
CN112882921B (en) Fault simulation method and device
CN110297625B (en) Application processing method and device
CN110674491B (en) Method and device for real-time evidence obtaining of android application and electronic equipment

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