CN112688804B - Service platform deployment method, device, equipment and storage medium - Google Patents

Service platform deployment method, device, equipment and storage medium Download PDF

Info

Publication number
CN112688804B
CN112688804B CN202011500599.7A CN202011500599A CN112688804B CN 112688804 B CN112688804 B CN 112688804B CN 202011500599 A CN202011500599 A CN 202011500599A CN 112688804 B CN112688804 B CN 112688804B
Authority
CN
China
Prior art keywords
service platform
information
file
deployment
resource
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
CN202011500599.7A
Other languages
Chinese (zh)
Other versions
CN112688804A (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.)
Ping An Property and Casualty Insurance Company of China Ltd
Original Assignee
Ping An Property and Casualty Insurance Company of China 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 Ping An Property and Casualty Insurance Company of China Ltd filed Critical Ping An Property and Casualty Insurance Company of China Ltd
Priority to CN202011500599.7A priority Critical patent/CN112688804B/en
Publication of CN112688804A publication Critical patent/CN112688804A/en
Application granted granted Critical
Publication of CN112688804B publication Critical patent/CN112688804B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention relates to the technical field of computers, and provides a service platform deployment method, device, equipment and storage medium, which are used for improving the efficiency of deploying a plurality of service platforms. The deployment method of the service platform comprises the following steps: acquiring a resource package, and copying the resource package to a preset directory, wherein the resource package comprises a JS object numbered musical notation file, a test environment package and a production environment package; acquiring link information based on each service platform, and extracting routing information of each service platform from the link information; obtaining a decompression command, decompressing the resource package through the decompression command to obtain a decompressed file, and extracting target configuration information from the decompressed file; and deploying the project information of each service platform to a target server according to the target configuration information and the routing information of each service platform, and generating a deployment resource file.

Description

Service platform deployment method, device, equipment and storage medium
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a method, an apparatus, a device, and a storage medium for deploying a service platform.
Background
In the process of carrying out the business project, in order to improve the richness and the suitability of the business products, the multi-business platform needs to be deployed according to different business scene requirements. Currently, for deployment of multiple service platforms, the service platforms are generally deployed by applying domain names corresponding to the service platforms to a server and according to the domain names corresponding to the service platforms.
However, due to the deployment manner of the multi-service platform, the following drawbacks exist: for the access of the service platform of the administrator with only the right, higher access frequency can be caused, and for the access of the service platform of the user with the requirement, the waste of domain names and server resources can be caused, the period of applying for the domain names is longer, and various configurations and deployments are required to be carried out according to the configuration of the domain names, so that the deployment efficiency of the multi-service platform is lower.
Disclosure of Invention
The invention provides a service platform deployment method, device, equipment and storage medium, which are used for improving the efficiency of deploying a plurality of service platforms.
The first aspect of the present invention provides a service platform deployment method, including:
acquiring a resource package, and copying the resource package to a preset directory, wherein the resource package comprises a JS object numbered musical notation file, a test environment package and a production environment package;
acquiring link information based on each service platform, and extracting routing information of each service platform from the link information;
obtaining a decompression command, decompressing the resource package through the decompression command to obtain a decompressed file, and extracting target configuration information from the decompressed file;
And deploying the project information of each service platform to a target server according to the target configuration information and the routing information of each service platform, and generating a deployment resource file.
Optionally, in a first implementation manner of the first aspect of the present invention, the obtaining a resource package and copying the resource package to a preset directory includes:
acquiring a resource package, creating a copy task queue and a copy thread, and adding the resource package to the copy task queue;
and extracting the resource package from the copy task queue through the copy thread, and writing the resource package into a preset directory.
Optionally, in a second implementation manner of the first aspect of the present invention, the obtaining link information based on each service platform and extracting routing information of each service platform from the link information include:
receiving an initial link request based on each service platform and sent by a webpage, and performing validity verification and security verification on the initial link request to obtain a target link request passing verification;
analyzing the target link request to obtain analysis information, and identifying the analysis information through a preset route identifier to obtain the route information of each service platform.
Optionally, in a third implementation manner of the first aspect of the present invention, the deploying item information of each service platform to a target server according to the target configuration information and the routing information of each service platform, and generating a deployment resource file includes:
acquiring domain name information of each service platform and server resources of a target server, creating a first mapping relation between routing information of each service platform and the domain name information and a second mapping relation between the routing information of each service platform and the server resources, and triggering a configuration code packaging command;
and carrying out file configuration of a target server on the project information of each service platform based on the target configuration information, the first mapping relation and the second mapping relation through the configuration code packaging command, and generating a deployment resource file.
Optionally, in a fourth implementation manner of the first aspect of the present invention, after the deploying item information of each service platform to the target server according to the target configuration information and the routing information of each service platform and generating the deployment resource file, the method further includes:
When a rendering request sent by a preset page is received, rendering the deployment resource file to the preset page based on the rendering request;
and calling a pre-deployed monitoring tool to monitor the performance and perform early warning processing on the preset page.
Optionally, in a fifth implementation manner of the first aspect of the present invention, when receiving a rendering request sent by a preset page, the rendering the deployment resource file to the preset page based on the rendering request includes:
when a rendering request sent by a preset page is received, file path information corresponding to the rendering request is acquired;
and extracting the deployment resource file through the file path information, and loading the deployment resource file to a preset page for rendering.
Optionally, in a sixth implementation manner of the first aspect of the present invention, the calling a pre-deployed monitoring tool to perform performance monitoring and early warning processing on the preset page includes:
invoking a monitoring tool and a monitoring pool which are deployed in advance, monitoring the performance and operation of the preset page for a preset period of time, and generating monitoring data;
analyzing and scoring the monitoring data according to a preset evaluation index to obtain a performance quality score, and judging whether the performance quality score is smaller than a preset threshold value or not;
If the performance quality score is smaller than a preset threshold, generating a visual chart according to the performance quality score and monitoring data corresponding to the performance quality score, and sending the visual chart to an early warning terminal.
The second aspect of the present invention provides a deployment device for a service platform, including:
the copying module is used for acquiring a resource package and copying the resource package to a preset directory, wherein the resource package comprises a JS object numbered musical notation file, a test environment package and a production environment package;
the extraction module is used for acquiring link information based on each service platform and extracting routing information of each service platform from the link information;
the decompression module is used for acquiring a decompression command, decompressing the resource package through the decompression command to obtain a decompression file, and extracting target configuration information from the decompression file;
the deployment module is used for deploying the project information of each service platform to a target server according to the target configuration information and the routing information of each service platform and generating a deployment resource file.
Optionally, in a first implementation manner of the second aspect of the present invention, the copy module is specifically configured to:
Acquiring a resource package, creating a copy task queue and a copy thread, and adding the resource package to the copy task queue;
and extracting the resource package from the copy task queue through the copy thread, and writing the resource package into a preset directory.
Optionally, in a second implementation manner of the second aspect of the present invention, the extracting module is specifically configured to:
receiving an initial link request based on each service platform and sent by a webpage, and performing validity verification and security verification on the initial link request to obtain a target link request passing verification;
analyzing the target link request to obtain analysis information, and identifying the analysis information through a preset route identifier to obtain the route information of each service platform.
Optionally, in a third implementation manner of the second aspect of the present invention, the deployment module is specifically configured to:
acquiring domain name information of each service platform and server resources of a target server, creating a first mapping relation between routing information of each service platform and the domain name information and a second mapping relation between the routing information of each service platform and the server resources, and triggering a configuration code packaging command;
And carrying out file configuration of a target server on the project information of each service platform based on the target configuration information, the first mapping relation and the second mapping relation through the configuration code packaging command, and generating a deployment resource file.
Optionally, in a fourth implementation manner of the second aspect of the present invention, the service platform deployment device further includes:
the rendering module is used for rendering the deployment resource file to the preset page based on the rendering request when receiving the rendering request sent by the preset page;
and the monitoring and early warning module is used for calling a pre-deployed monitoring tool and carrying out performance monitoring and early warning processing on the preset page.
Optionally, in a fifth implementation manner of the second aspect of the present invention, the rendering module is specifically configured to:
when a rendering request sent by a preset page is received, file path information corresponding to the rendering request is acquired;
and extracting the deployment resource file through the file path information, and loading the deployment resource file to a preset page for rendering.
Optionally, in a sixth implementation manner of the second aspect of the present invention, the monitoring and early warning module is specifically configured to:
Invoking a monitoring tool and a monitoring pool which are deployed in advance, monitoring the performance and operation of the preset page for a preset period of time, and generating monitoring data;
analyzing and scoring the monitoring data according to a preset evaluation index to obtain a performance quality score, and judging whether the performance quality score is smaller than a preset threshold value or not;
if the performance quality score is smaller than a preset threshold, generating a visual chart according to the performance quality score and monitoring data corresponding to the performance quality score, and sending the visual chart to an early warning terminal.
A third aspect of the present invention provides a deployment device for a service platform, including: a memory and at least one processor, the memory having instructions stored therein; and the at least one processor invokes the instructions in the memory to enable the deployment equipment of the service platform to execute the deployment method of the service platform.
A fourth aspect of the present invention provides a computer-readable storage medium having instructions stored therein that, when executed on a computer, cause the computer to perform the method of deploying a service platform as described above.
In the technical scheme provided by the invention, a resource package is obtained and copied to a preset directory, wherein the resource package comprises a JS object numbered musical notation file, a test environment package and a production environment package; acquiring link information based on each service platform, and extracting routing information of each service platform from the link information; obtaining a decompression command, decompressing the resource package through the decompression command to obtain a decompressed file, and extracting target configuration information from the decompressed file; and deploying the project information of each service platform to a target server according to the target configuration information and the routing information of each service platform, and generating a deployment resource file. In the embodiment of the invention, the resource package is copied to the preset directory, the routing information of each service platform is extracted from the link information, the project information of each service platform is deployed to the target server according to the target configuration information and the routing information of each service platform, and the deployment resource file is generated, so that the problems of higher access frequency, domain name and server resource waste and longer period of applying for the domain name are solved, and the efficiency of deploying the multi-service platform is improved.
Drawings
FIG. 1 is a schematic diagram of an embodiment of a method for deploying a service platform according to an embodiment of the present invention;
fig. 2 is a schematic diagram of another embodiment of a deployment method of a service platform according to an embodiment of the present invention;
FIG. 3 is a schematic diagram of an embodiment of a deployment apparatus of a service platform according to an embodiment of the present invention;
FIG. 4 is a schematic diagram of another embodiment of a deployment apparatus of a service platform according to an embodiment of the present invention;
fig. 5 is a schematic diagram of an embodiment of a deployment device of a service platform according to an embodiment of the present invention.
Detailed Description
The embodiment of the invention provides a service platform deployment method, device, equipment and storage medium, which improve the efficiency of deploying multiple service platforms.
The terms "first," "second," "third," "fourth" and the like in the description and in the claims and in the above drawings, if any, are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate such that the embodiments described herein may be implemented in other sequences than those illustrated or otherwise described herein. Furthermore, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed or inherent to such process, method, article, or apparatus.
For easy understanding, the following describes a specific flow of an embodiment of the present invention, referring to fig. 1, and one embodiment of a service platform deployment method in the embodiment of the present invention includes:
101. and obtaining a resource package, and copying the resource package to a preset directory, wherein the resource package comprises a JS object numbered musical notation file, a test environment package and a production environment package.
It may be understood that the execution body of the present invention may be a deployment device of a service platform, and may also be a terminal or a server, which is not limited herein. The embodiment of the invention is described by taking the terminal as an execution main body as an example.
The terminal obtains a resource package by uploading the resource package, and the terminal can also search a pre-created resource library according to the resource configuration type input by a preset interface to obtain a corresponding resource package, wherein the resource package can comprise a resource package of each service platform and/or a resource package of a target server, and the resource package comprises a depth flow. After the terminal obtains the resource package, the resource package can be generated into a static resource package so as to increase the access speed, lighten the load of the server, call a pre-edited deployment script, write the static resource package into a preset catalog rel/catalog, judge whether a corresponding zip compression package exists, judge that the copying is successful if yes, judge that the copying is failed, and re-copy until the corresponding zip compression package exists.
102. And acquiring link information based on each service platform, and extracting routing information of each service platform from the link information.
The method comprises the steps that a user inputs link information on a browser or a preset interface corresponding to each service platform, the browser or the preset interface corresponding to each service platform sends the link information to a terminal, after the terminal receives the link information, the link information is analyzed through a preset route link library to obtain analyzed route information, the analyzed route information is checked through a predefined route regular expression to obtain route information meeting checking requirements, and a corresponding relation between the route information meeting the checking requirements of each service platform and a corresponding target folder in a preset catalog is created to obtain the route information of each service platform; or the terminal analyzes the link information to obtain analyzed link information, detects the analyzed link information through a preset route splicing rule to obtain spliced route information on the link information, and creates a corresponding relation between the spliced route information on the link information of each service platform and a corresponding target folder in a preset directory to obtain the route information of each service platform; or the terminal analyzes the link information to obtain analyzed link information, extracts spliced initial routing information from the link information, searches a preset routing information tree according to the initial routing information, so as to carry out checksum information supplementation on the initial routing information to obtain target routing information, and creates a corresponding relation between each target routing information and a corresponding target folder in a preset directory to obtain the routing information of each service platform.
103. And acquiring a decompression command, decompressing the resource package through the decompression command to obtain a decompressed file, and extracting target configuration information from the decompressed file.
When the terminal obtains the route information of each service platform, triggering a decompression command, decompressing the resource package according to the decompression command, and decompressing the resource package into a catalog corresponding to the target server to obtain a decompressed file, for example: the terminal decompresses the resource package under rel/directory to the specified target server nginx directory through the decompression command, and takes the danger-producing employee service platform with route of qe as an example, decompresses the resource package of qedist.zip to the qeapps/dist directory corresponding to the target server nginx. And acquiring an initial configuration file from the decompressed file, analyzing the initial configuration file to obtain initial configuration information, judging whether the initial configuration information is empty, if so, acquiring a backup configuration file, analyzing the backup configuration file to obtain target configuration information, and if not, determining the initial configuration information as the target configuration information.
104. And deploying the project information of each service platform to a target server according to the target configuration information and the routing information of each service platform, and generating a deployment resource file.
The target server may be a high-performance HTTP and reverse proxy web server nmginx, after obtaining the target configuration information and the route information, the terminal obtains path information of a target folder corresponding to the route information of each service platform in the preset directory, configures project information of each service platform into a file name and a file format according to the target configuration information, and sends the project information value of each service platform to a corresponding target position in the target server nmginx according to the path information, and generates a deployment resource file, where the deployment resource file includes at least one of an extensible markup language (extensible markup language, XML) file, an advanced script language JavaScript file, a cascading style sheet (cascading style sheets, CSS) file and a class CS file of the target server nmginx.
It should be noted that, the target folders corresponding to each route in the preset directory are independent, and the target folders corresponding to each route in the preset directory are uniquely associated, even if there are multiple target folders, the resources corresponding to each route are independent and isolated, and no influence and interference are caused on the resources loaded on the current page, so that the deployment method and execution process of the service platform can be used for configuration even if a new service platform needs to be added later.
In the embodiment of the invention, the resource package is copied to the preset directory, the routing information of each service platform is extracted from the link information, the project information of each service platform is deployed to the target server according to the target configuration information and the routing information of each service platform, and the deployment resource file is generated, so that the problems of higher access frequency, domain name and server resource waste and longer period of applying for the domain name are solved, and the efficiency of deploying the multi-service platform is improved.
Referring to fig. 2, another embodiment of a service platform deployment method in an embodiment of the present invention includes:
201. and obtaining a resource package, and copying the resource package to a preset directory, wherein the resource package comprises a JS object numbered musical notation file, a test environment package and a production environment package.
Specifically, a terminal acquires a resource package, creates a copy task queue and a copy thread, and adds the resource package to the copy task queue; and extracting the resource package from the copy task queue through the copy thread, and writing the resource package into a preset directory.
The terminal obtains resource packages and copy matters, the copy matters can be input in a preset interface by a user, the copy matters can comprise the type, the content and the mode of copying, after obtaining the resource packages by the terminal, a copy task queue and a copy thread are created according to the resource packages and the copy matters, wherein the number of the resource packages comprises one or more, the copy task queue and the copy thread can comprise copy priorities of the resource packages and/or ordering sequences in a preset catalog, the resource packages are added to a cache area of the task queue, the task queue can further comprise the cache area and the copy area, when the terminal receives triggered copy instructions, the resource packages in the cache area are stored in the copy area of the copy task queue according to the copy priorities and/or ordering sequences in the preset catalog, the copy thread is called, the resource packages are extracted from the copy area of the task queue, and the extracted resource packages are written into the preset catalog according to the copy priorities and/or ordering sequences.
202. And acquiring link information based on each service platform, and extracting routing information of each service platform from the link information.
Specifically, the terminal receives an initial link request based on each service platform and sent by a webpage, performs validity verification and security verification on the initial link request, and obtains a target link request passing verification; analyzing the target link request to obtain analysis information, and identifying the analysis information through a preset route identifier to obtain the route information of each service platform.
The user of each service platform inputs a link corresponding to each service platform in a browser, wherein the link comprises an address link of a test environment and an address link in a production environment, the browser sends an initial link request based on each service platform to a terminal, the initial link request comprises address link information and routing information, and different service platforms correspond to different routing formats, for example: the routing format corresponding to the management service platform is/, the routing format corresponding to the employee benefit service platform is/supplier, the routing format corresponding to the employee service platform is/qe, and the routing format corresponding to the function page embedded in the personnel administrative service platform through the iframe is/cz.
After receiving the initial connection request, the terminal performs validity verification on the initial link request through a preset validity authentication protocol or a preset validity authentication command, if the validity verification of the initial link request is passed, the encryption condition and the encryption degree of the initial link request are verified to realize security verification, a target link request passing verification is obtained, if the validity verification of the initial link request is not passed, a verification result not passing the validity verification is returned, and the initial link request is obtained again and is validated repeatedly, so that the target link request passing verification is obtained. The terminal analyzes the target link request to obtain analysis information, identifies the analysis information through a preset route identifier to obtain a target position corresponding to the route identifier in the analysis information, and extracts information after the target position in the analysis information to obtain the route information of each service platform.
203. And acquiring a decompression command, decompressing the resource package through the decompression command to obtain a decompressed file, and extracting target configuration information from the decompressed file.
When the terminal obtains the route information of each service platform, triggering a decompression command, decompressing the resource package according to the decompression command, and decompressing the resource package into a catalog corresponding to the target server to obtain a decompressed file, for example: the target server can be a high-performance HTTP and reverse proxy web server Nginx, the terminal decompresses the resource package under rel/directory to the specified target server ginx directory through a decompression command, and takes a danger-producing employee service platform with route of qe as an example, decompresses the resource package of qedist.zip to the qeapps/dist directory corresponding to the target server ginx. And acquiring an initial configuration file from the decompressed file, analyzing the initial configuration file to obtain initial configuration information, judging whether the initial configuration information is empty, if so, acquiring a backup configuration file, analyzing the backup configuration file to obtain target configuration information, and if not, determining the initial configuration information as the target configuration information.
204. And deploying the project information of each service platform to a target server according to the target configuration information and the routing information of each service platform, and generating a deployment resource file.
Specifically, the terminal acquires domain name information of each service platform and server resources of a target server, creates a first mapping relation between routing information of each service platform and the domain name information and a second mapping relation between the routing information of each service platform and the server resources, and triggers a configuration code packaging command; and carrying out file configuration of the target server on the project information of each service platform based on the target configuration information, the first mapping relation and the second mapping relation through a configuration code packaging command, and generating a deployment resource file.
Wherein the target server can be high-performance HTTP and reverse proxy web server Nginx, the terminal can define the domain name information of each service platform through the domain name control panel, or generate the domain name information of each service platform through the target server Nginx so as to obtain the domain name information of each service platform, the terminal extracts the server resources in the resource library of the target server Nginx, and performs mapping and resource relation binding with the domain name information by adding corresponding routing information to address links in the test environment and the production environment, namely respectively creating a first mapping relation between the routing information and the domain name information of each service platform, and a second mapping relationship between the routing information of each service platform and the server resource, where the second mapping relationship includes an association relationship and a connection relationship, and triggers a configuration code packaging command, where the configuration code packaging command includes a server naming server_name instruction, where the server_name instruction includes at least one of a regular expression form, a wild card (x) form and an accurate domain name form, and by the server naming server_name instruction, file naming of the target server nminx is performed on item information of each service platform based on the target configuration information, the first mapping relationship and the second mapping relationship, for example: taking a service platform as an example of a risk production small clothes management background, naming item information of the risk production small clothes management background as dist-stg.zip and dist-prd.zip, adding json files with the same names as those of server resources under the depth_desc, setting stg and prd names in a filename as the two zip file names respectively, setting the destfiename as apps/dist.zip, and generating a deployment resource file when the file configuration of a target server Nginx is completed on the item information of each service platform.
205. When a rendering request sent by the preset page is received, rendering the deployment resource file to the preset page based on the rendering request.
Specifically, when a terminal receives a rendering request sent by a preset page, acquiring file path information corresponding to the rendering request; and extracting a deployment resource file through the file path information, and loading the deployment resource file to a preset page for rendering.
When a user requests a page to render a required resource on a preset page, the preset page generates a rendering request, the rendering request is sent to a terminal, the terminal analyzes the rendering request after receiving the rendering request sent by the preset page to obtain a resource keyword, searches a path for deploying a resource file according to the resource keyword and a preset search engine to obtain file path information, sequentially takes js files and css files out through the file path information and loads the js files on the preset page, and the function from input link to page display is realized.
206. And calling a pre-deployed monitoring tool to monitor the performance and perform early warning processing on the preset page.
In order to better monitor the page performance of the preset page and measure the key quality index of the preset page, a WiseAPM cloud-viewing tool of an intelligent end-to-end application performance monitoring system is deployed in advance, wherein monitoring data provided by the cloud-viewing tool comprises but is not limited to access amount data PV, independent visitor data UV, page rendering time data, white screen time data, first screen time data, JS error rate data and the like, and the deployment of the WiseAPM cloud-viewing tool is as follows: when a preset page is accessed by a user, related monitoring data can be displayed by calling the cloud viewing tool, data of the last half year can be displayed, although a plurality of items use the same domain name and the target server Nginx, the performance of the items does not interfere with each other, the Apdex value is always kept above 99%, the first screen loading time is within 100ms, the page white screen time is below 1s, and the performance is good. The terminal monitors performance and performs early warning processing on the preset page by calling a pre-deployed cloud-viewing tool so as to improve service performance and efficiency of the deployed multi-service platform.
Specifically, the terminal calls a monitoring tool and a monitoring pool which are deployed in advance, monitors the performance and operation of a preset page for a preset period of time, and generates monitoring data; analyzing and scoring the monitoring data according to a preset evaluation index to obtain a performance quality score, and judging whether the performance quality score is smaller than a preset threshold value or not; if the performance quality score is smaller than the preset threshold, generating a visual chart according to the performance quality score and the monitoring data corresponding to the performance quality score, and sending the visual chart to the early warning terminal.
For example, the monitoring pool is used for indicating that abnormal monitoring is performed on performance data and operation data every preset time period, the terminal calls a monitoring tool and a monitoring pool which are deployed in advance, the performance and operation of a preset page in the preset time period are monitored to obtain monitoring data, the monitoring data comprise access volume data (PV), independent visitor data (UV), page rendering time data, white screen time data, first screen time data, JS error rate data and the like, the monitoring data are analyzed and scored through preset evaluation indexes to obtain a performance quality score, the evaluation indexes are used for indicating the quality indexes of the preset page, whether the performance quality score is smaller than a preset threshold value or not is judged, if yes, the performance quality score and the performance quality score correspond to the monitoring data, a visual chart is generated, the visual chart is sent to the early warning end, the strategy and the execution process deployed by the early warning end are adjusted, and if no, the performance and operation of the preset page are continuously monitored in the preset time period.
In the embodiment of the invention, the resource package is copied to the preset catalog, the routing information of each service platform is extracted from the link information, the project information of each service platform is deployed to the target server according to the target configuration information and the routing information of each service platform, and the deployment resource file is generated, so that the problems of higher access frequency, waste of domain name and server resources and longer period of applying for domain name are solved, the efficiency of deploying the multi-service platform is improved, and the performance monitoring and early warning processing are carried out on the preset page by calling a monitoring tool deployed in advance, so that the use performance and efficiency of the multi-service platform after deployment are improved.
The method for deploying a service platform in the embodiment of the present invention is described above, and the device for deploying a service platform in the embodiment of the present invention is described below, referring to fig. 3, where one embodiment of the device for deploying a service platform in the embodiment of the present invention includes:
the copy module 301 is configured to obtain a resource package, and copy the resource package to a preset directory, where the resource package includes a JS object profile file, a test environment package, and a production environment package;
the extracting module 302 is configured to obtain link information based on each service platform, and extract routing information of each service platform from the link information;
The decompression module 303 is configured to obtain a decompression command, decompress the resource package through the decompression command to obtain a decompressed file, and extract target configuration information from the decompressed file;
the deployment module 304 is configured to deploy project information of each service platform to a target server according to the target configuration information and the routing information of each service platform, and generate a deployment resource file.
The function implementation of each module in the deployment device of the service platform corresponds to each step in the deployment method embodiment of the service platform, and the function and implementation process of the function implementation are not described in detail herein.
In the embodiment of the invention, the resource package is copied to the preset directory, the routing information of each service platform is extracted from the link information, the project information of each service platform is deployed to the target server according to the target configuration information and the routing information of each service platform, and the deployment resource file is generated, so that the problems of higher access frequency, domain name and server resource waste and longer period of applying for the domain name are solved, and the efficiency of deploying the multi-service platform is improved.
Referring to fig. 4, another embodiment of a deployment apparatus for a service platform according to an embodiment of the present invention includes:
The copy module 301 is configured to obtain a resource package, and copy the resource package to a preset directory, where the resource package includes a JS object profile file, a test environment package, and a production environment package;
the extracting module 302 is configured to obtain link information based on each service platform, and extract routing information of each service platform from the link information;
the decompression module 303 is configured to obtain a decompression command, decompress the resource package through the decompression command to obtain a decompressed file, and extract target configuration information from the decompressed file;
the deployment module 304 is configured to deploy project information of each service platform to a target server according to the target configuration information and the routing information of each service platform, and generate a deployment resource file;
a rendering module 305, configured to, when receiving a rendering request sent by a preset page, render the deployment resource file to the preset page based on the rendering request;
and the monitoring and early warning module 306 is used for calling a pre-deployed monitoring tool to monitor and early warn the performance of the preset page.
Optionally, the copy module 301 may be further specifically configured to:
acquiring a resource package, creating a copy task queue and a copy thread, and adding the resource package to the copy task queue;
And extracting the resource package from the copy task queue through the copy thread, and writing the resource package into a preset directory.
Optionally, the extracting module 302 may be further specifically configured to:
receiving an initial link request based on each service platform and sent by a webpage, and performing validity verification and security verification on the initial link request to obtain a target link request passing verification;
analyzing the target link request to obtain analysis information, and identifying the analysis information through a preset route identifier to obtain the route information of each service platform.
Optionally, the deployment module 304 may be further specifically configured to:
acquiring domain name information of each service platform and server resources of a target server, creating a first mapping relation between routing information of each service platform and the domain name information and a second mapping relation between the routing information of each service platform and the server resources, and triggering a configuration code packaging command;
and carrying out file configuration of the target server on the project information of each service platform based on the target configuration information, the first mapping relation and the second mapping relation through a configuration code packaging command, and generating a deployment resource file.
Optionally, the rendering module 305 may be further specifically configured to:
When a rendering request sent by a preset page is received, file path information corresponding to the rendering request is acquired;
and extracting a deployment resource file through the file path information, and loading the deployment resource file to a preset page for rendering.
Optionally, the monitoring and early warning module 306 may be further specifically configured to:
invoking a monitoring tool and a monitoring pool which are deployed in advance, monitoring the performance and operation of a preset page for a preset period of time, and generating monitoring data;
analyzing and scoring the monitoring data according to a preset evaluation index to obtain a performance quality score, and judging whether the performance quality score is smaller than a preset threshold value or not;
if the performance quality score is smaller than the preset threshold, generating a visual chart according to the performance quality score and the monitoring data corresponding to the performance quality score, and sending the visual chart to the early warning terminal.
The function implementation of each module and each unit in the deployment device of the service platform corresponds to each step in the deployment method embodiment of the service platform, and the function and implementation process of the function implementation are not described in detail herein.
In the embodiment of the invention, the resource package is copied to the preset catalog, the routing information of each service platform is extracted from the link information, the project information of each service platform is deployed to the target server according to the target configuration information and the routing information of each service platform, and the deployment resource file is generated, so that the problems of higher access frequency, waste of domain name and server resources and longer period of applying for domain name are solved, the efficiency of deploying the multi-service platform is improved, and the performance monitoring and early warning processing are carried out on the preset page by calling a monitoring tool deployed in advance, so that the use performance and efficiency of the multi-service platform after deployment are improved.
The deployment device of the service platform in the embodiment of the present invention is described in detail from the point of view of the modularized functional entity in fig. 3 and fig. 4, and the deployment device of the service platform in the embodiment of the present invention is described in detail from the point of view of hardware processing.
Fig. 5 is a schematic structural diagram of a deployment device of a service platform according to an embodiment of the present invention, where a deployment device 500 of the service platform may have a relatively large difference due to different configurations or performances, and may include one or more processors (central processing units, CPU) 510 (e.g., one or more processors) and a memory 520, and one or more storage media 530 (e.g., one or more mass storage devices) storing application programs 533 or data 532. Wherein memory 520 and storage medium 530 may be transitory or persistent storage. The program stored on the storage medium 530 may include one or more modules (not shown), each of which may include a series of instruction operations in the deployment device 500 of the service platform. Still further, the processor 510 may be configured to communicate with the storage medium 530 to execute a series of instruction operations in the storage medium 530 on the deployment device 500 of the service platform.
The deployment device 500 of the service platform may also include one or more power supplies 540, one or more wired or wireless network interfaces 550, one or more input/output interfaces 560, and/or one or more operating systems 531, such as Windows Serve, mac OS X, unix, linux, freeBSD, and the like. Those skilled in the art will appreciate that the deployment device structure of the service platform shown in fig. 5 does not constitute a limitation of the deployment device of the service platform, and may include more or fewer components than shown, or may combine certain components, or may be a different arrangement of components.
The present invention also provides a computer readable storage medium, which may be a non-volatile computer readable storage medium, and may also be a volatile computer readable storage medium, where instructions are stored, which when executed on a computer, cause the computer to perform the steps of a deployment method of a service platform.
It will be clear to those skilled in the art that, for convenience and brevity of description, specific working procedures of the above-described systems, apparatuses and units may refer to corresponding procedures in the foregoing method embodiments, which are not repeated herein.
The integrated units, if implemented in the form of software functional units and sold or used as stand-alone products, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied in essence or a part contributing to the prior art or all or part of the technical solution in the form of a software product stored in a storage medium, including several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods of the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a read-only memory (ROM), a random access memory (random access memory, RAM), a magnetic disk, or an optical disk, or other various media capable of storing program codes.
The above embodiments are only for illustrating the technical solution of the present invention, and not for limiting the same; although the invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims (9)

1. The deployment method of the service platform is characterized by comprising the following steps:
acquiring a resource package, and copying the resource package to a preset directory, wherein the resource package comprises a JS object numbered musical notation file, a test environment package and a production environment package;
acquiring link information based on each service platform, and extracting routing information of each service platform from the link information;
obtaining a decompression command, decompressing the resource package through the decompression command to obtain a decompressed file, and extracting target configuration information from the decompressed file;
deploying the project information of each service platform to a target server according to the target configuration information and the routing information of each service platform, and generating a deployment resource file;
the deploying the project information of each service platform to the target server according to the target configuration information and the routing information of each service platform, and generating a deployment resource file, including:
acquiring domain name information of each service platform and server resources of a target server, creating a first mapping relation between routing information of each service platform and the domain name information and a second mapping relation between the routing information of each service platform and the server resources, and triggering a configuration code packaging command;
And carrying out file configuration of a target server on the project information of each service platform based on the target configuration information, the first mapping relation and the second mapping relation through the configuration code packaging command, and generating a deployment resource file.
2. The deployment method of the service platform according to claim 1, wherein the obtaining the resource package and copying the resource package to a preset directory comprises:
acquiring a resource package, creating a copy task queue and a copy thread, and adding the resource package to the copy task queue;
and extracting the resource package from the copy task queue through the copy thread, and writing the resource package into a preset directory.
3. The method for deploying service platforms according to claim 1, wherein the obtaining link information based on each service platform and extracting routing information of each service platform from the link information comprise:
receiving an initial link request based on each service platform and sent by a webpage, and performing validity verification and security verification on the initial link request to obtain a target link request passing verification;
analyzing the target link request to obtain analysis information, and identifying the analysis information through a preset route identifier to obtain the route information of each service platform.
4. The method for deploying a service platform according to any one of claims 1-3, wherein after deploying project information of each service platform to a target server according to the target configuration information and the routing information of each service platform and generating a deployment resource file, the method further comprises:
when a rendering request sent by a preset page is received, rendering the deployment resource file to the preset page based on the rendering request;
and calling a pre-deployed monitoring tool to monitor the performance and perform early warning processing on the preset page.
5. The deployment method of the service platform according to claim 4, wherein when receiving a rendering request sent by a preset page, rendering the deployment resource file to the preset page based on the rendering request, includes:
when a rendering request sent by a preset page is received, file path information corresponding to the rendering request is acquired;
and extracting the deployment resource file through the file path information, and loading the deployment resource file to a preset page for rendering.
6. The method for deploying a service platform according to claim 4, wherein the invoking the pre-deployed monitoring tool to perform performance monitoring and early warning processing on the preset page comprises:
Invoking a monitoring tool and a monitoring pool which are deployed in advance, monitoring the performance and operation of the preset page for a preset period of time, and generating monitoring data;
analyzing and scoring the monitoring data according to a preset evaluation index to obtain a performance quality score, and judging whether the performance quality score is smaller than a preset threshold value or not;
if the performance quality score is smaller than a preset threshold, generating a visual chart according to the performance quality score and monitoring data corresponding to the performance quality score, and sending the visual chart to an early warning terminal.
7. The deployment device of the service platform is characterized by comprising the following components:
the copying module is used for acquiring a resource package and copying the resource package to a preset directory, wherein the resource package comprises a JS object numbered musical notation file, a test environment package and a production environment package;
the extraction module is used for acquiring link information based on each service platform and extracting routing information of each service platform from the link information;
the decompression module is used for acquiring a decompression command, decompressing the resource package through the decompression command to obtain a decompression file, and extracting target configuration information from the decompression file;
The deployment module is used for deploying the project information of each service platform to a target server according to the target configuration information and the routing information of each service platform and generating a deployment resource file;
the deployment module is specifically configured to:
acquiring domain name information of each service platform and server resources of a target server, creating a first mapping relation between routing information of each service platform and the domain name information and a second mapping relation between the routing information of each service platform and the server resources, and triggering a configuration code packaging command;
and carrying out file configuration of a target server on the project information of each service platform based on the target configuration information, the first mapping relation and the second mapping relation through the configuration code packaging command, and generating a deployment resource file.
8. The deployment device of the service platform is characterized by comprising the following components: a memory and at least one processor, the memory having instructions stored therein;
the at least one processor invokes the instructions in the memory to cause the deployment device of the service platform to perform the deployment method of the service platform according to any one of claims 1-6.
9. A computer readable storage medium having instructions stored thereon, which when executed by a processor, implement the method of deploying a service platform according to any one of claims 1-6.
CN202011500599.7A 2020-12-18 2020-12-18 Service platform deployment method, device, equipment and storage medium Active CN112688804B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011500599.7A CN112688804B (en) 2020-12-18 2020-12-18 Service platform deployment method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011500599.7A CN112688804B (en) 2020-12-18 2020-12-18 Service platform deployment method, device, equipment and storage medium

Publications (2)

Publication Number Publication Date
CN112688804A CN112688804A (en) 2021-04-20
CN112688804B true CN112688804B (en) 2023-09-19

Family

ID=75449061

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011500599.7A Active CN112688804B (en) 2020-12-18 2020-12-18 Service platform deployment method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN112688804B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113127373A (en) * 2021-05-18 2021-07-16 爱驰汽车有限公司 Visual point burying method, system, device, equipment and storage medium
CN113590169B (en) * 2021-09-30 2021-12-21 武汉四通信息服务有限公司 Application deployment method, application deployment system, and computer-readable storage medium
CN115297096A (en) * 2022-06-28 2022-11-04 青岛海尔科技有限公司 Resource package deployment method and device, storage medium and electronic device

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109725909A (en) * 2018-05-07 2019-05-07 中国平安人寿保险股份有限公司 Code file is packaged dispositions method, continuous integrating server and system
CN110109680A (en) * 2019-05-14 2019-08-09 重庆商勤科技有限公司 Using dispositions method, device and apply dissemination method, server, storage medium
WO2019232828A1 (en) * 2018-06-06 2019-12-12 平安科技(深圳)有限公司 Script deployment method and apparatus, and computer device and storage medium
CN110708368A (en) * 2019-09-25 2020-01-17 北京计算机技术及应用研究所 Micro front-end system and method based on routing distribution
CN111443921A (en) * 2020-03-27 2020-07-24 中国平安财产保险股份有限公司 Method, system and computer equipment for subpackage deployment of web front-end projects
CN111949899A (en) * 2019-05-16 2020-11-17 新奥数能科技有限公司 Service integration method and service platform

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109725909A (en) * 2018-05-07 2019-05-07 中国平安人寿保险股份有限公司 Code file is packaged dispositions method, continuous integrating server and system
WO2019232828A1 (en) * 2018-06-06 2019-12-12 平安科技(深圳)有限公司 Script deployment method and apparatus, and computer device and storage medium
CN110109680A (en) * 2019-05-14 2019-08-09 重庆商勤科技有限公司 Using dispositions method, device and apply dissemination method, server, storage medium
CN111949899A (en) * 2019-05-16 2020-11-17 新奥数能科技有限公司 Service integration method and service platform
CN110708368A (en) * 2019-09-25 2020-01-17 北京计算机技术及应用研究所 Micro front-end system and method based on routing distribution
CN111443921A (en) * 2020-03-27 2020-07-24 中国平安财产保险股份有限公司 Method, system and computer equipment for subpackage deployment of web front-end projects

Also Published As

Publication number Publication date
CN112688804A (en) 2021-04-20

Similar Documents

Publication Publication Date Title
CN112688804B (en) Service platform deployment method, device, equipment and storage medium
US10618137B2 (en) Automated constructing method of cloud manufacturing service and cloud manufacturing system
EP2808790B1 (en) Migration assessment for cloud computing platforms
US10621211B2 (en) Language tag management on international data storage
US9176742B2 (en) Converting desktop applications to web applications
US7559059B2 (en) Method and apparatus for smart directories for application deployment
CN109902073B (en) Log processing method and device, computer equipment and computer readable storage medium
CN111221570B (en) Migration method, device and equipment of microservice framework and storage medium
US9716771B2 (en) Cache control for web application resources
CN108021598B (en) Page extraction template matching method and device and server
JP4215786B2 (en) Web content transfer method, computer and program
CN107133165B (en) Browser compatibility detection method and device
CN109144482B (en) Method and device for building rapid development environment based on webpack
CN110162964B (en) Method, device and system for checking file tampering
US10416976B2 (en) Deployment device, deployment method, and recording medium
CN111680253A (en) Page application data packet generation method and device, computer equipment and storage medium
US8949184B2 (en) Data collector
CN117693734A (en) Front-end item processing method, device, equipment, management system and storage medium
CN112685105A (en) Front-end component sharing method and device, computer equipment and storage medium
CN111695075A (en) Website CMS (content management system) identification method and security vulnerability detection method and device
CN113268245A (en) Code analysis method, device and storage medium
US7886227B2 (en) Cross-environment context-sensitive help files
CN112052364A (en) Sensitive information detection method, device, equipment and computer readable storage medium
CN111881183A (en) Enterprise name matching method and device, storage medium and electronic equipment
US20050050516A1 (en) Framework for providing and using schema data for markup languages

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