Non-invasive pluggable front-end construction transfer speed-up method and device
By combining local builds with a persistent solution from a content delivery network, the problem of long front-end build times was solved, achieving an efficient front-end build process and improving the user experience.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- SHANGHAI QIYU INFORMATION TECH CO LTD
- Filing Date
- 2022-07-01
- Publication Date
- 2026-07-31
AI Technical Summary
In the current front-end build process, the large number of dependency files leads to long build times and makes it difficult to collect build performance data, which affects development efficiency and user experience.
A persistence solution combining local build and content delivery network is adopted. By obtaining the resource address through project information, the local resource data is obtained using the resource address and the front-end build data is generated and stored in a predetermined location to complete the build, avoiding repeated installation of dependencies.
It significantly improves front-end build speed, reduces time costs, and increases user satisfaction, with an overall build speed increase of 2 to 6 times.
Smart Images

Figure CN115291879B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer information processing, and more specifically, to a non-intrusive, pluggable method, apparatus, electronic device, and computer-readable medium for accelerating front-end construction and transfer. Background Technology
[0002] The front-end, or website front-end, is the webpage displayed to users on PCs, mobile browsers, and other devices. With the development of internet technology, various platforms offer front-ends that adapt to different screen resolutions, feature appropriate animations, and provide a superior user experience. The front-end of a business product needs to be updated based on product activities or trending news. Typically, developers first develop the front-end code on a local platform, then submit the code to the business system to be converted into production code for use by the business front-end. The tool that converts development code into production code is called a build tool.
[0003] However, as the complexity of the business logic handled by the front-end increases, the number of dependency files required for the development code to run normally also increases. This leads to a corresponding increase in the front-end code build time, with each system build requiring a significant amount of time to install dependencies, and it is difficult to collect performance data for each stage of the build process.
[0004] The information disclosed in the background section is only intended to enhance the understanding of the background of this application, and therefore may include information that does not constitute prior art known to those skilled in the art. Summary of the Invention
[0005] In view of this, this application provides a non-intrusive, pluggable method, apparatus, electronic device, and computer-readable medium for accelerating front-end build transfer, which is compatible with the front-end build process in the prior art, improves front-end build efficiency without the user's awareness, reduces time costs, and increases user satisfaction.
[0006] Other features and advantages of this application will become apparent from the following detailed description, or may be learned in part from practice of this application.
[0007] According to one aspect of this application, a non-intrusive, pluggable method for accelerating front-end build transfer is proposed. The method includes: obtaining project information corresponding to the project to be built; obtaining the resource address corresponding to the project through the project information; obtaining local resource data using the resource address; generating front-end build data based on the local resource data; and storing the front-end build data in a predetermined location to complete the front-end build of the project.
[0008] Optionally, before obtaining the project information corresponding to the project to be built, the method further includes: performing a local build of the project; generating local build data after the local build is completed; and transmitting the local build data to a content delivery network.
[0009] Optionally, performing a local build of the project includes: pulling the project's code from a remote repository; installing the project's dependency files locally; and performing a local build of the project based on the dependency files and the code.
[0010] Optionally, transmitting the locally built data to the content delivery network includes: compressing the locally built data to generate local resource data; verifying the local resource data; and transmitting the local resource data to the content delivery network after successful verification.
[0011] Optionally, obtain the project information corresponding to the project to be built, including: obtaining the project identifier, project branch name, and commit identifier corresponding to the project to be built from a predetermined interface.
[0012] Optionally, obtaining the resource address corresponding to the project through the project information includes: obtaining the record file corresponding to the project information from the backend server through the project identifier, project branch name, and commit identifier in the project information; and obtaining the resource address corresponding to the project from the record file.
[0013] Optionally, obtaining local resource data using the resource address includes: obtaining the local resource data from the content delivery network via the resource address; and storing the local resource data on the local server of the project to be built on the front end.
[0014] Optionally, generating front-end build data based on the local resource data includes: decompressing the resource data locally on the server of the project to be built to generate the front-end build data.
[0015] Optionally, storing the front-end build data in a predetermined location to complete the front-end build of the project includes: determining the target platform and target directory based on the project information of the project; and storing the front-end build data in the target directory of the target platform to complete the front-end build of the project.
[0016] According to one aspect of this application, a non-intrusive, pluggable front-end build transfer acceleration device is proposed. The device includes: an information module for acquiring project information corresponding to a project to be built; an address module for acquiring a resource address corresponding to the project through the project information; a resource module for acquiring local resource data using the resource address; a data module for generating front-end build data based on the local resource data; and a build module for storing the front-end build data in a predetermined location to complete the front-end build of the project.
[0017] According to one aspect of this application, an electronic device is provided, comprising: one or more processors; a storage device for storing one or more programs; and, when the one or more programs are executed by the one or more processors, causing the one or more processors to implement the method as described above.
[0018] According to one aspect of this application, a computer-readable medium is provided having a computer program stored thereon that, when executed by a processor, implements the method described above.
[0019] According to the present application, a non-intrusive, pluggable front-end build transfer acceleration method, apparatus, electronic device, and computer-readable medium are disclosed. This method involves obtaining project information corresponding to the project to be built; obtaining the resource address corresponding to the project through the project information; obtaining local resource data using the resource address; generating front-end build data based on the local resource data; and storing the front-end build data in a predetermined location to complete the front-end build of the project. This approach is compatible with existing front-end build processes, improves front-end build efficiency without the user's awareness, reduces time costs, and increases user satisfaction.
[0020] It should be understood that the above general description and the following detailed description are merely exemplary and do not limit this application. Attached Figure Description
[0021] The above and other objects, features, and advantages of this application will become more apparent from the detailed description of exemplary embodiments with reference to the accompanying drawings. The drawings described below are merely some embodiments of this application, and those skilled in the art can obtain other drawings based on these drawings without any inventive effort.
[0022] Figure 1 This is a schematic diagram of the front-end construction method in the existing technology.
[0023] Figure 2 This is a system block diagram illustrating a non-intrusive, pluggable front-end construction transfer acceleration method and apparatus according to an exemplary embodiment.
[0024] Figure 3This is a flowchart illustrating a non-intrusive, pluggable front-end construction transfer acceleration method according to an exemplary embodiment.
[0025] Figure 4 This is a schematic diagram illustrating a non-intrusive, pluggable front-end construction transfer acceleration method according to an exemplary embodiment.
[0026] Figure 5 This is a schematic diagram illustrating a non-intrusive, pluggable front-end construction transfer acceleration method according to another exemplary embodiment.
[0027] Figure 6 This is a schematic diagram illustrating a non-intrusive, pluggable front-end construction transfer acceleration method according to another exemplary embodiment.
[0028] Figure 7 This is a block diagram illustrating a non-intrusive, pluggable front-end construction transfer acceleration device according to an exemplary embodiment.
[0029] Figure 8 This is a block diagram illustrating an electronic device according to an exemplary embodiment.
[0030] Figure 9 This is a block diagram illustrating a computer-readable medium according to an exemplary embodiment. Detailed Implementation
[0031] Exemplary embodiments will now be described more fully with reference to the accompanying drawings. However, these exemplary embodiments can be implemented in many forms and should not be construed as limited to the embodiments set forth herein; rather, they are provided so that this application will be thorough and complete, and will fully convey the concept of the exemplary embodiments to those skilled in the art. The same reference numerals in the drawings denote the same or similar parts, and therefore repeated descriptions of them will be omitted.
[0032] Furthermore, the described features, structures, or characteristics can be combined in any suitable manner in one or more embodiments. Numerous specific details are provided in the following description to give a thorough understanding of embodiments of this application. However, those skilled in the art will recognize that the technical solutions of this application can be practiced without one or more of the specific details, or other methods, components, apparatuses, steps, etc., can be employed. In other instances, well-known methods, apparatuses, implementations, or operations are not shown or described in detail to avoid obscuring various aspects of this application.
[0033] The block diagrams shown in the accompanying drawings are merely functional entities and do not necessarily correspond to physically independent entities. That is, these functional entities can be implemented in software, in one or more hardware modules or integrated circuits, or in different network and / or processor devices and / or microcontroller devices.
[0034] The flowcharts shown in the accompanying drawings are merely illustrative and do not necessarily include all content and operations / steps, nor do they necessarily have to be performed in the described order. For example, some operations / steps can be broken down, while others can be combined or partially combined; therefore, the actual execution order may change depending on the specific circumstances.
[0035] It should be understood that although the terms first, second, third, etc., may be used herein to describe various components, these components should not be limited by these terms. These terms are used to distinguish one component from another. Therefore, the first component discussed below may be referred to as the second component without departing from the teachings of this application. As used herein, the term "and / or" includes all combinations of any one and more of the associated listed items.
[0036] Those skilled in the art will understand that the accompanying drawings are merely schematic diagrams of exemplary embodiments, and the modules or processes in the drawings are not necessarily essential for implementing this application, and therefore cannot be used to limit the scope of protection of this application.
[0037] Figure 1 This is a schematic diagram of existing front-end construction methods. For example... Figure 1 As stated above, in the existing technology, front-end development generally requires the following steps:
[0038] 1. Pulling project code from the remote repository for the first time;
[0039] 2. Local installation project dependencies;
[0040] 3. Business development: Manually synchronize code, commit code, and then deploy to the release platform; (non-automatic)
[0041] 4. Reinstall project dependencies on the remote platform (this process is relatively time-consuming due to the number of project dependencies, network conditions, etc.); then perform a build (this process is also time-consuming due to the size of the project, server performance, task queuing, etc.).
[0042] 5. When new requirements arise and iterations are needed, steps 3 and 4 are repeated, resulting in a longer overall project cycle.
[0043] Current front-end build processes are slow, with an average build time of around 500 seconds for a simple front-end activity page project. This slowness leads to a poor development experience and prolonged testing and verification cycles. The slowness is mainly due to two factors: first, current front-end build processes rely on containers, which can cause resource contention when many build tasks are performed simultaneously, resulting in poor server performance; second, the installation of front-end dependencies takes too long. Furthermore, due to network speed fluctuations, timeouts frequently occur during dependency installation, leading to installation failures and ultimately causing the entire build process to fail.
[0044] To address the problems existing in the prior art, this application proposes a non-intrusive, pluggable method and apparatus for accelerating front-end build transfer. It adopts a persistence scheme that combines local build and content delivery network. During the front-end build, the system pulls resources, avoiding repeated installation of dependencies, and the overall front-end build speed is improved by 2 to 6 times.
[0045] The content of this application will be described in detail below with reference to specific embodiments.
[0046] Figure 2 This is a system block diagram illustrating a non-intrusive, pluggable front-end construction transfer acceleration method and apparatus according to an exemplary embodiment.
[0047] like Figure 2 As shown, system architecture 20 may include local devices 201, 202, and 203, network 204, and content delivery network server 205, service platforms 206, 207, and 208. Network 204 serves as the medium for providing communication links between local devices 201, 202, and 203 and content delivery network server 205; between local devices 201, 202, and 203 and service platforms 206, 207, and 208; and between content delivery network server 205 and service platforms 206, 207, and 208. Network 204 may include various connection types, such as wired, wireless communication links, or fiber optic cables, etc.
[0048] Developers can use local devices 201, 202, and 203 to interact with business platforms 206, 207, and 208 via network 204 and / or content delivery network server 205 to receive or send data, etc. Various development-type client applications, such as HTML development applications, CSS development applications, JavaScript development applications, and AJAX development applications, can be installed on local devices 201, 202, and 203.
[0049] Local devices 201, 202, and 203 may, for example, perform local building of the project; local devices 201, 202, and 203 may, for example, generate local build data after the local building is completed; local devices 201, 202, and 203 may, for example, store the local build data locally, and local devices 201, 202, and 203 may also, for example, transmit the local build data to the content delivery network server 205.
[0050] Business platforms 206, 207, and 208 can be servers providing various services, such as backend management servers supporting internet service websites browsed by users. Business platforms 206, 207, and 208 can analyze and process the received user data and feed the processing results back to the administrators and / or users of the internet service websites.
[0051] Business platforms 206, 207, and 208 can, for example, obtain project information corresponding to the project to be built; business platforms 206, 207, and 208 can, for example, obtain the resource address corresponding to the project through the project information; business platforms 206, 207, and 208 can, for example, obtain local resource data using the resource address; business platforms 206, 207, and 208 can, for example, generate front-end building data based on the local resource data; business platforms 206, 207, and 208 can, for example, store the front-end building data in a predetermined location to complete the front-end building of the project.
[0052] Business platforms 206, 207, and 208 can be a single physical server, or they can be composed of multiple servers. It should be noted that the non-intrusive, pluggable front-end build transfer acceleration method provided in this application embodiment can be executed by business platforms 206, 207, and 208 and / or content delivery network server 205 and / or local devices 201, 202, and 203. Correspondingly, the non-intrusive, pluggable front-end build transfer acceleration device can be set in business platforms 206, 207, and 208 and / or content delivery network server 205 and / or local devices 201, 202, and 203.
[0053] Figure 3 This is a flowchart illustrating a non-intrusive, pluggable front-end build transfer acceleration method according to another exemplary embodiment. A non-intrusive, pluggable front-end build transfer acceleration method 30 includes at least steps S302 to S310.
[0054] like Figure 3 As shown in step S302, the project information corresponding to the project to be built is obtained. The project identifier, project branch name, and commit identifier corresponding to the project to be built are obtained from a predefined interface.
[0055] The plugin can call a preset port, such as the Server API, to obtain project information, which may include: project identifier, project branch name, and commit identifier (commitId).
[0056] In one embodiment, before obtaining the project information corresponding to the project to be built, the method further includes: performing a local build of the project; generating local build data after the local build is completed; and transmitting the local build data to a content delivery network.
[0057] More specifically, for example, the code for the project can be pulled from a remote repository; the project's dependencies can be installed locally; and the project can be built locally based on the dependencies and the code.
[0058] In one embodiment, the local build data may be compressed to generate local resource data; the local resource data may be verified; and after verification, the local resource data may be transmitted to the content delivery network.
[0059] The relevant content regarding "verifying the local resource data" will be available in [the following text]. Figure 5 The corresponding embodiments are described in detail.
[0060] In step S304, the resource address corresponding to the project is obtained through the project information. The record file corresponding to the project information is retrieved from the backend server using the project identifier, project branch name, and commit identifier from the project information; the resource address corresponding to the project is then obtained from the record file.
[0061] In S306, local resource data is obtained using the resource address. For example, the local resource data can be obtained from a content delivery network using the resource address; the local resource data is then stored locally on the server of the project to be front-end built.
[0062] Based on the information in this record, resources are downloaded from the content delivery network server to the local machine of the business server where the front-end is to be built.
[0063] In S308, front-end build data is generated based on the local resource data. For example, the resource data can be decompressed locally on the server of the project to be front-end built to generate the front-end build data, wherein the front-end build data is generated based on the decompression of the developer's local build data.
[0064] In step S310, the front-end build data is stored in a predetermined location to complete the front-end build of the project. The target platform and target directory can be determined based on the project information; the front-end build data is stored in the target directory of the target platform to complete the front-end build of the project.
[0065] According to the present application, a non-intrusive and pluggable method for accelerating front-end build transfer involves: obtaining project information corresponding to the project to be built; obtaining the resource address corresponding to the project through the project information; obtaining local resource data using the resource address; generating front-end build data based on the local resource data; and storing the front-end build data in a predetermined location to complete the front-end build of the project. This method is compatible with the front-end build process in the prior art, improves front-end build efficiency without the user's awareness, reduces time costs, and increases user satisfaction.
[0066] It should be clearly understood that this application describes how specific examples are formed and used, but the principles of this application are not limited to any details of these examples. Rather, based on the teachings of the disclosure of this application, these principles can be applied to many other embodiments.
[0067] Figure 4 This is a schematic diagram illustrating a non-intrusive, pluggable front-end build transfer acceleration method according to an exemplary embodiment. In the front-end build method for local resource data in this application, different modules can be set to assist in improving performance. For example, a performance statistics module can be set to collect data. To ensure resource consistency, a version comparison module (based on commitId) can also be built in. To improve development automation, a Git (code) automation module can also be built in, which may include functions such as automatic commit, automatic retrieval, automatic push, version conflict checking, and version pull.
[0068] The methods described in this application can be implemented through plugins in the build tools. The front-end build method in this application is independent of container machines and can be used with Docker, Node.js, and GitLab CI. Furthermore, this application can provide enhanced features such as compressed uploads, which can be used independently or disabled. For integration, the front-end build method in this application is pluggable, allowing for the selection of features to assemble into specific pipelines, and also supports the deployment of micro-applications.
[0069] Figure 5 This is a schematic diagram illustrating a non-intrusive, pluggable front-end construction transfer acceleration method according to another exemplary embodiment. For example... Figure 5 As shown, the system architecture corresponding to the non-intrusive, pluggable front-end construction and transfer acceleration method in this application may include two parts: a local part and a business front-end.
[0070] The local end can handle the build of local projects, check the Git version of the project before building the current project, compress the build artifacts after the build is completed, and then upload them.
[0071] During this process, the project configuration can also be checked through version detection and project detection models to ensure that the configuration is correct. The logging module is used to record log output during the process, as well as information such as performance, speed, resource size, operator, and version number during the project build process.
[0072] The business frontend is primarily used for providing business services. It can be applied within containers or other build platforms to pull matching resource packages from content delivery networks and decompress them.
[0073] The business front-end executes functions by exposing API interfaces.
[0074] In a specific application embodiment, the business platform calls the API exposed to the business frontend at runtime, passing in the required parameters (such as: project identifier, branch name, commit identifier). The log module will match a unique record in the resource repository (backend service), extract the resource address containing the project from this record, and the download module will download the resource from the content delivery network to the local business server based on the information in this record. Then, it will decompress the resource and place the decompressed file in the specified directory of the platform. The process ends here. The local build result is placed in the specified location according to the platform's requirements. The remaining tasks are completed by the platform and subsequent steps such as publishing.
[0075] This application presents a non-intrusive, pluggable method for accelerating front-end build migration. It simply takes over a step of the platform without changing the platform's rules, but rather adapts to the platform. This means that developers on the platform hardly need to worry about whether these actions are performed by other plugins, because the entire process from platform startup to release is no different from before, resulting in a good developer experience.
[0076] In a specific embodiment, the front-end construction method in the prior art can be referred to the description above, and the construction method in this application can be as follows:
[0077] 1. Pulling project code from the remote repository for the first time;
[0078] 2. Local installation project dependencies;
[0079] 3. Business development involves local building, followed by compressing and uploading the build artifacts to the content delivery network. This is because, in most cases, local building performance is better than the server performance of the deployment platform, significantly reducing build time. After the build is complete, the content is deployed to the business platform.
[0080] 4. The business platform is synchronized, and the resources are synchronized to the platform. In this process, since the reinstallation of dependencies is eliminated and the resources have been quickly built locally and do not need to be rebuilt, the build method in this application can save the installation and build steps, save the time of processing this project, and quickly release server resources so that the server can handle other tasks.
[0081] 5. If new requirements arise, iterate and repeat steps 3 and 4.
[0082] The entire development process remains unchanged, with no additional steps, and is identical to existing technologies. Developers do not require special training to adapt to the methods described in this application. The various steps in the development process are seamlessly integrated, and the entire process is fully automated and secure. It maintains the original development workflow, and more importantly, its pluggable nature provides an alternative to existing front-end development solutions.
[0083] Figure 6 This is a schematic diagram illustrating a non-intrusive, pluggable front-end construction transfer acceleration method according to another exemplary embodiment. Figure 6 This is a comparison between existing front-end construction methods and the construction method in this application. From Figure 6 As can be seen from the existing technology, the most time-consuming steps in the process are installing dependencies within the image and building. Dependencies are installed every time the package is packaged. Due to the intranet network, the installation is very time-consuming. At the same time, the efficiency of building within the container is also low because the performance of the container will decrease when there are many tasks. The above two points combined result in the original process taking a long time to package each time.
[0084] In this application, time-consuming steps are moved locally. Since the project is already installed locally during development, it doesn't need to be reinstalled each time, saving significant time. Most mainstream front-end projects include build functionality during initialization, so no additional configuration is required in this application to achieve the build. Because the build is already completed locally, only the static resource package needs to be compressed, uploaded to a unified file service, and recorded.
[0085] When building the business front-end, a unique resource package is matched and downloaded based on the project information in the business processing command, and then decompressed. With the extension of the above functions, the same effect as the original process can be achieved, while greatly saving the time of installing dependency packages and saving network resources.
[0086] In a real-world application scenario, the average construction time for a project using existing technology is around 500 seconds. After using the technology described in this application, the average construction time is reduced to less than 60 seconds, demonstrating a significant improvement in efficiency.
[0087] Therefore, the non-intrusive, pluggable front-end construction and transfer acceleration method of this application can reduce development costs, access costs, and technical personnel understanding costs, and can also bring about a significant improvement in system performance and realize automated processes.
[0088] Those skilled in the art will understand that all or part of the steps of the above embodiments are implemented as a computer program executed by a CPU. When the computer program is executed by the CPU, it performs the functions defined by the method provided in this application. The program can be stored in a computer-readable storage medium, such as a read-only memory, a magnetic disk, or an optical disk.
[0089] Furthermore, it should be noted that the above figures are merely illustrative representations of the processes included in the method according to exemplary embodiments of this application, and are not intended to be limiting. It is readily understood that the processes shown in the above figures do not indicate or limit the temporal order of these processes. Additionally, it is readily understood that these processes may be executed synchronously or asynchronously, for example, in multiple modules.
[0090] The following are embodiments of the apparatus described in this application, which can be used to execute the embodiments of the method described in this application. For details not disclosed in the apparatus embodiments of this application, please refer to the embodiments of the method described in this application.
[0091] Figure 7 This is a block diagram illustrating a non-intrusive, pluggable front-end construction transfer acceleration device according to an exemplary embodiment. (As follows) Figure 7 As shown, the non-intrusive pluggable front-end construction transfer acceleration device 70 includes: an information module 702, an address module 704, a resource module 706, a data module 708, and a construction module 710.
[0092] The information module 702 is used to obtain project information corresponding to the project to be built in the front end; the information module 702 is also used to obtain the project identifier, project branch name and commit identifier corresponding to the project to be built in the front end from the predetermined interface.
[0093] Address module 704 is used to obtain the resource address corresponding to the project through the project information; address module 704 is also used to obtain the record file corresponding to the project information in the background server through the project identifier, project branch name and commit identifier in the project information; and obtain the resource address corresponding to the project from the record file.
[0094] Resource module 706 is used to obtain local resource data using the resource address; resource module 706 is also used to obtain the local resource data from the content delivery network through the resource address; and store the local resource data on the local server of the project to be front-end built.
[0095] The data module 708 is used to generate front-end build data based on the local resource data; the data module 708 is also used to decompress the resource data locally on the server of the project to be front-end built, and generate the front-end build data.
[0096] The build module 710 is used to store the front-end build data in a predetermined location to complete the front-end build of the project. The build module 710 is also used to determine the target platform and target directory based on the project information of the project; and to store the front-end build data in the target directory of the target platform to complete the front-end build of the project.
[0097] The non-intrusive, pluggable front-end build transfer acceleration device of this application obtains project information corresponding to the project to be built; obtains the resource address corresponding to the project through the project information; obtains local resource data using the resource address; generates front-end build data based on the local resource data; and stores the front-end build data in a predetermined location to complete the front-end build of the project. This method is compatible with the front-end build process in the prior art, improves front-end build efficiency without the user's awareness, reduces time costs, and increases user satisfaction.
[0098] Figure 8 This is a block diagram illustrating an electronic device according to an exemplary embodiment.
[0099] The following reference Figure 8 To describe an electronic device 800 according to this embodiment of the present application. Figure 8 The electronic device 800 shown is merely an example and should not impose any limitations on the functionality and scope of use of the embodiments of this application.
[0100] like Figure 8 As shown, the electronic device 800 is presented in the form of a general-purpose computing device. The components of the electronic device 800 may include, but are not limited to: at least one processing unit 810, at least one storage unit 820, a bus 830 connecting different system components (including storage unit 820 and processing unit 810), a display unit 840, etc.
[0101] The storage unit stores program code that can be executed by the processing unit 810, causing the processing unit 810 to perform the steps described in this specification according to various exemplary embodiments of this application. For example, the processing unit 810 can perform actions such as... Figure 3 The steps are shown in the figure.
[0102] The storage unit 820 may include a readable medium in the form of a volatile storage unit, such as a random access memory unit (RAM) 8201 and / or a cache storage unit 8202, and may further include a read-only memory unit (ROM) 8203.
[0103] The storage unit 820 may also include a program / utility 8204 having a set (at least one) program module 8205, such program module 8205 including but not limited to: an operating system, one or more application programs, other program modules and program data, each or some combination of these examples may include an implementation of a network environment.
[0104] Bus 830 can represent one or more of several types of bus structures, including a memory cell bus or memory cell controller, a peripheral bus, a graphics acceleration port, a processing unit, or a local bus using any of the various bus structures.
[0105] Electronic device 800 can also communicate with one or more external devices 800' (e.g., keyboard, pointing device, Bluetooth device, etc.), enabling users to communicate with devices that interact with electronic device 800, and / or any device (e.g., router, modem, etc.) that allows electronic device 800 to communicate with one or more other computing devices. This communication can be performed via input / output (I / O) interface 850. Furthermore, electronic device 800 can also communicate with one or more networks (e.g., local area network (LAN), wide area network (WAN), and / or public networks, such as the Internet) via network adapter 860. Network adapter 860 can communicate with other modules of electronic device 800 via bus 830. It should be understood that, although not shown in the figures, other hardware and / or software modules can be used in conjunction with electronic device 800, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.
[0106] From the above description of the embodiments, those skilled in the art will readily understand that the exemplary embodiments described herein can be implemented by software, or by combining software with necessary hardware. Therefore, as... Figure 9 As shown, the technical solution according to the embodiments of this application can be embodied in the form of a software product. The software product can be stored in a non-volatile storage medium (such as a CD-ROM, USB flash drive, mobile hard drive, etc.) or on a network, and includes several instructions to cause a computing device (such as a personal computer, server, or network device, etc.) to execute the above-described method according to the embodiments of this application.
[0107] The software product may employ any combination of one or more readable media. A readable medium may be a readable signal medium or a readable storage medium. A readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of readable storage media (a non-exhaustive list) include: electrical connections with one or more wires, portable disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof.
[0108] The computer-readable storage medium may include data signals propagated in baseband or as part of a carrier wave, carrying readable program code. Such propagated data signals may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. The readable storage medium may also be any readable medium other than a readable storage medium, capable of transmitting, propagating, or transmitting programs for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the readable storage medium may be transmitted using any suitable medium, including but not limited to wireless, wired, optical fiber, RF, etc., or any suitable combination thereof.
[0109] Program code for performing the operations of this application can be written in any combination of one or more programming languages, including object-oriented programming languages such as Java and C++, and conventional procedural programming languages such as C or similar languages. The program code can execute entirely on the user's computing device, partially on the user's device, as a standalone software package, partially on the user's computing device and partially on a remote computing device, or entirely on a remote computing device or server. In cases involving remote computing devices, the remote computing device can be connected to the user's computing device via any type of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computing device (e.g., via the Internet using an Internet service provider).
[0110] The aforementioned computer-readable medium carries one or more programs. When these programs are executed by a device, the computer-readable medium performs the following functions: performs a local build of the project; generates local build data after the local build is completed; and transmits the local build data to a content delivery network. The computer-readable medium may also perform the following functions: obtain project information corresponding to the project to be front-end built; obtain the resource address corresponding to the project through the project information; obtain local resource data using the resource address; generate front-end build data based on the local resource data; and store the front-end build data in a predetermined location to complete the front-end build of the project.
[0111] Those skilled in the art will understand that the above modules can be distributed in the device as described in the embodiments, or they can be modified accordingly and placed in one or more devices that are unique to this embodiment. The modules in the above embodiments can be combined into one module, or they can be further divided into multiple sub-modules.
[0112] Through the description of the above embodiments, those skilled in the art will readily understand that the exemplary embodiments described herein can be implemented by software or by combining software with necessary hardware. Therefore, the technical solutions according to the embodiments of this application can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (such as a CD-ROM, USB flash drive, external hard drive, etc.) or on a network, including several instructions to cause a computing device (such as a personal computer, server, mobile terminal, or network device, etc.) to execute the methods according to the embodiments of this application.
[0113] Exemplary embodiments of this application have been specifically shown and described above. It should be understood that this application is not limited to the detailed structures, arrangements, or implementation methods described herein; rather, this application is intended to cover various modifications and equivalent arrangements contained within the spirit and scope of the appended claims.
Claims
1. A non-intrusive, pluggable method for accelerating front-end construction and transfer, characterized in that, include: Pull the code for the project to be built in the front end from the remote repository; Install the project's dependencies locally; The project is built locally based on the dependency files and the code. After the local build is complete, local build data is generated; The locally built data is compressed to generate local resource data; The local resource data is transmitted to the content delivery network; Obtain the project information corresponding to the project to be built in the front end; The record file corresponding to the project information is retrieved from the backend server using the project identifier, project branch name, and commit identifier in the project information. The resource address corresponding to the project is obtained from the record file; Local resource data is obtained from the content delivery network via the resource address; The local resource data is stored locally on the server of the project to be built. Generate front-end build data based on the local resource data; The front-end build data is stored in a predetermined location to complete the front-end build of the project.
2. The method as described in claim 1, characterized in that, Transmitting the local resource data to a content delivery network includes: Verify the local resource data; After verification, the local resource data is transmitted to the content delivery network.
3. The method as described in claim 1, characterized in that, Obtain project information for the project to be built on the front end, including: The project identifier, project branch name, and commit identifier corresponding to the project to be built in the front end are obtained from the predefined interface.
4. The method as described in claim 1, characterized in that, The front-end build data is generated based on the local resource data, including: The local resource data is decompressed on the local server of the project to be built, and the front-end build data is generated.
5. The method as described in claim 1, characterized in that, Storing the front-end build data in a predetermined location to complete the front-end build of the project includes: The target platform and target directory are determined based on the project information of the project. The front-end build data is stored in the target directory of the target platform to complete the front-end build of the project.
6. A non-invasive, pluggable front-end construction transfer acceleration device, characterized in that, include: The information module is used to pull the code of a project to be built from a remote repository; Install the project's dependencies locally; The project is built locally based on the dependency files and the code; after the local build is complete, local build data is generated. The locally built data is compressed to generate local resource data; Transmit the local resource data to the content delivery network; obtain the project information corresponding to the project to be built on the front end; The address module is used to retrieve the record file corresponding to the project information from the backend server using the project identifier, project branch name, and commit identifier in the project information; and to retrieve the resource address corresponding to the project from the record file. The resource module is used to obtain local resource data from the content delivery network via the resource address; The local resource data is stored locally on the server of the project to be built. The data module is used to generate front-end construction data based on the local resource data; A build module is used to store the front-end build data in a predetermined location to complete the front-end build of the project.
7. An electronic device, characterized in that, include: One or more processors; Storage device for storing one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors implement the method as described in any one of claims 1-5.
8. A computer-readable medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements the method as described in any one of claims 1-5.