A web page deployment method, device and electronic device

By receiving web page deployment requests from the development terminal and determining the deployment terminal, incremental deployment of some web pages in the website is solved, and the problem of redeployment of the entire website is solved in the existing technology that the deployment of web pages in the entire website is required to be redeployed, reducing time and resource costs.

CN113918128BActive Publication Date: 2025-05-27BEIJING DAJIA INTERNET INFORMATION TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202111166922.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-09-30
Publication Date
2025-05-27
Estimated Expiration
2041-09-30

AI Technical Summary

Technical Problem

In the prior art, the deployment of web pages requires redeployment of the entire website, resulting in high time and computing costs.

Method used

Provides a web page deployment method, which determines the deployment end of the website by receiving web page deployment requests sent by the development terminal, and deploys the target web page compilation results on the specified deployment end, realizing incremental deployment of some web pages in the website.

Benefits of technology

Reduces the time and resource costs of deploying web pages, allowing developers to incrementally deploy some web pages in the website without redeploying the entire website.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113918128B_ABST
    Figure CN113918128B_ABST
Patent Text Reader

Abstract

The present application provides a web page deployment method, apparatus, and electronic device. The method includes: receiving a web page deployment request sent by a development terminal, where the web page deployment request includes a target web page compilation result corresponding to a target web page in a website, and the target web page is a partial web page in the website; determining a deployment end corresponding to the website according to the web page deployment request; and deploying the target web page on the deployment end according to the target web page compilation result. This enables developers to select the compilation results corresponding to partial web pages from the website and, by sending the compilation results of these pages to the server, achieve incremental deployment of partial web pages in the website without redeploying the entire website, thereby reducing the time cost and resource cost consumed for web page deployment.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] Embodiments of the present application relate to the field of computer technology, and in particular, to a method and device for web page deployment, an electronic device, a computer-readable storage medium, and a computer program product. Background Art

[0002] When technicians develop a website, they first need to write the source code of the website, then compile the source code of the website to obtain a compilation result, and finally deploy the compilation result on the network for users to access the deployed website.

[0003] In related technologies, technicians usually complete the writing of the website source code in a local development environment, and then submit the written website source code to a website code management platform such as gitlab, so that the website code management platform performs a series of operations such as compiling and deploying the website source code submitted by the technicians.

[0004] However, in the current solution, if it is necessary to deploy some web pages in the website, the entire website needs to be redeployed, which consumes a high time cost and computational cost. Summary of the Invention

[0005] Embodiments of the present application provide a method and device for web page deployment, an electronic device, a computer-readable storage medium, and a computer program product to solve the problem of excessive time cost and computational cost consumed in deploying web pages in related technologies.

[0006] In a first aspect, an embodiment of the present application provides a method for web page deployment, which is applied to a server. The method includes:

[0007] Receiving a web page deployment request sent by a development terminal, where the web page deployment request includes: a target web page compilation result corresponding to a target web page obtained from a website compilation result, and a target website identifier corresponding to the website. The website compilation result is obtained by the development terminal calling a compilation terminal to compile the website, and the target web page is a part of the web pages in the website;

[0008] Determining a deployment terminal corresponding to the website according to the web page deployment request;

[0009] Sending the target web page compilation result and the target website identifier to the deployment terminal, where the deployment terminal is used to deploy the target web page compilation result in a target container corresponding to the target website identifier.

[0010] In an optional implementation manner, the web page deployment request further includes: target authentication information, which is used to authenticate the login account of the development terminal. After receiving the web page deployment request sent by the development terminal, the method further includes:

[0011] Determine the website deployment permission of the logged-in account according to the target authentication information, where the website deployment permission includes the website identifier authorized for the logged-in account to deploy;

[0012] When the website deployment permission includes the target website identifier, determine to execute the step of determining the deployment end corresponding to the website according to the web page deployment request;

[0013] When the website deployment permission does not include the target website identifier, interrupt the deployment process.

[0014] In an alternative embodiment, the determining the website deployment permission of the logged-in account according to the target authentication information includes:

[0015] Determine the logged-in account identifier corresponding to the target authentication information by querying the correspondence between the authentication information and the account identifier;

[0016] Determine the website deployment permission corresponding to the logged-in account by querying the correspondence between the account identifier and the deployment permission.

[0017] In an alternative embodiment, the determining the deployment end corresponding to the website according to the web page deployment request includes:

[0018] Send a website directory query request including the target website identifier to the source code management end, and receive the website directory of the website returned by the source code management end, where the website directory includes the directory structure of all web pages in the website;

[0019] Obtain the compilation result directory of the target web page compilation result, where the compilation result directory includes the directory structure of the target web page in the website;

[0020] When the compilation result directory matches the website directory, determine the deployment end address corresponding to the target website identifier by querying the correspondence between the website identifier and the address;

[0021] When the compilation result directory does not match the website directory, interrupt the deployment process.

[0022] In an alternative embodiment, the web page deployment request further includes: target authentication information, and the method further includes:

[0023] Determine the logged-in account identifier corresponding to the target authentication information by querying the correspondence between the authentication information and the account identifier;

[0024] Send the login account identifier to the deployment end, where the deployment end is used to receive the login account identifier and, after the deployment end completes the deployment of the target web page, send a deployment completion notification to the development terminal, where the deployment completion notification includes at least one of the access address of the target web page and the website deployment version number.

[0025] In a second aspect, an embodiment of the present application provides a website deployment method applied to a development terminal. The method includes:

[0026] In response to a compilation instruction for a website, send a compilation request for the website to a compilation end, where the compilation end is used to receive the compilation request and compile the source code of the website pulled from a source code management end;

[0027] Detect the compilation process of the website by the compilation end, and when it is determined that the compilation end has completed compilation, obtain the website compilation result from the compilation end;

[0028] In response to a deployment instruction for a target web page in the website, determine the target web page compilation result corresponding to the target web page from the website compilation result;

[0029] Generate a web page deployment request according to the target web page compilation result;

[0030] Send the web page deployment request to a server end, where the server end is used to deploy the target web page according to the web page deployment request.

[0031] In an optional implementation manner, the detecting the compilation process of the website by the compilation end and, when it is determined that the compilation end has completed compilation, obtaining the website compilation result from the compilation end includes:

[0032] Send a source code identifier acquisition instruction to the source code management end to obtain the source code identifier of the website, where the source code identifier is used to indicate the source code of the website stored on the source code management end;

[0033] Send a query instruction including the source code identifier to the compilation end, where the compilation end is used to return the compilation status of the website corresponding to the source code identifier, and the source code identifier of the website pulled from the source code management end is stored in the compilation end;

[0034] When the compilation status is completed, determine that the compilation end has completed the compilation of the website.

[0035] In a third aspect, an embodiment of the present application provides a web page deployment device, and the device includes:

[0036] A receiving module, configured to receive a web page deployment request sent by a development terminal, where the web page deployment request includes: a target web page compilation result corresponding to a target web page obtained from a website compilation result, and a target website identifier corresponding to the website, where the website compilation result is obtained by the development terminal calling a compilation end to compile the website, and the target web page is a partial web page in the website;

[0037] A determining module, configured to determine a deployment end corresponding to the website according to the web page deployment request;

[0038] A deployment module, configured to send the target web page compilation result and the target website identifier to the deployment end, and the deployment end is used to deploy the target web page compilation result in a target container corresponding to the target website identifier.

[0039] In an optional implementation manner, the web page deployment request further includes: target authentication information, where the target authentication information is used to authenticate the login account of the development terminal. After receiving the web page deployment request sent by the development terminal, the device further includes:

[0040] An authority module, configured to determine the website deployment authority of the login account according to the target authentication information, where the website deployment authority includes website identifiers authorized for the login account to deploy;

[0041] An authentication module, configured to determine to execute the step of determining the deployment end corresponding to the website according to the web page deployment request when the website deployment authority includes the target website identifier;

[0042] An interruption module, configured to interrupt the deployment process when the website deployment authority does not include the target website identifier.

[0043] In an optional implementation manner, the authority module includes:

[0044] A first query sub-module, configured to determine a login account identifier corresponding to the target authentication information by querying the correspondence between the authentication information and the account identifier;

[0045] A second query sub-module, configured to determine the website deployment authority corresponding to the login account by querying the correspondence between the account identifier and the deployment authority.

[0046] In an optional implementation manner, the determining module includes:

[0047] The first directory sub-module is configured to send a website directory query request including the target website identifier to the source code management end, and receive the website directory of the website returned by the source code management end, where the website directory includes the directory structures of all web pages in the website;

[0048] The second directory sub-module is configured to obtain the compilation result directory of the target web page compilation result, where the compilation result directory includes the directory structure of the target web page in the website;

[0049] The matching sub-module is configured to, when the compilation result directory matches the website directory, determine the deployment end address corresponding to the target website identifier by querying the correspondence between the website identifier and the address;

[0050] The interruption sub-module is configured to interrupt the deployment process when the compilation result directory does not match the website directory.

[0051] In an optional implementation manner, the web page deployment request further includes: target authentication information, and the device further includes:

[0052] The identification module is configured to determine the login account identifier corresponding to the target authentication information by querying the correspondence between the authentication information and the account identifier;

[0053] The identification sending module is configured to send the login account identifier to the deployment end, where the deployment end is used to receive the login account identifier, and after the deployment end completes the deployment of the target web page, send a deployment completion notification to the development terminal, where the deployment completion notification includes at least one of the access address of the target web page and the website deployment version number.

[0054] In a fourth aspect, an embodiment of the present application provides a web page deployment device, and the device includes:

[0055] The compilation module is configured to, in response to a compilation instruction for a website, send a compilation request for the website to the compilation end, where the compilation end is used to receive the compilation request and compile the source code of the website pulled from the source code management end;

[0056] The website compilation result module is configured to detect the compilation process of the website by the compilation end, and obtain the website compilation result from the compilation end when it is determined that the compilation end has completed the compilation;

[0057] The page compilation result module is configured to, in response to a deployment instruction for a target web page in the website, determine the target web page compilation result corresponding to the target web page from the website compilation result;

[0058] A request generation module, configured to generate a web page deployment request according to the compilation result of the target web page;

[0059] A request sending module, configured to send the web page deployment request to a server, and the server is used to deploy the target web page according to the web page deployment request.

[0060] In an optional implementation manner, the website compilation result module includes:

[0061] An identifier acquisition sub-module, configured to send a source code identifier acquisition instruction to the source code management end, and acquire the source code identifier of the website, where the source code identifier is used to indicate the source code of the website stored on the source code management end;

[0062] A source code acquisition sub-module, configured to send a query instruction including the source code identifier to the compilation end, and the compilation end is used to return the compilation status of the website corresponding to the source code identifier, and the source code identifier pulled from the source code management end is stored in the compilation end;

[0063] A compilation completion sub-module, configured to determine that the compilation end has completed the compilation of the website when the compilation status is completed.

[0064] In a fifth aspect, an embodiment of the present application further provides an electronic device, including a memory for storing instructions executable by the processor; wherein, the processor is configured to execute the instructions to implement the vulnerability mining method described above.

[0065] In a sixth aspect, an embodiment of the present application further provides a computer-readable storage medium, when the instructions in the computer-readable storage medium are executed by the processor of the electronic device, enabling the electronic device to execute the vulnerability mining method described above.

[0066] In a seventh aspect, an embodiment of the present application further provides a computer program product, including a computer program, and the computer program implements the vulnerability mining method when executed by the processor.

[0067] In the embodiment of the present application, a web page deployment request sent by a development terminal can be received, and the web page deployment request includes: a compilation result of a target web page corresponding to the target web page in the website, and the target web page is a part of the web pages in the website; determine the deployment end corresponding to the website according to the web page deployment request; deploy the target web page on the deployment end according to the compilation result of the target web page. It enables developers to select the compilation result corresponding to a part of the web pages from the website and send the compilation result of this page to the server, so as to realize the incremental deployment of a part of the web pages in the website without redeploying the entire website, reducing the time cost and resource cost consumed for deploying the web page.

[0068] The above description is only an overview of the technical solution of this application. In order to understand the technical means of this application more clearly, it can be implemented according to the content of the specification. And in order to make the above and other purposes, features and advantages of this application more obvious and understandable, the following specifically illustrates the specific implementation manners of this application. BRIEF DESCRIPTION OF THE DRAWINGS

[0069] By reading the following detailed description of the preferred embodiments, various other advantages and benefits will become clear to those of ordinary skill in the art. The drawings are only for the purpose of illustrating the preferred embodiments and are not considered to be a limitation of this application. Moreover, throughout the drawings, the same reference numerals are used to represent the same components. In the drawings:

[0070] Figure 1 is a flowchart of the steps of a method for deploying a web page on a server provided by an embodiment of this application;

[0071] Figure 2 is a flowchart of the steps of a method for deploying a web page on a development terminal provided by an embodiment of this application;

[0072] Figure 3 is a schematic diagram of a deployment page selection interface provided by an embodiment of this application;

[0073] Figure 4 is a flowchart of the specific interaction steps of a method for deploying a web page provided by an embodiment of this application;

[0074] Figure 5 is a schematic diagram of a development terminal deployment completion interface provided by an embodiment of this application;

[0075] Figure 6 is a structural diagram of a website deployment device on the server side provided by an embodiment of this application;

[0076] Figure 7 is a structural diagram of a website deployment device on the development terminal side provided by an embodiment of this application;

[0077] Figure 8 is a logic block diagram of an electronic device according to an embodiment of this application;

[0078] Figure 9 is a logic block diagram of an electronic device according to another embodiment of this application. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0079] Exemplary embodiments of the present application will be described in more detail below with reference to the accompanying drawings. Although the exemplary embodiments of the present application are shown in the drawings, it should be understood that the present application can be implemented in various forms and should not be limited by the embodiments set forth herein. On the contrary, these embodiments are provided so that the present application can be more thoroughly understood and the scope of the present application can be fully conveyed to those skilled in the art.

[0080] Figure 1 is a flowchart of the steps of a method for deploying a web page on a server provided by an embodiment of the present application. As Figure 1 shown, applied to the server, the method includes:

[0081] Step 101, receiving a web page deployment request sent by a development terminal, where the web page deployment request includes: a target web page compilation result corresponding to a target web page obtained from a website compilation result, and a target website identifier corresponding to the website. The website compilation result is obtained by the development terminal invoking a compilation terminal to compile the website. The target web page is a partial web page of the website.

[0082] A website refers to an application website that runs on a deployment terminal and can be remotely accessed and operated through a network. Common examples include websites based on the html protocol. The development of a website generally includes several stages: writing, compiling, deploying, and maintaining. Among them, in the writing stage, developers complete the writing of the source code of the website; in the compiling stage, the source code of the written website is compiled to obtain a compilation result that can be deployed on the deployment terminal. The compilation result can be a package file in war format or other files that can be deployed on the deployment terminal; in the deployment stage, the compilation result obtained after compiling the website is deployed on the deployment terminal, and the deployment terminal is connected to the Internet for users to access and use the web page through the network; in the maintenance stage, technicians revise the source code of the website and recompile and deploy the revised website.

[0083] In the embodiments of the present application, during the website maintenance stage, technicians can change the source code corresponding to some web pages in the website or add new web page source code to the website to obtain the latest version of the website. And perform a compilation operation on the website to obtain a website compilation result that needs to be deployed on the deployment terminal. Since the old version of the website has been deployed, and the difference between the new version of the website and the old version of the website is only in some web pages, the target web page compilation result can be selected from the website compilation result, and a web page deployment request can be constructed according to the target web page compilation result and sent to the server.

[0084] The server receives a web page deployment request. In the web page deployment request received by the server, it includes the target web page compilation result of the target web page in the website and the target website identifier corresponding to the website. It should be noted that in the target web page compilation result, there may be the directory structures of all web pages in the website, or only the directory structure of the target web page in the website. In the case where the target web page compilation result has the directory structures of all web pages in the website, there is only data in the directory corresponding to the target web page, and the directory corresponding to the non-target web page is empty.

[0085] It should be noted that in the embodiments of the present application, various terminals can be servers or software. When the terminal is a server, it can be implemented as a distributed server cluster composed of multiple servers or as a single server. When the terminal is software, it can be implemented as multiple software or software modules, or as a single software or software module. No specific limitation is made here.

[0086] Step 102: Determine the deployment end corresponding to the website according to the web page deployment request.

[0087] Since developers may develop multiple websites simultaneously, and each website may need to be deployed on different servers, there may be multiple deployment ends for deploying different websites. After the server obtains the web page deployment request, it needs to determine the deployment end to which the target web page compilation result needs to be deployed.

[0088] Specifically, the file name of the target web page compilation result can be obtained. Since the target web page compilation result is obtained by compiling the website, the file names of the target web page compilation results can be the same. The server can determine the deployment end address where the website is deployed by querying the relationship comparison table of the website name and the deployment end address.

[0089] Step 103: Deploy the target web page on the deployment end according to the target web page compilation result.

[0090] After determining the deployment end address, send the target web page compilation result in the web page deployment request to the deployment end address so that the deployment end deploys the target web page.

[0091] Specifically, the compilation result of the target web pages only includes the compilation results of some of the web pages in the website compilation result generated by compiling the website. Although the directory structure of non-target web pages may be included in the compilation result of the target web pages, the data in the directories of non-target web pages is empty. Therefore, the deployment side can directly use the compilation result of the target web pages to overwrite the compilation result generated by the previous version of the website that has been deployed on the deployment side, so as to update the target web pages that have been deployed on the deployment side, achieving the effect of incremental deployment. Among them, incremental deployment means that during the deployment process, only the incremental part of the website, that is, the target web pages, is updated on the deployment side.

[0092] In summary, a website deployment method provided by an embodiment of the present application enables developers to select the corresponding page compilation results of some web pages from the website and send the page compilation results to the server side, so as to achieve incremental deployment of some web pages in the website, without redeploying the entire website, reducing the time cost and resource cost consumed by deploying web pages.

[0093] Figure 2 It is a flowchart of the steps of a web page deployment method for a development terminal provided by an embodiment of the present application. As Figure 2 shown, it is applied to a development terminal, and the method includes:

[0094] Step 201, in response to a compilation instruction for a website, send a compilation request for the website to a compilation side, where the compilation side is used to receive the compilation request and compile the source code of the website pulled from a source code management side.

[0095] The compilation side may refer to a code management platform with continuous integration functions such as GitLab, or may refer to any software or server with the function of compiling the source code of a website.

[0096] Developers open the website to write source code in the software development environment of the command line interface. After writing is completed, they enter a compilation command in the command line interface to start the compilation function installed in the development terminal or the software development environment. Developers can also select a compilation function option in the software development environment of the graphical interface to start the compilation service.

[0097] Since technicians generally open or select the website to be compiled first and then start the compilation service, after the compilation service is started, the website identifier that has been opened in the software development environment when the compilation service is started can be obtained, and this website identifier is the website identifier corresponding to the website that the technician needs to compile. In addition, a website list can also be displayed to the technician after the compilation service is started for the technician to select the website to be compiled, and then the website identifier is determined according to the website selected by the user.

[0098] The compilation service running on the development terminal sends a compilation request containing the website identifier to the compilation terminal to indicate the website that needs to be compiled by the compilation terminal. After receiving the compilation request, the compilation terminal parses the compilation request, obtains the website identifier carried in the compilation request, queries the source code management terminal through the website identifier, obtains the website source code corresponding to the website identifier from the source code management terminal, and performs a compilation operation on the website source code to generate a website compilation result.

[0099] Step 202, detect the compilation process of the website by the compilation terminal, and when it is determined that the compilation by the compilation terminal is completed, obtain the website compilation result from the compilation terminal.

[0100] When developers are developing a software website, they will enter the Software Development Environment (SDE) to perform operations such as writing and managing the website. The software development environment refers to a set of software used to support the engineering development and maintenance of a software website based on computer hardware or an operating system. The software development environment can generally be divided into a command-line interface development environment and a graphical interface development environment. In the command-line interface development environment, users can enter a deployment command on the development terminal to start the web page deployment function; in the graphical interface development environment, users can start the web page deployment function by clicking the deployment plugin in the operation interface. The terminal can refer to the computer hardware running the software development environment or the software development environment itself.

[0101] After developers complete writing the website source code in the software development environment or update the source code in the website, they can first perform a compilation operation on the website to generate a compilation result.

[0102] Specifically, the software development environment can be used to perform a compilation operation on the website, or a compilation terminal with source code management functions such as GitLab can be used to complete the compilation operation on the website. This application does not make specific limitations.

[0103] When using the compilation terminal to perform a compilation operation on the website, in order to enable the development terminal to obtain the website compilation result in a timely manner and avoid users waiting for a long time, it is also necessary to monitor the compilation process of the website by the compilation terminal and obtain the website compilation result from the compilation terminal in a timely manner after determining that the compilation is completed.

[0104] Step 203, in response to a deployment instruction for a target web page in the website, determine the target web page compilation result corresponding to the target web page from the website compilation result.

[0105] Developers can start the deployment process of the website on the development terminal by entering a start command or clicking a relevant start button.

[0106] In one embodiment, a developer can start the deployment service of a website after entering the website. That is to say, when the deployment service of the website is started, the website has been opened in the software development environment. At this time, the website deployment function will default to perform a deployment operation on the website that the developer has already opened. For example, the developer opens the website to write source code in the software development environment of the command-line interface. After writing is completed, the developer enters a compilation command in the command-line interface to complete the compilation operation of the current website. Then, the developer enters a deployment command in the command-line interface to start the deployment function and perform a deployment operation on the opened website.

[0107] In another embodiment, a developer can start the deployment service in the software development environment of the graphical interface. After the deployment function is started, the website submission records are queried in the software development environment, and each website is displayed in turn according to the submission order of the websites. The user selects the website to be deployed.

[0108] Refer to Figure 3 , which shows a schematic diagram of a deployment page selection interface provided by an embodiment of the present application. As Figure 3 shown, the deployment page selection interface is displayed on the development terminal for technicians to select the page to be deployed. The deployment page selection interface may include login information 1, welcome message 2, selection prompt 3, selection cursor 4, page list 5, and usage method prompt 6.

[0109] After the deployment service determines the website to be deployed, it obtains the website compilation result corresponding to the website, analyzes the directory structure in the website compilation result, determines the directory names of the page compilation results of each web page in the website compilation result, and displays these directory names to the user for the user to select the target web page to be deployed. After the deployment service determines the website to be deployed, it can also directly query the directory names of each web page corresponding to the website in the software development environment and display these directory names to the user for the user to select the target web page to be deployed.

[0110] After the deployment service determines the target web page, it deletes the compilation results corresponding to the non-target web pages in the website compilation result to obtain the target web page compilation result. Among them, the deletion operation can be for the directories and the data under the directories corresponding to the non-target web pages in the target compilation result, or only for the data under the directories while retaining the directories.

[0111] Step 204, generate a web page deployment request according to the target web page compilation result.

[0112] After the deployment service running on the development terminal determines the compilation result of the target web page, a web page deployment request also needs to be generated. The web page deployment request is used to notify the server to deploy the target web page on the deployment side. The web page deployment request includes at least the compilation result of the target web page or the acquisition address of the compilation result of the target web page. In addition, the web page deployment request can also include other information to meet other functional requirements. For example, the web page deployment request can also include the development terminal identifier, the hash value of the compilation result of the target web page, etc., so that the server can verify the identity of the development terminal according to the development terminal identifier and verify the file integrity of the received compilation result of the target web page according to the hash value of the compilation result of the target web page.

[0113] Step 205, send the web page deployment request to the server, and the server is used to deploy the target web page according to the web page deployment request.

[0114] The web page deployment request needs to include the compilation result of the target web page. In one implementation, the development terminal can directly integrate the compilation result of the target web page into the web page deployment request and send it to the server. In another implementation, the development terminal can first store the compilation result of the target web page on the local memory or other memories in the network, and integrate the storage address of the compilation result of the target web page into the web page deployment request, so that the server can obtain the corresponding compilation result of the target web page according to the storage address in the web page deployment request after receiving the web page deployment request.

[0115] In summary, this is a website deployment method provided by an embodiment of the present application. The present application enables developers to select the compilation results corresponding to some web pages from the website and send the compilation results of these pages to the server to achieve incremental deployment of some web pages in the website without redeploying the entire website, reducing the time cost and resource cost consumed by deploying web pages.

[0116] Figure 4 This is a specific interaction step flowchart of a web page deployment method provided by an embodiment of the present application. As Figure 4 shown, the method includes:

[0117] Step 301, in response to a compilation instruction for a website, send a compilation request for the website to the compilation side. The compilation side is used to receive the compilation request and compile the source code of the website pulled from the source code management side.

[0118] This step can refer to the above step 201, and the embodiments of the present application will not repeat it here.

[0119] Step 302, detect the compilation process of the website by the compilation side, and when it is determined that the compilation side has completed the compilation, obtain the website compilation result from the compilation side.

[0120] This step can refer to step 202 above, which will not be elaborated in this embodiment of the present application.

[0121] Optionally, step 302 may further include:

[0122] Sub-step 3021: Send a source code identifier acquisition instruction to the source code management end to obtain the source code identifier of the website, where the source code identifier is used to indicate the source code of the website stored on the source code management end.

[0123] The source code management end is a hosting platform for the source code of a software development website. Through the source code management end, multiple developers can develop a software development website simultaneously. Technicians write and edit the source code on the local development terminal and submit it to the source code management end to achieve the addition and revision of the source code of the software development website. To facilitate the management of different versions of the source code, for each different version of the source code of a software development website, the source code management end will generate a corresponding source code identifier. Through the source code identifier, different versions of the source code of different software development websites can be located in the source code management end.

[0124] The development terminal can send a source code identifier acquisition instruction to the source code management end to obtain the source code identifier of the latest version of the website. The source code identifier acquisition instruction may include the website identifier and the development terminal address, so that the source code management end can query the corresponding source code identifier according to the website identifier and return the queried source code identifier according to the development terminal address.

[0125] Sub-step 3022: Send a query instruction containing the source code identifier to the compilation end, where the compilation end is used to return the compilation status of the website corresponding to the source code identifier, and the compilation end stores the source code identifier of the website pulled from the source code management end.

[0126] When the compilation end pulls the latest version of the source code corresponding to the website from the source code management end, it can pull the corresponding source code identifier at the same time.

[0127] The development terminal can send a query instruction containing the source code identifier to the compilation end. After receiving the query instruction, the compilation end parses the source code identifier therein and queries the compilation status of the source code corresponding to the source code identifier in the compilation process, and returns the queried compilation status to the development terminal. The status at least includes the completed status and the uncompleted status.

[0128] Sub-step 3023: When the compilation status is completed, determine that the compilation end has completed the compilation of the website.

[0129] If the development terminal receives information indicating that the compilation status of the website source code is the completion status from the compilation terminal, it can pull the website compilation result from the compilation terminal. Of course, the process for the development terminal to obtain the website compilation result can also be: after the compilation terminal completes the compilation of the website and generates the website compilation result, it can directly send the website compilation result to the development terminal.

[0130] Step 303: Receive a web page deployment request sent by the development terminal. The web page deployment request includes: the target web page compilation result corresponding to the target web page obtained from the website compilation result, and the target website identifier corresponding to the website. The website compilation result is obtained by the development terminal invoking the compilation terminal to compile the website, and the target web page is a part of the web pages in the website.

[0131] Step 304: Determine the website deployment permission of the logged-in account according to the target authentication information. The website deployment permission includes the website identifier authorized for the logged-in account to deploy.

[0132] After the website is deployed, it is generally directly launched and can be accessed through the network. Therefore, the website deployment operation is a very critical step. Incorrectly deploying the website belongs to a major development accident. Therefore, after the server receives the web page deployment request sent by the development terminal, it needs to authenticate the development terminal that sends the web page deployment request to determine whether the development terminal has the permission to deploy the web page, so as to reduce the potential risk of development accidents.

[0133] It should be noted that the user information involved in this disclosure (including but not limited to user device information, user personal information, etc.) is all information authorized by the user or fully authorized by all parties.

[0134] Optionally, step 304 may include:

[0135] Sub-step 3041: Determine the logged-in account identifier corresponding to the target authentication information by querying the correspondence between the authentication information and the account identifier.

[0136] After the technician enters the login information on the development terminal to log in to the software development environment, the login server obtains the user-entered login information and verifies the user's identity. After the identity verification is passed, it sends the authentication information corresponding to the logged-in user to the server. The login server is used to manage the login information of each user and verify the user's login request.

[0137] Specifically, the login server can perform matching verification on the account and password entered by the user. When it is confirmed that the password and account entered by the user match, a JWT (JSON Web Token) authentication string is generated for the logged-in user as the authentication information of the logged-in user and sent to the development terminal. And the corresponding relationship between the logged-in account identifier and the JWT authentication string generated for the logged-in user is locally stored on the login server. Among them, JWT is a lightweight authentication specification, which is essentially a token and a compact URL-safe method that can be used for authentication between both parties in network communication.

[0138] The deployment request received by the server can include the target authentication information corresponding to the logged-in user who sent the deployment request. After receiving the deployment request, the server parses the deployment request to obtain the target authentication information therein, and sends the target authentication information to the login server, so that the login server can verify according to the target authentication information. After the login server passes the verification, according to the corresponding relationship between the authentication information and the account identifier, it determines the logged-in account identifier corresponding to the target authentication information and returns the logged-in account identifier to the server. If the login server fails to verify the target authentication information, it returns an indication information that the target authentication information verification fails to the server.

[0139] Sub-step 3042, by querying the corresponding relationship between the account identifier and the deployment permission, determine the website deployment permission corresponding to the logged-in account.

[0140] In the server, the corresponding relationship between the account identifier and the deployment permission is also stored, and the corresponding relationship between the account identifier and the deployment permission is used to indicate the websites that the user can legally deploy.

[0141] After the server obtains the logged-in account identifier corresponding to the target authentication information, it queries the corresponding relationship between the account identifier and the deployment permission to determine the website deployment permission corresponding to the logged-in user. The website deployment permission indicates the website identifier that the logged-in user has the right to deploy.

[0142] Step 305, in the case that the website deployment permission includes the target website identifier, determine to execute the step of determining the deployment end corresponding to the website according to the web deployment request.

[0143] After the server determines the website deployment permission corresponding to the logged-in user who sent the deployment request, it is necessary to compare the website identifier in the website deployment permission with the target website identifier to determine whether the website identifier in the website deployment permission contains the target website identifier. If the website identifier in the website deployment permission contains the target website identifier, it means that the logged-in user who sent the deployment request has the right to deploy the website corresponding to the target web page compilation result in the deployment request. At this time, the deployment operation for the target web page can continue. If the website identifier in the website deployment permission does not contain the target website identifier, it means that the logged-in user who sent the deployment request does not have the right to deploy the website corresponding to the target web page compilation result in the deployment request. At this time, the deployment process can be interrupted.

[0144] Step 306, in the case where the website deployment permission does not include the target website identifier, interrupt the deployment process.

[0145] Step 307, determine the deployment end corresponding to the website according to the web page deployment request.

[0146] In addition to the method described in step 102 above, the method in the following sub-steps 3071 to 3073 can also be used to determine the deployment end corresponding to the website.

[0147] Optionally, step 307 may further include:

[0148] Sub-step 3071, send a website directory query request containing the target website identifier to the source code management end, and receive the website directory of the website returned by the source code management end. The website directory includes the directory structure of all web pages in the website.

[0149] Considering the importance of the deployment operation, in order to further improve the deployment security, the verification operation can also be performed on the target web page compilation result in the deployment request to determine whether the target web page compilation result matches the corresponding website.

[0150] Specifically, the target website identifier corresponding to the website may be included in the web page deployment request to indicate the website to be deployed. After receiving the web page deployment request, the server parses the web page deployment request and obtains the target website identifier.

[0151] Since the complete source code of the website is stored in the source code management end, the server can send a directory query instruction containing the target website identifier to the source code management end to obtain the website directory structure corresponding to the target website identifier returned by the source code management end.

[0152] Sub-step 3072, obtain the compilation result directory of the target web page compilation result. The compilation result directory includes the directory structure of the target web page in the website.

[0153] Sub-step 3073: When the compilation result directory matches the website directory, determine the deployment end address corresponding to the target website identifier by querying the correspondence between the website identifier and the address.

[0154] Since the target web page compilation result in the web page deployment request is generated by compiling the website, the complete or partial directory structure of the website is retained in the target web page compilation result.

[0155] For example, if the target web page compilation result is obtained by deleting all data in the website that does not correspond to the target web page, the complete directory structure in the website is retained in the target web page compilation result. If the target web page compilation result is obtained by deleting all data and folders in the website that do not correspond to the target web page, the directory structure of the target web page in the website is retained in the target web page compilation result.

[0156] The compilation result directory of the target web page compilation result should be able to match the website directory of the website, that is, the website directory should contain the compilation result directory.

[0157] Therefore, the server can compare the compilation result directory with the website directory. If the website directory contains the compilation result directory, that is, part or all of the directory structure in the website directory is the same as the entire directory structure of the compilation result directory, it means that the two match, otherwise it means that the two do not match.

[0158] When the compilation result directory matches the website directory, it means that the target web page compilation result matches the website in terms of data structure, and it can be determined that the target web page compilation result is indeed obtained by compiling the website and can be deployed on the deployment end corresponding to the website. At this time, the server can continue to execute the deployment process and determine the deployment end address corresponding to the target website identifier by querying the correspondence between the website identifier and the address stored locally or remotely.

[0159] Sub-step 3074: When the compilation result directory does not match the website directory, interrupt the deployment process.

[0160] Step 308: Send the target web page compilation result and the target website identifier to the deployment end, and the deployment end is used to deploy the target web page compilation result in the target container corresponding to the target website identifier.

[0161] After determining the deployment end address, send the target web page compilation result in the web page deployment request to the deployment end address so that the deployment end deploys the target web page.

[0162] Specifically, the compilation result of the target web pages only includes the compilation results of some web pages in the website compilation results generated by the website compilation. Although the compilation result of the target web pages may include the directory structure of non-target web pages, the data in the directories of non-target web pages is empty. Therefore, the deployment side can directly use the compilation result of the target web pages to overwrite the compilation result generated by the previous version of the website that has been deployed on the deployment side, thereby updating the target web pages that have been deployed on the deployment side and achieving the effect of incremental deployment. Among them, incremental deployment means that during the deployment process, only the incremental part of the website, that is, the target web pages, is updated on the deployment side.

[0163] Furthermore, in the embodiments of the present application, the website can be deployed in a Docker container on the deployment side. Docker can run web proxy services such as nginx, and the web proxy service can provide a deployment environment for the website.

[0164] After determining the address of the deployment side, the server sends the target website identifier to the deployment side through the network, so that the deployment side can query the corresponding relationship between the website identifier and the container according to the target website identifier and determine the target container in which the target website identifier is deployed.

[0165] In one implementation manner, after the server determines the target container corresponding to the target website identifier, it sends a container deployment request containing the compilation result of the target web pages to the web proxy service running on the target container through the network, so as to deploy the target web pages on the deployment side.

[0166] In another implementation manner, the server can store the compilation result of the target web pages in a network storage device. The server only sends a container deployment request containing the storage address of the compilation result of the target web pages in the network storage device to the web proxy service running on the target container. After receiving the container deployment request, the web proxy service obtains the compilation result of the target web pages from the network storage device through this storage address and performs the deployment, and stores this storage address and the deployment record locally. In this way, after the target container experiences power failure, restart, etc., it can re-obtain the compilation result of the target web pages from the network storage device according to this storage address and re-perform the deployment when it resumes operation.

[0167] A rendering service also runs in the target container. After receiving the compilation result of the target web pages, the target container deploys the target web pages in the target container, renders the target web pages, and at the same time clears the original data in the cache and stores the rendering result in the cache. Since the target web pages are the recently deployed pages, they may belong to the latest active pages or promotional pages and other pages with strong timeliness. Generally speaking, the access volume of such pages is relatively high. Therefore, rendering the target web pages and storing them in the relatively fast cache can improve the access speed of users to the target web pages and enhance the user experience.

[0168] Step 309: Send the login account identifier to the deployment end. The deployment end is used to receive the login account identifier and, after completing the deployment of the target web page, send a deployment completion notification to the development terminal. The deployment completion notification includes at least one of the access address of the target web page and the website deployment version number.

[0169] After the server determines the address of the deployment end, it can also send the login account identifier to the deployment end. The deployment end receives and stores the login account identifier. After completing the deployment of the target web page, according to the login account identifier, it sends the deployment completion result to the logged-in user. The deployment completion result may include the access address of the target web page on the network after deployment and the latest deployment version number of the website.

[0170] Refer to Figure 5 , which shows a schematic diagram of the deployment completion interface provided by an embodiment of the present application. As Figure 5 shown, after the deployment of the target web page is completed, the development terminal displays the deployment completion interface, which may include login information 1, welcome message 2, name of the deployed target web page 7, deployment status 8, access address of the target web page 9, deployment version number 10, and deployment end prompt message 11.

[0171] In summary, the present application provides a website deployment method. The present application enables developers to select the page compilation results corresponding to some web pages from the website and, by sending the page compilation results to the server, realize the incremental deployment of some web pages in the website without redeploying the entire website, reducing the time cost and resource cost consumed by deploying web pages.

[0172] Corresponding to the method provided by the website deployment method embodiment of the present invention described above, refer to Figure 6 , the present invention also provides an embodiment of a web page deployment device on the server side. In this embodiment, the device may include:

[0173] A receiving module 401, configured to receive a web page deployment request sent by a development terminal. The web page deployment request includes: the target web page compilation result corresponding to the target web page obtained from the website compilation result, and the target website identifier corresponding to the website. The website compilation result is obtained by the development terminal calling a compilation end to compile the website, and the target web page is a part of the web pages in the website;

[0174] A determination module 402, configured to determine the deployment end corresponding to the website according to the web page deployment request;

[0175] The deployment module 403 is configured to send the target web page compilation result and the target website identifier to the deployment end, and the deployment end is used to deploy the target web page compilation result in the target container corresponding to the target website identifier.

[0176] In an alternative embodiment, the web page deployment request further includes: target authentication information, which is used to authenticate the login account of the development terminal. After receiving the web page deployment request sent by the development terminal, the device further includes:

[0177] A permission module, configured to determine the website deployment permission of the login account according to the target authentication information, and the website deployment permission includes the website identifier authorized for the login account to deploy;

[0178] An authentication module, configured to determine to execute the step of determining the deployment end corresponding to the website according to the web page deployment request when the website deployment permission includes the target website identifier;

[0179] An interruption module, configured to interrupt the deployment process when the website deployment permission does not include the target website identifier.

[0180] In an alternative embodiment, the permission module includes:

[0181] A first query sub-module, configured to determine the login account identifier corresponding to the target authentication information by querying the correspondence between the authentication information and the account identifier;

[0182] A second query sub-module, configured to determine the website deployment permission corresponding to the login account by querying the correspondence between the account identifier and the deployment permission.

[0183] In an alternative embodiment, the determination module includes:

[0184] A first directory sub-module, configured to send a website directory query request including the target website identifier to the source code management end and receive the website directory of the website returned by the source code management end, where the website directory includes the directory structure of all web pages in the website;

[0185] A second directory sub-module, configured to obtain the compilation result directory of the target web page compilation result, where the compilation result directory includes the directory structure of the target web page in the website;

[0186] A matching sub-module, configured to determine the deployment end address corresponding to the target website identifier by querying the correspondence between the website identifier and the address when the compilation result directory matches the website directory.

[0187] An interruption sub-module, configured to interrupt the deployment process when the compiled result directory does not match the website directory.

[0188] In an alternative implementation, the web page deployment request further includes: target authentication information, and the device further includes:

[0189] An identification module, configured to determine the login account identification corresponding to the target authentication information by querying the correspondence between the authentication information and the account identification;

[0190] An identification sending module, configured to send the login account identification to the deployment end, where the deployment end is used to receive the login account identification and, after the deployment end completes the deployment of the target web page, send a deployment completion notification to the development terminal, and the deployment completion notification includes at least one of the access address of the target web page and the website deployment version number.

[0191] In summary, a web page deployment device provided by an embodiment of the present application can receive a web page deployment request sent by a development terminal. The web page deployment request includes: the target web page compilation result corresponding to the target web page in the website, and the target web page is a part of the web pages in the website. Determine the corresponding deployment end of the website according to the web page deployment request. Deploy the target web page on the deployment end according to the target web page compilation result. This enables developers to select the page compilation results corresponding to some web pages from the website and, by sending the page compilation results to the server, achieve incremental deployment of some web pages in the website without redeploying the entire website, reducing the time cost and resource cost consumed for deploying web pages.

[0192] Corresponding to the method provided by the embodiment of the website deployment method of the present invention described above, see Figure 7 , the present invention further provides an embodiment of a web page deployment device on the development terminal side. In this embodiment, the device may include:

[0193] A compilation module 501, configured to, in response to a compilation instruction for a website, send a compilation request for the website to a compilation end, where the compilation end is used to receive the compilation request and compile the source code of the website pulled from a source code management end;

[0194] A website compilation result module 502, configured to detect the compilation process of the website by the compilation end and, when it is determined that the compilation end has completed compilation, obtain the website compilation result from the compilation end;

[0195] A page compilation result module 503, configured to, in response to a deployment instruction for a target web page in the website, determine the target web page compilation result corresponding to the target web page from the website compilation result;

[0196] A request generation module 504, configured to generate a web page deployment request according to the target web page compilation result;

[0197] A request sending module 505, configured to send the web page deployment request to a server, where the server is used to deploy the target web page according to the web page deployment request.

[0198] In an alternative embodiment, the website compilation result module includes:

[0199] An identifier acquisition sub-module, configured to send a source code identifier acquisition instruction to the source code management end, and acquire the source code identifier of the website, where the source code identifier is used to indicate the source code of the website stored on the source code management end;

[0200] A source code acquisition sub-module, configured to send a query instruction including the source code identifier to the compilation end, where the compilation end is used to return the compilation status of the website corresponding to the source code identifier, and the source code identifier pulled from the source code management end is stored in the compilation end;

[0201] A compilation completion sub-module, configured to determine that the compilation end has completed the compilation of the website when the compilation status is completed.

[0202] In summary, a web page deployment device provided by an embodiment of the present application can receive a web page deployment request sent by a development terminal. The web page deployment request includes: a target web page compilation result corresponding to a target web page in a website, and the target web page is a partial web page in the website. Determine the deployment end corresponding to the website according to the web page deployment request. Deploy the target web page on the deployment end according to the target web page compilation result. Enabling developers to select the page compilation results corresponding to partial web pages from the website and send the page compilation results to the server to achieve incremental deployment of partial web pages in the website without redeploying the entire website, reducing the time cost and resource cost consumed for deploying web pages.

[0203] Figure 8 It is a block diagram of an electronic device 600 shown according to an exemplary embodiment. For example, the electronic device 600 may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, a fitness device, a personal digital assistant, etc.

[0204] Refer to Figure 8 , the electronic device 600 may include one or more of the following components: a processing component 602, a memory 604, a power component 606, a multimedia component 608, an audio component 610, an input / output (I / O) interface 612, a sensor component 614, and a communication component 616.

[0205] The processing component 602 generally controls the overall operation of the electronic device 600, such as operations associated with display, telephone calls, data communication, camera operations, and recording operations. The processing component 602 may include one or more processors 620 to execute instructions to complete all or part of the steps of the above - mentioned methods. In addition, the processing component 602 may include one or more modules to facilitate the interaction between the processing component 602 and other components. For example, the processing component 602 may include a multimedia module to facilitate the interaction between the multimedia component 608 and the processing component 602.

[0206] The memory 604 is used to store various types of data to support the operation of the electronic device 600. Examples of such data include instructions for any application or method operating on the electronic device 600, contact data, phone book data, messages, pictures, videos, etc. The memory 604 can be implemented by any type of volatile or non - volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read - only memory (EEPROM), erasable programmable read - only memory (EPROM), programmable read - only memory (PROM), read - only memory (ROM), magnetic memory, flash memory, a magnetic disk, or an optical disk.

[0207] The power component 606 provides power to various components of the electronic device 600. The power component 606 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for the electronic device 600.

[0208] The multimedia component 608 includes a screen that provides an output interface between the electronic device 600 and the user.

[0209] In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen can be implemented as a touch screen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touches, swipes, and gestures on the touch panel. The touch sensors can sense not only the boundaries of the touch or swipe actions but also detect the duration and pressure associated with the touch or swipe operations.

[0210] In some embodiments, the multimedia component 608 includes a front - facing camera and / or a rear - facing camera. When the electronic device 600 is in an operation mode, such as a shooting mode or a video mode, the front - facing camera and / or the rear - facing camera can receive external multimedia data. Each front - facing camera and rear - facing camera can be a fixed optical lens system or have focal length and optical zoom capabilities.

[0211] The audio component 610 is used to output and / or input audio signals. For example, the audio component 610 includes a microphone (MIC). When the electronic device 600 is in an operating mode, such as a call mode, a recording mode, and a voice recognition mode, the microphone is used to receive external audio signals. The received audio signals can be further stored in the memory 604 or sent via the communication component 616. In some embodiments, the audio component 610 further includes a speaker for outputting audio signals.

[0212] The I / O interface 612 provides an interface between the processing component 602 and a peripheral interface module, and the peripheral interface module can be a keyboard, a click wheel, buttons, etc. These buttons can include but are not limited to: a home button, a volume button, a power-on button, and a lock button.

[0213] The sensor component 614 includes one or more sensors for providing status assessments of various aspects of the electronic device 600. For example, the sensor component 614 can detect the on / off state of the electronic device 600, the relative positioning of components, such as the display and keypad of the electronic device 600. The sensor component 614 can also detect a change in the position of the electronic device 600 or a component of the electronic device 600, the presence or absence of user contact with the electronic device 600, the orientation or acceleration / deceleration of the electronic device 600, and the temperature change of the electronic device 600. The sensor component 614 can include a proximity sensor configured to detect the presence of nearby objects without any physical contact. The sensor component 614 can also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor component 614 can further include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.

[0214] The communication component 616 is used to facilitate communication between the electronic device 600 and other devices in a wired or wireless manner. The electronic device 600 can access a wireless network based on communication standards, such as WiFi, a carrier network (such as 2G, 3G, 4G, or 5G), or a combination thereof. In an exemplary embodiment, the communication component 616 receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 616 further includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology, and other technologies.

[0215] In an exemplary embodiment, the electronic device 600 may be implemented by one or more application specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components, and is used to implement a web page deployment method provided in an embodiment of the present application.

[0216] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is further provided, such as a memory 604 including instructions. The above instructions can be executed by a processor 620 of the electronic device 600 to complete the above method. For example, the non-transitory storage medium may be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, and an optical data storage device, etc.

[0217] Figure 9 FIG. is a block diagram of an electronic device 700 shown according to an exemplary embodiment. For example, the electronic device 700 may be provided as a server. Referring to Figure 9 , the electronic device 700 includes a processing component 722, which further includes one or more processors, and memory resources represented by a memory 732 for storing instructions executable by the processing component 722, such as application programs. The application programs stored in the memory 732 may include one or more modules each corresponding to a set of instructions. In addition, the processing component 722 is configured to execute instructions to perform a web page deployment method provided in an embodiment of the present application.

[0218] The electronic device 700 may further include a power supply component 726 configured to perform power management of the electronic device 700, a wired or wireless network interface 750 configured to connect the electronic device 700 to a network, and an input / output (I / O) interface 758. The electronic device 700 may operate based on an operating system stored in the memory 732, such as Windows ServerTM, Mac OS XTM, UnixTM, LinuxTM, FreeBSD TM or the like.

[0219] An embodiment of the present application further provides a computer program product, including a computer program, where the computer program implements the web page deployment method when executed by a processor.

[0220] Other embodiments of the present application will be readily apparent to those skilled in the art upon consideration of the specification and practice of the application disclosed herein. The present application is intended to cover any variations, uses, or adaptations of the present application, which follow the general principles of the present application and include known common knowledge or conventional technical means in the technical field not disclosed in the present disclosure. The specification and examples are only illustrative, and the true scope and spirit of the present application are pointed out by the following claims.

[0221] It should be understood that the present application is not limited to the exact structures described above and shown in the drawings, and various modifications and changes can be made without departing from its scope. The scope of the present application is only limited by the appended claims.

Claims

1. A web page deployment method, applied to a server side, characterized in that, the method includes: Receiving a web page deployment request sent by a development terminal, where the web page deployment request includes: a target web page compilation result corresponding to a target web page obtained from a website compilation result, and a target website identifier corresponding to the website, and the website compilation result is obtained by the development terminal calling a compilation end to compile a website, and the target web page is a part of the web pages in the website; the target web page compilation result only includes the compilation results of some web pages in the website compilation result generated by compiling the website; Determining a deployment end corresponding to the website according to the web page deployment request; Sending the target web page compilation result and the target website identifier to the deployment end, and the deployment end is used to deploy the target web page compilation result in a target container corresponding to the target website identifier.

2. The method according to claim 1, characterized in that, the web page deployment request further includes: target authentication information, and the target authentication information is used to authenticate the login account of the development terminal. After receiving the web page deployment request sent by the development terminal, the method further includes: Determining the website deployment permission of the login account according to the target authentication information, and the website deployment permission includes the website identifiers authorized for the login account to deploy; When the website deployment permission includes the target website identifier, determining to execute the step of determining the deployment end corresponding to the website according to the web page deployment request; When the website deployment permission does not include the target website identifier, interrupting the deployment process.

3. The method according to claim 2, characterized in that, the determining the website deployment permission of the login account according to the target authentication information includes: Determining a login account identifier corresponding to the target authentication information by querying the corresponding relationship between the authentication information and the account identifier; Determining the website deployment permission corresponding to the login account by querying the corresponding relationship between the account identifier and the deployment permission.

4. The method according to claim 1, characterized in that, the determining the deployment end corresponding to the website according to the web page deployment request includes: Sending a website directory query request including the target website identifier to a source code management end, and receiving the website directory of the website returned by the source code management end, where the website directory includes the directory structures of all web pages in the website; Obtaining a compilation result directory of the target web page compilation result, where the compilation result directory includes the directory structure of the target web page in the website; When the compilation result directory matches the website directory, determining a deployment end address corresponding to the target website identifier by querying the corresponding relationship between the website identifier and the address; When the compilation result directory does not match the website directory, interrupting the deployment process.

5. The method according to claim 1, characterized in that, the web page deployment request further includes: target authentication information, and the method further includes: Determining a login account identifier corresponding to the target authentication information by querying the corresponding relationship between the authentication information and the account identifier; Send the login account identifier to the deployment end, which is configured to receive the login account identifier and, after the deployment end completes the deployment of the target web page, send a deployment completion notice to the development terminal, where the deployment completion notice includes at least one of the access address of the target web page and the website deployment version number.

6. A web page deployment method, applied to a development terminal, characterized in that the method includes: In response to a compilation instruction for a website, send a compilation request for the website to a compilation end, where the compilation end is configured to receive the compilation request and compile the source code of the website pulled from a source code management end; Detect the compilation process of the website by the compilation end, and when it is determined that the compilation end has completed compilation, obtain a website compilation result from the compilation end; In response to a deployment instruction for a target web page in the website, determine a target web page compilation result corresponding to the target web page from the website compilation result; the target web page is a part of the website; the target web page compilation result only includes the compilation results of some web pages in the website compilation result generated by compiling the website; Generate a web page deployment request according to the target web page compilation result; Send the web page deployment request to a server end, where the server end is configured to deploy the target web page according to the web page deployment request.

7. The method according to claim 6, characterized in that the step of detecting the compilation process of the website by the compilation end and, when it is determined that the compilation end has completed compilation, obtaining the website compilation result from the compilation end includes: Send a source code identifier acquisition instruction to the source code management end to obtain a source code identifier of the website, where the source code identifier is used to indicate the source code of the website stored on the source code management end; Send a query instruction including the source code identifier to the compilation end, where the compilation end is configured to return the compilation status of the website corresponding to the source code identifier, and the source code identifier of the website pulled from the source code management end is stored in the compilation end; When the compilation status is completed, determine that the compilation end has completed the compilation of the website.

8. A web page deployment device, characterized in that the device includes: A receiving module, configured to receive a web page deployment request sent by a development terminal, where the web page deployment request includes: a target web page compilation result corresponding to a target web page obtained from a website compilation result, and a target website identifier corresponding to the website, where the website compilation result is obtained by the development terminal invoking a compilation end to compile a website, and the target web page is a part of the website; the target web page compilation result only includes the compilation results of some web pages in the website compilation result generated by compiling the website; A determination module, configured to determine a deployment end corresponding to the website according to the web page deployment request; A deployment module, configured to send the target web page compilation result and the target website identifier to the deployment end, where the deployment end is configured to deploy the target web page compilation result in a target container corresponding to the target website identifier.

9. The device according to claim 8, wherein, the web page deployment request further includes: target authentication information, the target authentication information is used to authenticate the login account of the development terminal, and after receiving the web page deployment request sent by the development terminal, the device further includes: a permission module, configured to determine the website deployment permission of the login account according to the target authentication information, and the website deployment permission includes the website identifier authorized for the login account to deploy; an authentication module, configured to determine to execute the step of determining the deployment end corresponding to the website according to the web page deployment request when the website deployment permission includes the target website identifier; an interruption module, configured to interrupt the deployment process when the website deployment permission does not include the target website identifier.

10. The device according to claim 9, wherein, the permission module includes: a first query sub-module, configured to determine the login account identifier corresponding to the target authentication information by querying the correspondence between the authentication information and the account identifier; a second query sub-module, configured to determine the website deployment permission corresponding to the login account by querying the correspondence between the account identifier and the deployment permission.

11. The device according to claim 8, wherein, the determination module includes: a first directory sub-module, configured to send a website directory query request including the target website identifier to the source code management end, and receive the website directory of the website returned by the source code management end, and the website directory includes the directory structure of all web pages in the website; a second directory sub-module, configured to obtain the compilation result directory of the target web page compilation result, and the compilation result directory includes the directory structure of the target web page in the website; a matching sub-module, configured to determine the deployment end address corresponding to the target website identifier by querying the correspondence between the website identifier and the address when the compilation result directory matches the website directory; an interruption sub-module, configured to interrupt the deployment process when the compilation result directory does not match the website directory.

12. The device according to claim 8, wherein, the web page deployment request further includes: target authentication information, and the device further includes: an identification module, configured to determine the login account identifier corresponding to the target authentication information by querying the correspondence between the authentication information and the account identifier; an identification sending module, configured to send the login account identifier to the deployment end, and the deployment end is used to receive the login account identifier, and after the deployment end completes the deployment of the target web page, send a deployment completion notification to the development terminal, and the deployment completion notification includes at least one of the access address of the target web page and the website deployment version number.

13. A web page deployment device, wherein, the device includes: A compilation module, configured to send a compilation request for the website to a compilation terminal in response to a compilation instruction for the website, where the compilation terminal is used to receive the compilation request and compile the source code of the website pulled from a source code management terminal; A website compilation result module, configured to detect the compilation process of the website by the compilation terminal, and obtain a website compilation result from the compilation terminal when it is determined that the compilation terminal has completed compilation; A page compilation result module, configured to determine a target page compilation result corresponding to the target page in response to a deployment instruction for the target page in the website; the target page is a part of the pages in the website; the target page compilation result only includes the compilation results of some of the pages generated by compiling the website; A request generation module, configured to generate a web page deployment request according to the target page compilation result; A request sending module, configured to send the web page deployment request to a server, where the server is used to deploy the target page according to the web page deployment request.

14. The apparatus according to claim 13, wherein, the website compilation result module includes: An identifier acquisition sub-module, configured to send a source code identifier acquisition instruction to the source code management terminal to acquire the source code identifier of the website, where the source code identifier is used to indicate the source code of the website stored on the source code management terminal; A source code acquisition sub-module, configured to send a query instruction including the source code identifier to the compilation terminal, where the compilation terminal is used to return the compilation status of the website corresponding to the source code identifier, and the compilation terminal stores the source code identifier of the website pulled from the source code management terminal; A compilation completion sub-module, configured to determine that the compilation terminal has completed the compilation of the website when the compilation status is completed.

15. An electronic device, wherein, it includes: a processor; a memory for storing executable instructions of the processor; wherein, the processor is configured to execute the instructions to implement the method according to any one of claims 1 to 7.

16. A computer-readable storage medium, wherein, when the instructions in the computer-readable storage medium are executed by a processor of an electronic device, the electronic device is enabled to execute the method according to any one of claims 1 to 7.

17. A computer program product, including a computer program, wherein, the computer program, when executed by a processor, implements the method according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Webpage frame deployment method and system

    CN104899047A