CN110825391B - 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
CN110825391B
CN110825391B CN201911054615.1A CN201911054615A CN110825391B CN 110825391 B CN110825391 B CN 110825391B CN 201911054615 A CN201911054615 A CN 201911054615A CN 110825391 B CN110825391 B CN 110825391B
Authority
CN
China
Prior art keywords
map data
target service
data structure
deployment
deployed
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
CN201911054615.1A
Other languages
Chinese (zh)
Other versions
CN110825391A (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

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

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Business, Economics & Management (AREA)
  • Strategic Management (AREA)
  • Physics & Mathematics (AREA)
  • Human Resources & Organizations (AREA)
  • Software Systems (AREA)
  • General Physics & Mathematics (AREA)
  • Entrepreneurship & Innovation (AREA)
  • Economics (AREA)
  • Data Mining & Analysis (AREA)
  • Marketing (AREA)
  • Operations Research (AREA)
  • Quality & Reliability (AREA)
  • Tourism & Hospitality (AREA)
  • General Business, Economics & Management (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Stored Programmes (AREA)

Abstract

The embodiment of the application provides a service management method, a device, electronic equipment and a storage medium, which are applied to the technical field of computers, and the method comprises the following steps: acquiring each target service to be deployed and an association relation of each target service, wherein the association relation comprises a plurality of map data structures, and the map data structures represent the sequential order of chained deployment of each target service with a dependency relation; and deploying the target services of each map data structure according to the sequence of chained deployment of each target service with a dependency relationship in each map data structure by using a preset thread group. According to the service management method provided by the embodiment of the application, the target services of each map data structure are deployed according to the sequence of chained deployment of each target service with a dependency relationship in the map data structure, so that automatic deployment of each target service can be realized, the manual workload is reduced, and the 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, a device, an electronic apparatus, and a storage medium.
Background
The upper business system of the enterprise cloud comprises two subsystems, namely a tenant console and a business operation platform. The upper business system covers hundreds of services such as a plurality of business lines, a plurality of support platforms and the like, the languages used by the services are different, for example, the services comprising the languages of JAVA, python, golang, PHP (Hypertext Preprocessor ), JS (JavaScript) and the like, the environment and the method for deploying the services are various, the technical stack exists in different ways and the like.
In the related art, operators are required to compile, package and deploy all services into the private environment of the user manually, and the manual workload is high.
Disclosure of Invention
The embodiment of the application aims to provide a service management method, a device, electronic equipment and a storage medium, so as to reduce the 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 each target service to be deployed and an association relation of each target service, wherein the association relation comprises a plurality of map data structures, and the map data structures represent the sequential order of chained deployment of each target service with a dependency relation;
and deploying the target services of each map data structure according to the sequence of chained deployment of each target service with a dependency relationship in each map data structure 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 the target service of each map data structure in parallel.
In one possible embodiment, the method further comprises:
acquiring the number of map data structures in the association relationship to obtain a target number;
and establishing a preset thread group comprising threads of the target number according to the target number.
In a possible implementation manner, the deploying, by using a preset thread group, the target service of each map data structure according to the sequential order of chained deployment of each target service 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 a thread corresponding to the map data structure based on the sequence of chained deployment of each target service with a dependency relationship in the map data structure.
In one possible implementation manner, for each map data structure, based on the sequential order of chained deployment of each target service with a dependency relationship in the map data structure, the deploying, by using a thread corresponding to the map data structure, the target service of each map data structure includes:
determining a target service to be deployed currently in the map data structure based on the sequential order of chained deployment of each target service with a dependency relationship in the map data structure for each 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 utilizing 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 utilizing a thread corresponding to the map data structure;
returning to the step of determining the target service to be deployed currently in the map data structure based on the sequential order of chained deployment of the target services with the dependency relationship in the map data structure for each map data structure, and continuing to execute until the target service of each map data structure is deployed.
In one possible embodiment, the method further comprises:
caching the compiled and packaged target service storage, and storing the identification of each cached compiled and packaged target service to a designated position;
if the target service to be deployed currently in the map data structure has been compiled and packaged, the method includes:
if the appointed position stores the identification 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 has not been compiled and packaged, the method includes:
and if the designated position does not store the identification 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 the 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, including:
the system comprises an incidence relation acquisition module, a storage module and a storage 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;
the target service deployment module is used for deploying the target services of each map data structure according to the sequence of chained deployment of each target service with a dependency relationship in each map data structure by utilizing 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 the target service of each map data structure in parallel.
In one possible embodiment, the apparatus further comprises:
the target data acquisition module is used for acquiring the number of map data structures in the association relationship to obtain target number;
and the thread group establishing module is used for establishing a preset thread group comprising threads with the target number according to the target number.
In one possible implementation, 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;
the target service deployment sub-module 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 a dependency relationship in the map data structure aiming at each map data structure.
In one possible implementation, the target service deployment sub-module includes:
the current service determining unit is used for determining the current target service to be deployed 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 aiming at each map data structure;
the first deployment unit is used for acquiring the compiled and packaged target service to be deployed currently and deploying the target service if the target service to be deployed currently in the map data structure is compiled and packaged by utilizing the thread corresponding to the map data structure;
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 yet;
and returning to the execution unit, and returning to the current service determination unit to continue execution until the target service of each map data structure is deployed.
In one possible embodiment, the apparatus further comprises:
the data caching module is used for caching the compiled and packaged target service storage and storing the identification of each cached compiled and packaged target service to a designated position;
the first deployment unit is specifically configured to: if the identification of the current target service to be deployed in the map data structure is stored in the designated position, acquiring the compiled and packaged current target service to be deployed and deploying the target service by utilizing a thread corresponding to the map data structure;
the second deployment unit is specifically configured to compile, package, and deploy the target service to be deployed currently by using the thread corresponding to the map data structure if the identifier of the target service to be deployed currently in the map data structure is not stored in the specified location.
In one possible embodiment, the apparatus further comprises:
the deployment state recording module is used for recording the deployment state of each target service when the 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 acquired.
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 any one of the service management methods described in the first aspect when executing the program stored in the memory.
In a fourth aspect, an embodiment of the present application provides a computer readable storage medium, in which a computer program is stored, the computer program implementing the service management method according to any one of the first aspects when executed by a processor.
The service management method, the device, the electronic equipment and the storage medium provided by the embodiment of the application acquire each target service to be deployed and the association relation of each target service, wherein the association 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 deploying the target services of each map data structure according to the sequence of chained deployment of each target service with a dependency relationship in each map data structure by using a preset thread group. According to the sequential order of chained deployment of each target service with a dependency relationship in the map data structure, the target service of each map data structure is deployed, so that automatic deployment of each target service can be realized, the manual workload is reduced, and the service deployment efficiency is improved. Of course, it is not necessary for any one product or method of practicing the application to achieve all of the advantages set forth above at the same time.
Drawings
In order to more clearly illustrate the embodiments of the application or the technical solutions in the prior art, the drawings that are required in the embodiments or the description of the prior art will be briefly described, it being obvious that the drawings in the following description are only some embodiments of the application, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
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 schematic diagram of a service management device according to an embodiment of the present application;
fig. 6 is a schematic diagram of an electronic device according to an embodiment of the application.
Detailed Description
The following description of the embodiments of the present application will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present application, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the application without making any inventive effort, are intended to be within the scope of the application.
In the related technology, in the process of establishing the private cloud environment, operators are required to compile, package and deploy all services into the private environment of the user manually, so that the manual workload is high and the deployment efficiency is low.
In view of this, the present application provides a service management method, referring to fig. 1, comprising:
s101, acquiring each target service to be deployed and the association relation of each target service, wherein the association 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.
The service management method of the embodiment of the application can be realized through an upper layer service system, and can be realized through a server in the upper layer service system.
The association relationship of each target service includes a plurality of MAP Data Structure (map data structure) indicating the order of chained deployment of each target service having a dependency relationship. In a possible implementation manner, 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, for example, a duplicate script, may be used to comb the dependency relationship of each target service, for the target service with the dependency relationship, a linked list data structure is used to store the target service, so as to form a dependency chain, and for the target service without the dependency relationship, a MAP Data Structure (hereinafter referred to as MAP) data structure is used to store the target service, so as to obtain a linked list of multiple MAPs, that is, the association relationship of each target service.
S102, deploying the target services of each map data structure according to the sequence of chained deployment of each target service with a dependency relationship in each map data structure 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 one 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. The target service of each map data structure is deployed in parallel by each thread, 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 the target services according to the sequential order of chained deployment of the target services with the dependency relationship in the map data structure.
For example, the order of the target service chained deployment with the dependency relationship recorded in the map data structure a is as follows: target service 1, target service 8, target service 3 and target service 4, then target service 1, target service 8, target service 3 and target service 4 are deployed in sequence.
For the case that the branches exist, the deployment sequence of each branch is not limited, for example, the sequence of target service chained deployment with the dependency relationship recorded in the map data structure B is as follows: target serviceThe target service 4, the branch 1 comprises a target service 8, the branch 2 comprises a target service 3 and a target service 5, and the deployment sequence between the branch 1 and the branch 2 is not limited. Both leg 1 and leg 2 need to be deployed after target service 1 deployment is complete and need to be deployed before target service 4 deployment.
According to the embodiment of the application, the target services of each map data structure are deployed according to the sequence of chained deployment of each target service with a dependency relationship in the map data structure, so that the automatic deployment of each target service can be realized, the manual workload is reduced, and the service deployment efficiency is improved.
In one possible embodiment, referring to fig. 2, the method further includes:
s201, obtaining the number of map data structures in the association relationship to obtain the target number.
The target services with the dependency relationship are stored in a map data structure in a linked list mode, and the dependency relationship among the target services in different map data structures does not exist. And acquiring the number of map data structures in the association relationship as a target number.
S202, establishing a preset thread group comprising threads with the target number according to the target number.
And establishing a target number of threads according to the target number, wherein the target number of threads form a preset thread group. The number of map data structures is acquired and executed in parallel by threads in a multithreading manner. Specifically, each thread may be responsible for the deployment of target services in a map data structure. And deploying the target services of each map data structure according to the sequence of chained deployment of each target service with a dependency relationship in each map data structure by utilizing each thread. And a multithreading concurrent deployment method is adopted to carry out concurrent deployment on the target service. And acquiring a linked list corresponding to each thread in each thread, and compiling, packing and deploying the linked list in turn by adopting modes such as for circulation and the like aiming at the linked list structure so as to improve the overall deployment efficiency of the service.
In one possible implementation manner, the deploying, by using a preset thread group, the target service of each map data structure according to the sequential order of chained deployment of each target service 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 correspondence of the threads to the map data structures may be determined using a related load balancing technique, for example, each thread may be randomly assigned a corresponding map data structure, or each thread may be evenly assigned a corresponding map data structure, etc.
And secondly, aiming at each map data structure, deploying the target service of the map data structure by utilizing a thread corresponding to the map data structure based on the sequence of chained deployment of each target service with a dependency relationship in the map data structure.
In the embodiment of the application, the target service of each map data structure is deployed in parallel by utilizing a plurality of 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 sequential order of chained deployment of each target service with a dependency relationship in the map data structure, using a thread corresponding to the map data structure, deploying the target service of the map data structure includes:
s301, determining the 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 for each map data structure.
And determining the target service to be deployed currently in the map data structure according to the sequence of chained deployment of each target service with a dependency relationship in the map data structure aiming at any map data structure.
S302, 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 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 target service can not be recompiled and packaged any more, and the compiled and packaged target service deployment can be directly obtained.
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.
S304, returning to the S301 to continue execution until the target service of each map data structure is deployed.
After one target service is deployed, continuing to select the target service to be deployed currently according to the sequence of chained deployment of each target service with a dependency relationship in the map data structure, and repeatedly executing the steps S301-S303 until the target services of the map data structure are deployed. 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 packed target service is directly obtained and used without recompilation and packing when one service is loaded each time, so that the compiling and packing time is reduced, the system resource is saved, and the service deployment efficiency can be further improved.
Whether the target service to be deployed currently is compiled and packaged can be determined by judging whether the packaging identification of the target service to be deployed currently exists in the designated storage position. In one possible embodiment, the method further comprises: caching the compiled and packaged target service storage, and storing the identification of each cached compiled and packaged target service to a designated position;
if the target service to be deployed currently in the map data structure has been 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, including:
if the identifier of the current target service to be deployed in the map data structure is stored in the specified position, acquiring the compiled and packaged current target service to be deployed and deploying the target service by utilizing a thread corresponding to the map data structure;
if the target service to be deployed currently in the map data structure has not been compiled and packaged, compiling, packaging and deploying the target service to be deployed currently by using the thread corresponding to the map data structure, including
If the identifier of the target service to be deployed currently in the map data structure is not stored in the specified position, compiling, packaging and deploying the target service to be deployed currently by utilizing the thread corresponding to the map data structure.
Each target service has a unique identification, such as Tag number. And when the target service to be deployed currently is judged whether to be compiled and packed, the corresponding position in the memory is directly inquired, and whether the identifier of the target service to be deployed currently exists or not is judged.
In one possible manner, referring to fig. 4, the method further includes:
s401, when the preset backup rule is met, the deployment state of each target service is recorded.
The preset backup rule can be set according to actual conditions, for example, the preset backup rule is set to be set without interval for preset time, so that the deployment state of each target service is recorded once; or each time a certain number of target services are deployed, the deployment state of each target service is recorded, and the deployment state of each target service can be recorded 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 may be determined through the target service Point value.
And S402, when a deployment state recovery instruction is acquired, continuing to deploy each target service according to the deployment state.
The deployment state recovery instruction can be input by a user or automatically generated by the system. For example, in the service deployment process, when the system is recovered from unexpected situations such as power failure or downtime, a deployment state recovery instruction is automatically generated. The method can directly continue to execute downwards from the stage represented by the deployment state of each target service through a caching mechanism, code traversal and other modes, thereby rapidly realizing the effect of continuing to execute at the breakpoint. Further increasing the efficiency of deployment.
The embodiment of the application also provides a service management device, referring to fig. 5, the device comprises:
an association relationship obtaining module 501, configured to obtain each target service to be deployed and an association relationship of each target service, where the association relationship includes a plurality of map data structures, and the map data structures represent a sequential order of chained deployment of each target service with a dependency relationship;
the target service deployment module 502 is configured to deploy target services of each map data structure according to the sequential order of chained deployment of each target service with a dependency relationship in each map data structure by using a preset thread group.
In one 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 manner, the apparatus further includes:
the target data acquisition module is used for acquiring the number of map data structures in the association relationship to obtain target number;
the thread group establishing module is used for establishing a preset thread group comprising threads with the target number according to the target number.
In one possible implementation manner, the target service deployment module 502 includes:
the corresponding relation determining submodule is used for determining the map data structure corresponding to each thread in the preset thread group;
the target service deployment sub-module 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 a dependency relationship in the map data structure aiming at each map data structure.
In one 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 the map data structure based on the sequence of chained deployment of each target service with a dependency relationship in the map data structure aiming at each map data structure;
the first deployment unit is used for acquiring the compiled and packaged target service to be deployed currently and deploying the target service if the target service to be deployed currently in the map data structure is compiled and packaged by utilizing the thread corresponding to the map data structure;
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 yet;
and returning to the execution unit, and returning to the current service determination unit to continue execution until the target service of each map data structure is deployed.
In one possible embodiment, the apparatus further includes:
the data caching module is used for caching the compiled and packaged target service storage and storing the identification of each cached compiled and packaged target service to a designated position;
the first deployment unit is specifically configured to: if the identifier of the current target service to be deployed in the map data structure is stored in the specified position, acquiring the compiled and packaged current target service to be deployed and deploying the target service by utilizing a thread corresponding to the map data structure;
the second deployment unit is specifically configured to compile, package, and deploy the target service to be deployed currently by using the thread corresponding to the map data structure if the identifier of the target service to be deployed currently in the map data structure is not stored in the specified location.
The embodiment of the application also provides electronic equipment, which comprises: a processor and a memory;
the memory is used for storing a computer program;
the processor is configured to execute the computer program stored in the memory, and implement the following steps:
acquiring each target service to be deployed and an association relation of each target service, wherein the association relation comprises a plurality of map data structures, and the map data structures represent the sequential order of chained deployment of each target service with a dependency relation;
and deploying the target services of each map data structure according to the sequence of chained deployment of each target service with a dependency relationship in each map data structure 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 perform communication with each other through the communication bus 604.
Optionally, the processor is configured to execute the computer program stored in the memory, and further implement any one of the service management methods.
The communication bus mentioned for the above-mentioned electronic devices may be a PCI (Peripheral Component Interconnect, peripheral component interconnect standard) bus or an EISA (Extended Industry Standard Architecture ) bus, or the like. The communication bus may be classified as an address bus, a data bus, a control bus, or the like. For ease of illustration, the figures are shown with only one bold line, but not with only one bus or one type of bus.
The communication interface is used for communication between the electronic device and other devices.
The Memory may include RAM (Random Access Memory ) or 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 aforementioned processor.
The processor may be a general-purpose processor, including a CPU (Central Processing Unit ), NP (Network Processor, network processor), etc.; but also DSP (Digital Signal Processing, digital signal processor), ASIC (Application Specific Integrated Circuit ), FPGA (Field-Programmable Gate Array, field programmable gate array) or other programmable logic device, discrete gate or transistor logic device, discrete hardware components.
The embodiment of the application also provides a computer readable storage medium, wherein the computer readable storage medium stores a computer program, and the computer program realizes the following steps when being executed by a processor:
acquiring each target service to be deployed and an association relation of each target service, wherein the association relation comprises a plurality of map data structures, and the map data structures represent the sequential order of chained deployment of each target service with a dependency relation;
and deploying the target services of each map data structure according to the sequence of chained deployment of each target service with a dependency relationship in each map data structure by using a preset thread group.
Optionally, when the computer program is executed by the processor, any of the service management methods described above can be implemented.
It should be noted that, in this document, the technical features in each alternative may be combined to form a solution, so long as they are not contradictory, and all such solutions are 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. Moreover, 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 one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
In this specification, each embodiment is described in a related manner, and identical and similar parts of each embodiment are all referred to each other, and each embodiment mainly describes differences from other embodiments. In particular, for embodiments of the apparatus, electronic device and storage medium, the description is relatively simple as it is substantially similar to the method embodiments, where relevant see the section description of the method embodiments.
The foregoing description is only of the preferred embodiments of the present application and is not intended to limit the scope of the present application. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application are included in the protection scope of the present application.

Claims (6)

1. A method of service management, the method comprising:
acquiring each target service to be deployed and an association relation of each target service, wherein the association relation comprises a plurality of map data structures, and the map data structures represent the sequential order of chained deployment of each target service with a dependency relation;
deploying the target services of each map data structure according to the sequence of chained deployment of each target service with a dependency relationship in each map data structure by using a preset thread group;
the method further comprises the steps of:
recording the deployment state of each target service when the preset backup rule is met;
when a deployment state recovery instruction is acquired, continuing to deploy each target service according to the deployment state;
the preset thread group comprises a plurality of threads, wherein the threads are used for deploying the target service of each map data structure in parallel;
the deploying, by using a preset thread group, the target service of each map data structure according to the sequential order of chained deployment of each target service having a dependency relationship in each map data structure, includes:
determining a map data structure corresponding to each thread in the preset thread group;
aiming at each map data structure, based on the sequence of chained deployment of each target service with a dependency relationship in the map data structure, deploying the target service of the map data structure by using a thread corresponding to the map data structure;
the deploying, for each map data structure, the target service of each map data structure by using the thread corresponding to the map data structure based on the sequential order of chained deployment of each target service with a dependency relationship in the map data structure, includes:
determining a target service to be deployed currently in the map data structure based on the sequential order of chained deployment of each target service with a dependency relationship in the map data structure for each 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 utilizing 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 utilizing a thread corresponding to the map data structure;
returning to 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 each target service with a dependency relationship in the map data structure, and continuing to execute the step until the target service of each map data structure is deployed;
the method further comprises the steps of:
caching the compiled and packaged target service storage, storing the identification of each cached compiled and packaged target service to a designated position, wherein each target service has a unique identification;
if the target service to be deployed currently in the map data structure has been compiled and packaged, the method includes:
if the appointed position stores the identification 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 has not been compiled and packaged, the method includes:
and if the designated position does not store the identification of the target service to be deployed currently in the map data structure.
2. The method according to claim 1, wherein the method further comprises:
acquiring the number of map data structures in the association relationship to obtain a target number;
and establishing a preset thread group comprising threads of the target number according to the target number.
3. A service management apparatus, the apparatus comprising:
the system comprises an incidence relation acquisition module, a storage module and a storage 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;
the target service deployment module is used for deploying the target services of each map data structure according to the sequence of chained deployment of each target service with a dependency relationship in each map data structure by utilizing a preset thread group;
the apparatus further comprises:
the deployment state recording module is used for recording the deployment state of each target service when the preset backup rule is met;
the deployment state recovery module is used for continuing to deploy each target service according to the deployment state when a deployment state recovery instruction is acquired;
the preset thread group comprises a plurality of threads, wherein the threads are used for deploying the target service of each map data structure in parallel;
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;
the target service deployment sub-module 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 a dependency relationship in the map data structure for each map data structure;
the target service deployment sub-module comprises:
the current service determining unit is used for determining the current target service to be deployed 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 aiming at each map data structure;
the first deployment unit is used for acquiring the compiled and packaged target service to be deployed currently and deploying the target service if the target service to be deployed currently in the map data structure is compiled and packaged by utilizing the thread corresponding to the map data structure;
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 yet;
the return execution unit returns to the current service determination unit to continue execution until the target service of each map data structure is deployed;
the apparatus further comprises:
the data caching module is used for caching the compiled and packaged target service storage and storing the identification of each cached compiled and packaged target service to a designated position;
the first deployment unit is specifically configured to: if the identification of the current target service to be deployed in the map data structure is stored in the designated position, acquiring the compiled and packaged current target service to be deployed and deploying the target service by utilizing a thread corresponding to the map data structure;
the second deployment unit is specifically configured to compile, package, and deploy the target service to be deployed currently by using the thread corresponding to the map data structure if the identifier of the target service to be deployed currently in the map data structure is not stored in the specified location.
4. A device according to claim 3, characterized in that the device further comprises:
the target data acquisition module is used for acquiring the number of map data structures in the association relationship to obtain target number;
and the thread group establishing module is used for establishing a preset thread group comprising threads with the target number according to the target number.
5. 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-2 when executing the program stored in the memory.
6. A computer readable storage medium, characterized in that the computer readable storage medium has stored therein a computer program which, when executed by a processor, implements the service management method of any of claims 1-2.
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 CN110825391A (en) 2020-02-21
CN110825391B true 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)

Families Citing this family (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 (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
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
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
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

Family Cites Families (6)

* 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
US8806014B2 (en) * 2010-03-19 2014-08-12 Novell, Inc. Techniques for intelligent service deployment
US20150378701A1 (en) * 2014-06-26 2015-12-31 Microsoft Corporation Cross-environment orchestration of deployment activities
US9979779B2 (en) * 2015-08-19 2018-05-22 International Business Machines Corporation Scheduling software deployment
US10778810B2 (en) * 2016-09-25 2020-09-15 Salesforce.Com, Inc. Staging and deployment to multiple service clouds
CN110673936B (en) * 2019-09-18 2022-05-17 平安科技(深圳)有限公司 Breakpoint continuous operation method and device for arrangement service, storage medium and electronic equipment

Patent Citations (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106156198A (en) * 2015-04-22 2016-11-23 阿里巴巴集团控股有限公司 Task executing method based on distributed data base and device
CN105487881A (en) * 2015-08-20 2016-04-13 广州爱九游信息技术有限公司 Software installation package packaging method, device and system
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

Also Published As

Publication number Publication date
CN110825391A (en) 2020-02-21

Similar Documents

Publication Publication Date Title
US20190324772A1 (en) Method and device for processing smart contracts
CN105490860B (en) The method, apparatus and system of disposing application program running environment
US8627293B2 (en) Detecting applications in a virtualization environment
US20160188304A1 (en) Execution optimization of mobile applications
CN110825391B (en) Service management method, device, electronic equipment and storage medium
CN109491763B (en) System deployment method and device and electronic equipment
CN111949899B (en) Service integration method and service platform
US9116771B2 (en) Merging weighted recommendations for installation and configuration of software products
CN105955805A (en) Application container transferring method and device
CN106775951A (en) A kind of operation management method and device of Android application
US20110209004A1 (en) Integrating templates into tests
US20160364258A1 (en) Method for generating upgrade campaigns to upgrade virtualization facilities
CN112579099A (en) Code deployment method and device, storage medium and electronic equipment
CN104504331A (en) Virtualization security detection method and system
CN114595461A (en) Data processing method and device
US20140137085A1 (en) Electronic system, onboard modular execution platform and method ensuring partitioning of configurable decision-making rules
CN104252413A (en) Automatic script generation method, device and system
CN101553781A (en) Function binding method and system
CN115297024B (en) Performance test method and device of network security equipment and electronic equipment
CN110750270A (en) Method and device for deploying packaged software
CN108089895B (en) Activity registration method and device in plug-in, electronic equipment and storage medium
CN113220314B (en) APP resource loading and APK generation method, device, equipment and medium
CN104504330A (en) Virtual safety detecting method and system
CN104199774B (en) Program security testing method and device
CN106648788A (en) Installing method and device of application program

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