Method and device for front-end project deployment, electronic equipment and storage medium

By building and publishing JAR packages, combined with the front-end Vue and back-end Java frameworks, the problem of fine-grained management of front-end project deployment is solved, enabling personalized configuration and efficient delivery. It supports multi-version front-end project management and resource synchronization, thereby improving the deployment efficiency of enterprise-level projects.

CN115509573BActive Publication Date: 2026-03-24CHINA PING AN LIFE INSURANCE CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-09-21
Publication Date
2026-03-24

AI Technical Summary

Technical Problem

How to achieve refined management and personalized configuration for the deployment of a large number of front-end projects, especially in enterprise-level projects with rapid iteration and multiple versions, where existing technologies such as Jenkins cannot meet the deployment needs of a large number of front-end projects in enterprise-level projects.

Method used

By acquiring the code and project information of the front-end project, building a JAR package and recording the release time, setting the effective time and storing it, testing and releasing it on the back-end, and combining the front-end Vue framework and the back-end Java framework, we can achieve efficient delivery and automated operation and maintenance. It supports the early release and timely effectiveness of multiple JAR packages and performs resource updates to ensure synchronization and real-time performance.

Benefits of technology

It enables fine-grained management and personalized configuration of front-end projects, supports the early release and timely activation of multiple JAR packages, ensures the traceability of historical data, improves the resource synchronization and real-time performance of front-end projects, and supports rapid version switching and anomaly monitoring.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115509573B_ABST
    Figure CN115509573B_ABST
Patent Text Reader

Abstract

The embodiment provides a front-end project deployment method and device, electronic equipment and a storage medium, and belongs to the technical field of artificial intelligence and research and development management. The method comprises the following steps: acquiring front-end code to be published in a front-end project, and determining project information corresponding to the front-end code; constructing a JAR package based on the front-end code and the project information corresponding to the front-end code, and recording the sealing time of the JAR package; storing the JAR package after setting an effective time of the JAR package, so that the JAR package is tested by a back end; in the case that the back end completes the test on the JAR package and the effective time of the JAR package is determined, the JAR package is published, and the publishing time of the JAR package is recorded; and resources of JAR packages not yet published in the front-end project are updated based on the published JAR packages in the front-end project. The application can finely manage the deployment of a large number of front-end projects and provide personalized configuration.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the fields of artificial intelligence and R&D management technology, and in particular to a method and apparatus for front-end project deployment, electronic devices, and storage media. Background Technology

[0002] Enterprise-level projects typically employ project teams for business development. For each business-related front-end project, a rapid iteration approach is used for development, and release management is implemented for each version of the front-end project. With the development of computer technologies such as artificial intelligence, the types of online applications are constantly increasing, and product updates are occurring rapidly. Therefore, it is necessary to manage multiple front-end projects within an enterprise-level project, as well as multiple versions of each front-end project.

[0003] Therefore, how to perform refined management of the deployment of a large number of front-end projects and provide personalized configurations has become a technical problem that urgently needs to be solved. Summary of the Invention

[0004] The main objective of this application is to provide a method, apparatus, electronic device, and storage medium for front-end project deployment, which aims to provide refined management and personalized configuration for the deployment of a large number of front-end projects.

[0005] To achieve the above objectives, a first aspect of this application proposes a method for deploying a front-end project, the method comprising:

[0006] Obtain the front-end code to be released in the front-end project, and determine the project information corresponding to the front-end code; wherein, the project information includes project group information, project information, and version number;

[0007] A JAR package is constructed based on the front-end code and the project information corresponding to the front-end code, and the sealing time of the JAR package is recorded; wherein, the sealing time is the time when the JAR package is completed;

[0008] The JAR package is stored after an effective time is set so that the backend can test the JAR package;

[0009] Once it is determined that the backend has completed testing of the JAR package and the effective time of the JAR package is determined, the JAR package is released and the release time of the JAR package is recorded; wherein, the effective time is after the release time;

[0010] Update resources for unreleased JAR packages in the front-end project based on the published JAR packages in the front-end project.

[0011] In some embodiments, the JAR package is built based on the front-end code and the project information corresponding to the front-end code, including:

[0012] A node_modules folder corresponding to the project information is determined;

[0013] A build module corresponding to the project information is configured in the node_modules folder;

[0014] The project information corresponding to the front-end code is obtained, and the build module is called to build the front-end code and the project information corresponding to the front-end code to generate a JAR package.

[0015] In some embodiments, the JAR package is stored after the effective time is set, so that the backend tests the JAR package, including:

[0016] The JAR package built is obtained;

[0017] The effective time of the JAR package is set, and the JAR package is uploaded to MongoDB after the effective time;

[0018] The backend accesses the JAR package in the MongoDB through DevOps and tests the JAR package.

[0019] In some embodiments, the JAR package that has not been released in the front-end project is updated based on the JAR package released in the front-end project, including:

[0020] An independent resource package is set for each version number corresponding JAR package in the front-end project, and the resources of the JAR package are stored in the corresponding resource package;

[0021] After the JAR package in the front-end project is released, the resources that have changed in the front-end project are determined, and the resources that have changed in the front-end project are merged into the resource package corresponding to the JAR package that has not been released.

[0022] In some embodiments, after the JAR package is released, the method further includes:

[0023] The JAR package released in the front-end project is uploaded to the resource management platform;

[0024] The JAR package reaching the effective time in the resource management platform is taken as an effective JAR package, the access records of the resources corresponding to the effective JAR package are counted, and the resources in the cache are updated in real time based on the access records of the resources corresponding to the effective JAR package.

[0025] In some embodiments, the statistics of the access records of the resources corresponding to the effective JAR package, updating the resources in the cache in real time based on the access records of the resources corresponding to the effective JAR package, comprises:

[0026] The access records of the resources corresponding to the effective JAR package in the resource management platform are obtained through the method of front-end burying points.

[0027] The access amounts of each resource are determined based on the access records of the resources corresponding to the effective JAR package in the resource management platform.

[0028] The resources with access amounts higher than a first preset access amount threshold are preferentially cached, and the resources with access amounts lower than a second preset access amount threshold are cleaned up. The first preset access amount threshold is greater than the second preset access amount threshold.

[0029] In some embodiments, the method further comprises:

[0030] If the version exception of the front-end project is detected, the version number corresponding to the version exception is determined, and the front-end project is switched to the version number before the version number corresponding to the version exception. The version exception includes one of the sealing plate exception and the release exception.

[0031] To achieve the above object, a second aspect of the embodiment of the application proposes a device for front-end project deployment, the device comprises:

[0032] The acquisition module is configured to acquire the front-end code to be published in the front-end project and determine the project information corresponding to the front-end code. The project information includes project group information, project information, and version number.

[0033] The construction module is configured to construct a JAR package based on the front-end code and the project information corresponding to the front-end code, and record the sealing plate time of the JAR package. The sealing plate time is the time for completing the construction of the JAR package.

[0034] The storage module is configured to store the JAR package after setting the effective time of the JAR package, so that the JAR package is tested by the back-end.

[0035] The publishing module is configured to publish the JAR package and record the publishing time of the JAR package, in the case that the back-end completes the test of the JAR package and the effective time of the JAR package is determined. The effective time is after the publishing time.

[0036] The update module is configured to update the resources of the JAR package not yet published in the front-end project based on the JAR package published in the front-end project.

[0037] To achieve the above object, a third aspect of the embodiments of the present application provides an electronic device, comprising a memory, a processor, a program stored in the memory and executable on the processor, and a data bus for realizing connection communication between the processor and the memory, the program being executed by the processor to realize the method of the first aspect.

[0038] To achieve the above object, a fourth aspect of the embodiments of the present application provides a computer-readable storage medium for computer-readable storage, the storage medium storing one or more programs, the one or more programs being executable by one or more processors to realize the method of the first aspect.

[0039] The method and device for front-end project deployment, electronic device and storage medium provided by the present application obtain the front-end code to be published in the front-end project, and determine the project information corresponding to the front-end code, wherein the project information comprises project group information, project information and version number. The corresponding front-end code can be uniquely determined through the project information, thereby facilitating the management of multiple different front-end codes. A JAR package is constructed based on the front-end code and the project information corresponding to the front-end code, and the sealing time of the JAR package is recorded, wherein the sealing time is the time for completing the construction of the JAR package. Then, the JAR package is stored after setting the effective time of the JAR package, so that the JAR package is tested by the back-end. The historical data is traceable, and efficient delivery and automatic operation and maintenance are realized. Efficient delivery and automatic operation and maintenance are realized by adopting the front-end VUE framework and the back-end java framework. When it is determined that the back-end completes the test of the JAR package and it is determined that the effective time of the JAR package, the JAR package is published, and the publishing time of the JAR package is recorded, wherein the effective time is after the publishing time. The front-end project is published in advance, and takes effect on time after the effective time. The resources of the JAR package not yet published in the front-end project are updated based on the published JAR package in the front-end project, so as to ensure the synchronicity and real-time performance of the resources in the front-end project.

[0040] According to the solution provided in this application embodiment, by employing a front-end Vue framework and a back-end Java framework, and storing the JAR packages after setting an effective time, historical data traceability can be ensured. By managing the release time, publication time, and effective time of different versions of the front-end project, the release platform isolates the JAR packages in the front-end project, thereby supporting the early release of multiple different JAR packages in the front-end project, and ensuring timely effectiveness after the effective time, realizing personalized configuration of front-end project release. Based on the published JAR packages in the front-end project, resources of unpublished JAR packages in the front-end project are updated, ensuring the synchronization and real-time nature of resources in the front-end project. This application embodiment can provide fine-grained management and personalized configuration for the deployment of a large number of front-end projects.

[0041] Other features and advantages of this application will be set forth in the description which follows, and will be apparent in part from the description, or may be learned by practicing the application. The objectives and other advantages of this application may be realized and obtained by means of the structures particularly pointed out in the description, claims and drawings. Attached Figure Description

[0042] Figure 1 This is a flowchart of the front-end project deployment method provided in the embodiments of this application;

[0043] Figure 2 yes Figure 1 The flowchart of step S200 in the middle;

[0044] Figure 3 yes Figure 1 The flowchart of step S300 in the process;

[0045] Figure 4 yes Figure 1 The flowchart of step S500 in the middle;

[0046] Figure 5 yes Figure 1 The flowchart following step S400;

[0047] Figure 6 yes Figure 5 The flowchart of step S620 in the process;

[0048] Figure 7 This is a schematic diagram of the structure of the front-end project deployment device provided in the embodiments of this application;

[0049] Figure 8 This is a schematic diagram of the hardware structure of the electronic device provided in the embodiments of this application. Detailed Implementation

[0050] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.

[0051] It should be noted that although functional modules are divided in the device schematic diagram and a logical order is shown in the flowchart, in some cases, the steps shown or described may be performed in a different order than the module division in the device or the order in the flowchart. The terms "first," "second," etc., in the specification, claims, and the aforementioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence.

[0052] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used herein is for the purpose of describing embodiments of this application only and is not intended to limit this application.

[0053] 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.

[0054] 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.

[0055] 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.

[0056] First, let's analyze some of the terms used in this application:

[0057] Artificial intelligence (AI) is a new branch of computer science that studies, develops, and applies theories, methods, technologies, and systems to simulate, extend, and expand human intelligence. It aims to understand the essence of intelligence and produce intelligent machines that can react in a way similar to human intelligence. Research in this field includes robotics, speech recognition, image recognition, natural language processing, and expert systems. AI can simulate the information processes of human consciousness and thought. Furthermore, AI utilizes digital computers or machines controlled by digital computers to simulate, extend, and expand human intelligence, perceiving the environment, acquiring knowledge, and using that knowledge to achieve optimal results.

[0058] A Content Management System (CMS) is a software system that sits between the web front-end (web server) and the back-end office system or workflow (content creation and editing). Content creators, editors, and publishers use the CMS to submit, modify, approve, and publish content. "Content" here may include files, spreadsheets, images, data from databases, and even videos. Content management systems may also optionally provide content scraping tools to automatically scrape content from third-party sources, such as text files, HTML web pages, web services, and relational databases, and then analyze and process it before adding it to their own content library. With the development of personalization, content management also assists the web front-end in providing content to users in a personalized way, i.e., providing personalized portal frameworks to better push content to users' browsers based on web technology.

[0059] DevOps (a combination of Development and Operations) is a set of processes, methods, and systems used to promote communication, collaboration, and integration among development (application / software engineering), technical operations, and quality assurance (QA) departments. DevOps encompasses both development and operations, serving as a general term for development, operation, and maintenance. DevOps-based software development allows for the application of testing environments and the integration of data packages into the software environment. Taking a holistic approach, DevOps analyzes development outcomes, and strengthening collaboration and communication among personnel is a key focus of software development design and should be appropriately prioritized. Within the DevOps framework, software development can be automated, making human-computer interaction solutions feasible.

[0060] In related technologies, the solution adopted is to use Jenkins for packaging and deployment. Jenkins is a continuous integration tool developed based on Java, which enables continuous integration of software projects. However, due to Jenkins' slow response speed, troublesome debugging, weak version control, and inability to be customized to the characteristics of front-end project deployment, it cannot meet the use case of deploying a large number of front-end projects in enterprise-level projects.

[0061] Based on this, in order to solve the technical problems in the background art, this application provides a method and apparatus, electronic device and storage medium for front-end project deployment, which aims to perform fine-grained management of the deployment of a large number of front-end projects and provide personalized configuration.

[0062] This application provides a method and apparatus for front-end project deployment, an electronic device, and a storage medium. The specific implementation details are illustrated in the following embodiments. First, the method for front-end project deployment in this application is described.

[0063] The embodiments of this application can acquire and process relevant data based on artificial intelligence technology. Artificial intelligence (AI) refers to the theories, methods, technologies, and application systems that use digital computers or machines controlled by digital computers to simulate, extend, and expand human intelligence, perceive the environment, acquire knowledge, and use that knowledge to obtain optimal results.

[0064] Foundational technologies for artificial intelligence generally include sensors, dedicated AI chips, cloud computing, distributed storage, big data processing, operating / interactive systems, and mechatronics. AI software technologies mainly encompass computer vision, robotics, biometrics, speech processing, natural language processing, and machine learning / deep learning.

[0065] The front-end project deployment method provided in this application relates to the fields of artificial intelligence and R&D management. The front-end project deployment method provided in this application can be applied to a terminal, a server, or software running on either a terminal or a server. In some embodiments, the terminal can be a smartphone, tablet, laptop, desktop computer, or smartwatch, etc.; the server can be configured as an independent physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDN (Content Delivery Network), and big data and artificial intelligence platforms; the software can be an application implementing the front-end project deployment method, but is not limited to the above forms.

[0066] The embodiments of this application can be used in numerous general-purpose or special-purpose computer system environments or configurations. Examples include: personal computers, server computers, handheld or portable devices, tablet devices, multiprocessor systems, microprocessor-based systems, set-top boxes, programmable consumer electronics devices, network PCs, minicomputers, mainframe computers, distributed computing environments including any of the above systems or devices, etc. This application can be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc., that perform specific tasks or implement specific abstract data types. This application can also be practiced in distributed computing environments where tasks are performed by remote processing devices connected via a communication network. In a distributed computing environment, program modules can reside in local and remote computer storage media, including storage devices.

[0067] It should be noted that in all specific embodiments of this application, when processing data related to user identity or characteristics, such as user information, user behavior data, user historical data, and user location information, user permission or consent is obtained first. Furthermore, the collection, use, and processing of this data comply with relevant laws, regulations, and standards of the relevant countries and regions. In addition, when embodiments of this application require access to sensitive personal information of users, separate permission or consent from the user is obtained through pop-ups or redirects to confirmation pages. Only after obtaining the user's separate permission or consent is the necessary user-related data for the proper functioning of the embodiments of this application obtained.

[0068] The embodiments of this application will be further described below with reference to the accompanying drawings.

[0069] Figure 1 This is an optional flowchart of the front-end project deployment method provided in the embodiments of this application. Figure 1 The method may include, but is not limited to, steps S100 to S500.

[0070] Step S100: Obtain the front-end code to be released in the front-end project, and determine the project information corresponding to the front-end code; wherein, the project information includes project group information, project information, and version number;

[0071] In step S100 of some embodiments, the creation module can be logged in using an account and password. If the user does not have permission to log in to the creation module, a mock test can be used. Mock testing refers to a testing method where a virtual object is created for testing purposes to address objects that are difficult to construct or obtain. If a mock user exists, it can be used for login, or the system administrator can manually review and authorize newly registered mock users.

[0072] After logging into the creation module, a project group to which the front-end code belongs is created, and the project group information is set. This project group information identifies the business corresponding to the project group. Then, a project for the front-end code is created within the project group, and the project information is set. This project information identifies the sub-business corresponding to the project. After creating the project, a version number for the front-end code is created within the project. This version number identifies the version sequence number of the iteration of the front-end code. This completes the configuration of the project information corresponding to the front-end code. The project information uniquely identifies the corresponding front-end code, thus facilitating the management of multiple different front-end codebases.

[0073] Step S200: Construct a JAR package based on the front-end code and the project information corresponding to the front-end code, and record the packaging time of the JAR package; wherein, the packaging time is the time to complete the construction of the JAR package;

[0074] In step S200 of some embodiments, the constructed JAR package corresponds to a sealing time, which serves as a timestamp for the JAR package.

[0075] In this application's embodiments, the JAR package refers to a JAR file, generated by packaging the aforementioned front-end code. In the software field, a JAR file (Java Archive) is a software package file format, typically used to aggregate a large number of Java class files, related metadata, and resource files (text, images, etc.) into a single file for developing Java platform applications or libraries. A JAR file is an archive file, built in ZIP format, with the .jar file extension. Users can create or extract JAR files using the jar command included in the JDK. Other zip compression tools can also be used. The filenames within a JAR file are Unicode text. JAR files are not only used for compression and distribution but also for deploying and packaging libraries, components, and plugins, and can be directly used by tools like compilers and the JVM.

[0076] Step S300: Set the effective time for the JAR package and then store it so that the backend can test the JAR package;

[0077] In step S300 of some embodiments, the effective time is the time when the JAR package becomes effective after release; the effective time is set for the JAR package and then stored to ensure that historical data is traceable; the front end adopts the Vue framework and the back end adopts the Java framework, and based on DevOps, the front end sets the effective time for the JAR package and then stores it, and the back end tests the JAR package to achieve efficient delivery and automatic operation and maintenance.

[0078] Step S400: After determining that the backend has completed the testing of the JAR package and the effective time of the JAR package is determined, the JAR package is published and the publication time of the JAR package is recorded; wherein, the effective time is after the publication time.

[0079] In step S400 of some embodiments, after the backend operations team completes the testing of the JAR package, it confirms whether the effective time of the JAR package needs to be updated. If it confirms that it remains unchanged, or resets the effective time of the JAR package, it uploads the JAR package to the CMS via DevOps, along with the effective time of the JAR package. The CMS saves the JAR package and updates the JSON file so that the frontend project is updated to the latest version of the JAR package after the effective time, realizing the early release of the frontend project and its timely activation after the effective time. Because the release time, deployment time, and effective time of the JAR packages in the frontend project are recorded, it is possible to accurately associate each JAR package in the frontend project with the project information corresponding to the JAR package. It is possible to accurately locate and control any JAR package in the frontend project, enabling more complete version switching control for the frontend project, effective control of corresponding version JAR packages, and monitoring of each JAR package in the frontend project, facilitating efficient management of a large number of frontend projects.

[0080] Step S500: Update the resources of the JAR packages that have not yet been released in the front-end project based on the JAR packages that have been released in the front-end project.

[0081] In step S500 of some embodiments, the published JAR package may cause changes in resources. Based on the published JAR package, the resources of the unpublished JAR package in the front-end project are updated to ensure the synchronization and real-time nature of the resources in the front-end project. In this embodiment, resources refer to files such as js files, css files, and images used by the front-end project.

[0082] In steps S100 to S500 of this embodiment, the front-end code to be released in the front-end project is obtained, and the project information corresponding to the front-end code is determined. The project information includes project group information, project information, and version number. The project information uniquely identifies the corresponding front-end code, facilitating the management of multiple different front-end codes. A JAR package is built based on the front-end code and the corresponding project information, and the JAR package's release date is recorded. The release date is the time when the JAR package is completed. Then, an effective date is set for the JAR package, and it is stored so that the back-end can test the JAR package. This ensures historical data traceability and achieves efficient delivery and automated operation and maintenance. By adopting a front-end / back-end separation approach, using a front-end Vue framework and a back-end Java framework, efficient delivery and automated operation and maintenance are achieved. When it is determined that the back-end has completed testing of the JAR package and the effective date of the JAR package is determined, the JAR package is released, and the release date of the JAR package is recorded. The effective date is after the release date. This achieves early release of the front-end project and timely activation after the effective date. Based on the published JAR packages in the aforementioned front-end project, resources for unpublished JAR packages in the same front-end project are updated to ensure the synchronization and real-time nature of resources in the front-end project.

[0083] According to the solution provided in this application, by employing a front-end Vue framework and a back-end Java framework, and storing the JAR packages after setting an effective time, historical data traceability can be ensured. By managing the release time, deployment time, and effective time of different versions of the front-end project, the deployment platform isolates the JAR packages in the front-end project, thereby supporting the early deployment of multiple different JAR packages in the front-end project and ensuring timely effectiveness after the effective time, realizing personalized configuration of front-end project deployment. Based on the deployed JAR packages in the front-end project, resources of undeployed JAR packages in the front-end project are updated, ensuring the synchronization and real-time nature of resources in the front-end project. This allows for refined management of the deployment of a large number of front-end projects and provides personalized configuration.

[0084] Please see Figure 2 In some embodiments, step S200, the construction of the JAR package based on the front-end code and the project information corresponding to the front-end code, may include, but is not limited to, steps S210 to S230:

[0085] Step S210: Determine the node_modules folder corresponding to the project information;

[0086] Step S220: Configure the building modules corresponding to the project information in the node_modules folder;

[0087] Step S230: Obtain the project information corresponding to the front-end code, call the build module to build the front-end code and the project information corresponding to the front-end code, and generate a JAR package.

[0088] It should be noted that in step S200 of some embodiments, the `node_modules` folder is a folder used to store packages downloaded and installed by package management tools after Node.js is installed. Examples include build modules such as webpack, gulp, and grunt. Each project has a corresponding `node_modules` folder, which uniquely corresponds to a version number of the front-end code. The `node_modules` folder contains build modules used to compile and build the front-end code. In one embodiment, it is first determined whether a `node_modules` folder corresponding to the project information exists. If not, a `node_modules` folder corresponding to the project information is manually uploaded, and build modules are configured in the `node_modules` folder. The front-end code is then built into a JAR package using these build modules.

[0089] In some embodiments, such as Figure 3 As shown, step S300 may include, but is not limited to, steps S310 to S330:

[0090] Step S310: Obtain the built JAR package;

[0091] Step S320: Set the effective time of the JAR package, and upload the JAR package to MongoDB after adding the effective time;

[0092] In step S320 of some embodiments, a timestamp is added to the JAR package using project Version Time.json as the effective time of the JAR package, and the JAR package is uploaded to MongoDB deployed on the cloud server after the effective time is added; MongoDB is a database based on distributed file storage, which can persistently store data and ensure that historical data is traceable.

[0093] In step S330, the backend accesses the JAR package in MongoDB via DevOps and tests the JAR package.

[0094] In step S330 of some embodiments, the backend operations and maintenance personnel access the JAR package in MongoDB through DevOps to perform pre-release testing on the JAR package.

[0095] In some embodiments, such as Figure 4 As shown, step S500 may include, but is not limited to, steps S510 to S520:

[0096] Step S510: Set up an independent resource package for each version number of the JAR package in the front-end project, and store the resources of the JAR package in the corresponding resource package;

[0097] In step S510 of some embodiments, the release management of the front-end project requires the management of the version number of the front-end project and the resources corresponding to each version number. Especially when there are multiple parallel JAR packages in the front-end project, independent resource packages are set up for the resources corresponding to the version number of each JAR package for isolated management.

[0098] Step S520: After the JAR package in the front-end project is released, identify the resources that have changed in the front-end project and merge the changed resources in the front-end project into the resource package corresponding to the unreleased JAR package.

[0099] In step S520 of some embodiments, after the JAR package is released, the resources that have changed in the front-end project are merged into the resource package corresponding to the unreleased JAR package to ensure the synchronization of resources in the front-end project.

[0100] In some embodiments, such as Figure 5 As shown, after publishing the JAR package, the method further includes:

[0101] Step S610: Upload the published JAR package from the front-end project to the resource management platform;

[0102] In step S610 of some embodiments, the JAR package published in the front-end project is uploaded to the resource management platform, so that the resources of each published JAR package are uniformly managed in the resource management platform, and the access status of each resource in the resource management platform is statistically analyzed.

[0103] Step S620: Select the JAR packages in the resource management platform that have reached their effective time as effective JAR packages, count the access records of the resources corresponding to the effective JAR packages, and update the resources in the cache in real time based on the access records of the resources corresponding to the effective JAR packages.

[0104] In step S620 of some embodiments, for the front-end project uniformly published on the publishing platform, it is determined whether the JAR package in the resource management platform has reached the effective time. The JAR package in the resource management platform that has reached the effective time is regarded as the effective JAR package. The resources in the effective JAR package can be accessed by users. Based on the actual usage of the resources corresponding to the effective JAR package by users, the access status of the resources is statistically analyzed, a resource access report is output, and an access record of the resources in the published JAR package is formed.

[0105] In some embodiments, such as Figure 6 As shown, in step S620, the step of counting the access records of the resources corresponding to the effective JAR package and updating the resources in the cache in real time based on the access records of the resources corresponding to the effective JAR package may include, but is not limited to, steps S621 to S623:

[0106] Step S621: Obtain the access records of the resources corresponding to the effective JAR package in the resource management platform by means of front-end event tracking.

[0107] Step S622: Determine the access volume of each resource based on the access records of the resources corresponding to the effective JAR package in the resource management platform;

[0108] Step S623: Prioritize caching resources with access volume higher than the first preset access volume threshold, and clear the cache of resources with access volume lower than the second preset access volume threshold; wherein, the first preset access volume threshold is greater than the second preset access volume threshold.

[0109] In step S623 of some embodiments, the first preset access threshold and the second preset access threshold can be preset according to actual conditions. This embodiment does not limit the specific first preset access threshold and the second preset access threshold. If the cache capacity is large, more resources can be stored without affecting access efficiency. The first preset access threshold can be set to a smaller value and the second preset access threshold can be set to a larger value to store more resources. Otherwise, the first preset access threshold is set to a smaller value and the second preset access threshold is set to a larger value. Of course, it can be understood that no matter how it is set, the first preset access threshold is greater than the second preset access threshold.

[0110] In some embodiments, front-end event tracking is used to record access to various resources, and the most frequently accessed resources are selected for high-level caching. Specifically, by recording user resource usage on mobile devices, resources with high usage are calculated in real time and designated as real-time hot resources. These real-time hot resources are then uploaded to a cloud server and automatically refreshed to CDN, etc. By updating the resource access cache in real time, the access performance of the front-end project is improved. Simultaneously, when sending packets on mobile devices, resources that have not been accessed for a period of time are periodically pushed to the corresponding developers. Developers then perform cache cleanup operations on resources that have not been accessed for a period of time or have very low access volume. This, combined with resource access data, maximizes access performance while saving cache space.

[0111] In some embodiments further provided by step S620, by caching real-time popular resources, unified support is provided for the management of H5 and mobile resources. The most frequently accessed resources can be calculated based on user usage, and resources can be managed according to various rules such as the product's own operational requirements. This facilitates user access, saves backend traffic and costs, improves the loading speed of frontend resources, and enhances the user experience.

[0112] In some embodiments, the method further includes:

[0113] If a version anomaly is detected in the front-end project, the version number corresponding to the version anomaly is determined, and the front-end project is switched to a version number prior to the version number corresponding to the version anomaly; wherein, the version anomaly includes either a sealing anomaly or a release anomaly.

[0114] The embodiments provided in this application enable the monitoring and rapid handling of various anomalies. In some embodiments, in the event of a version sealing or release anomaly, the responsible person can be quickly notified via email of the anomaly status of the front-end project, allowing for timely response and handling of the anomaly. The monitoring is comprehensive, and anomalies such as failure to seal a version or failure to release on time can be quickly communicated to the responsible person. If a newly released front-end project version has issues, it can be restored to a specified historical version with one click. The package resources and version records of historical versions are persistently saved. Since resource access can be freely switched to historical versions of already released front-end projects, the system achieves rapid problem response and convenient rollback.

[0115] As can be seen, the embodiments of this application integrate the construction and deployment, and can also combine their own R&D ecosystem to provide personalized functions such as resource access caching and CDN refresh, and are more complete in terms of version switching control, effectiveness control, and monitoring.

[0116] This application provides a method, apparatus, electronic device, and storage medium for deploying a front-end project. The method includes: obtaining front-end code to be released in a front-end project and determining project information corresponding to the front-end code; wherein the project information includes project group information, project information, and version number; constructing a JAR package based on the front-end code and the project information corresponding to the front-end code, and recording the release time of the JAR package; wherein the release time is the time when the JAR package is completed; setting an effective time for the JAR package and storing it so that the back-end can test the JAR package; after determining that the back-end has completed testing the JAR package and determining the effective time of the JAR package, releasing the JAR package and recording the release time of the JAR package; wherein the effective time is after the release time; and updating resources for unreleased JAR packages in the front-end project based on the released JAR packages in the front-end project.

[0117] According to the solution provided in this application embodiment, it is possible to obtain the front-end code to be released in the front-end project and determine the project information corresponding to the front-end code; wherein, the project information includes project group information, project information, and version number; the project information can uniquely identify the corresponding front-end code, thereby facilitating the management of multiple different front-end codes; a JAR package is constructed based on the front-end code and the project information corresponding to the front-end code, and the sealing time of the JAR package is recorded; wherein, the sealing time is the time when the JAR package is completed; then, the effective time is set for the JAR package and stored so that the back-end can test the JAR package; ensuring the traceability of historical data and achieving efficient delivery and automatic operation and maintenance; by adopting a front-end Vue framework and a back-end Java framework, efficient delivery and automatic operation and maintenance are achieved; when it is determined that the back-end has completed the testing of the JAR package and the effective time of the JAR package is determined, the JAR package is released and the release time of the JAR package is recorded; wherein, the effective time is after the release time. This achieves the early release of the front-end project and timely effectiveness after the effective time. Based on the published JAR packages in the aforementioned front-end project, resources for unpublished JAR packages in the same front-end project are updated to ensure the synchronization and real-time nature of resources in the front-end project.

[0118] According to the solution provided in this application, by employing a front-end Vue framework and a back-end Java framework, and storing the JAR packages after setting an effective time, historical data traceability can be ensured. By managing the release time, deployment time, and effective time of different versions of the front-end project, the deployment platform isolates the JAR packages in the front-end project, thereby supporting the early deployment of multiple different JAR packages in the front-end project and ensuring timely effectiveness after the effective time, realizing personalized configuration of front-end project deployment. Based on the deployed JAR packages in the front-end project, resources of undeployed JAR packages in the front-end project are updated, ensuring the synchronization and real-time nature of resources in the front-end project. This allows for refined management of the deployment of a large number of front-end projects and provides personalized configuration.

[0119] Please see Figure 7 This application also provides an apparatus for deploying a front-end project, which can implement the above-described method for deploying a front-end project. The apparatus includes:

[0120] The acquisition module 100 is used to acquire the front-end code to be released in the front-end project and determine the project information corresponding to the front-end code; wherein, the project information includes project group information, project information, and version number;

[0121] The build module 200 is used to build a JAR package based on the front-end code and the project information corresponding to the front-end code, and record the sealing time of the JAR package; wherein, the sealing time is the time to complete the construction of the JAR package;

[0122] The storage module 300 is used to store the JAR package after setting an effective time, so that the backend can test the JAR package;

[0123] The publishing module 400 is used to publish the JAR package and record the publishing time of the JAR package when it is determined that the backend has completed the testing of the JAR package and the effective time of the JAR package is determined; wherein the effective time is after the publishing time.

[0124] The update module 500 is used to update the resources of unreleased JAR packages in the front-end project based on the JAR packages that have been released in the front-end project.

[0125] The specific implementation of the device for deploying the front-end project is basically the same as the specific implementation of the method for deploying the front-end project described above, and will not be repeated here.

[0126] This application also provides an electronic device, which includes: a memory, a processor, a program stored in the memory and executable on the processor, and a data bus for communication between the processor and the memory. When the program is executed by the processor, it implements the aforementioned method for deploying the front-end project. This electronic device can be any smart terminal, including tablet computers, in-vehicle computers, etc.

[0127] Please see Figure 8 , Figure 8 The hardware structure of an electronic device according to another embodiment is illustrated. The electronic device includes:

[0128] The processor 801 can be implemented using a general-purpose CPU (Central Processing Unit), microprocessor, application-specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of this application.

[0129] The memory 802 can be implemented as a read-only memory (ROM), a static storage device, a dynamic storage device, or a random-access memory (RAM). The memory 802 can store the operating system and other applications. When the technical solutions provided in the embodiments of this specification are implemented through software or firmware, the relevant program code is stored in the memory 802 and is called and executed by the processor 801 using the front-end project deployment method of the embodiments of this application.

[0130] The 803 input / output interface is used to implement information input and output.

[0131] The communication interface 804 is used to enable communication and interaction between this device and other devices. Communication can be achieved through wired means (such as USB, Ethernet cable, etc.) or wireless means (such as mobile network, WIFI, Bluetooth, etc.).

[0132] Bus 805 transmits information between various components of the device (e.g., processor 801, memory 802, input / output interface 803, and communication interface 804);

[0133] The processor 801, memory 802, input / output interface 803, and communication interface 804 are connected to each other within the device via bus 805.

[0134] This application also provides a computer-readable storage medium for computer-readable storage, wherein the storage medium stores one or more programs, which can be executed by one or more processors to implement the aforementioned front-end project deployment method.

[0135] Memory, as a non-transitory computer-readable storage medium, can be used to store non-transitory software programs and non-transitory computer-executable programs. Furthermore, memory may include high-speed random access memory, and may also include non-transitory memory, such as at least one disk storage device, flash memory device, or other non-transitory solid-state storage device. In some embodiments, memory may optionally include memory remotely located relative to the processor, and these remote memories can be connected to the processor via a network. Examples of such networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.

[0136] The front-end project deployment method, apparatus, electronic device, and storage medium provided in this application embodiment obtain the front-end code to be released in the front-end project and determine the project information corresponding to the front-end code; wherein, the project information includes project group information, project information, and version number; the project information can uniquely identify the corresponding front-end code, thereby facilitating the management of multiple different front-end codes; a JAR package is constructed based on the front-end code and the project information corresponding to the front-end code, and the sealing time of the JAR package is recorded; wherein, the sealing time is the time when the JAR package is completed; then, an effective time is set for the JAR package and it is stored so that the back-end can test the JAR package; ensuring the traceability of historical data and achieving efficient delivery and automatic operation and maintenance; by adopting a front-end Vue framework and a back-end Java framework, efficient delivery and automatic operation and maintenance are achieved; when it is determined that the back-end has completed the testing of the JAR package and the effective time of the JAR package is determined, the JAR package is released and the release time of the JAR package is recorded; wherein, the effective time is after the release time. This enables the early release of the front-end project and timely effectiveness after the effective time. Based on the published JAR packages in the aforementioned front-end project, resources for unpublished JAR packages in the same front-end project are updated to ensure the synchronization and real-time nature of resources in the front-end project.

[0137] According to the solution provided in this application, by employing a front-end Vue framework and a back-end Java framework, and storing the JAR packages after setting an effective time, historical data traceability can be ensured. By managing the release time, deployment time, and effective time of different versions of the front-end project, the deployment platform isolates the JAR packages in the front-end project, thereby supporting the early deployment of multiple different JAR packages in the front-end project and ensuring timely effectiveness after the effective time, realizing personalized configuration of front-end project deployment. Based on the deployed JAR packages in the front-end project, resources of undeployed JAR packages in the front-end project are updated, ensuring the synchronization and real-time nature of resources in the front-end project. This allows for refined management of the deployment of a large number of front-end projects and provides personalized configuration.

[0138] The embodiments described in this application are for the purpose of more clearly illustrating the technical solutions of the embodiments of this application, and do not constitute a limitation on the technical solutions provided by the embodiments of this application. As those skilled in the art will know, with the evolution of technology and the emergence of new application scenarios, the technical solutions provided by the embodiments of this application are also applicable to similar technical problems.

[0139] It will be understood by those skilled in the art that Figures 1-6 The technical solutions shown do not constitute a limitation on the embodiments of this application, and may include more or fewer steps than shown, or combine certain steps, or different steps.

[0140] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs.

[0141] Those skilled in the art will understand that all or some of the steps in the methods disclosed above, as well as the functional modules / units in the systems and devices, can be implemented as software, firmware, hardware, or suitable combinations thereof.

[0142] The terms “first,” “second,” “third,” “fourth,” etc. (if present) in the specification and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms “comprising” and “having,” and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0143] It should be understood that in this application, "at least one (item)" means one or more, and "more than" means two or more. "And / or" is used to describe the relationship between related objects, indicating that three relationships can exist. For example, "A and / or B" can represent three cases: only A exists, only B exists, and both A and B exist simultaneously, where A and B can be singular or plural. The character " / " generally indicates that the preceding and following related objects are in an "or" relationship. "At least one (item) of the following" or similar expressions refer to any combination of these items, including any combination of single or plural items. For example, at least one (item) of a, b, or c can represent: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, and c can be single or multiple.

[0144] In the several embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or units may be electrical, mechanical, or other forms.

[0145] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0146] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0147] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes multiple instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing programs, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0148] The preferred embodiments of the present application have been described above with reference to the accompanying drawings, but this does not limit the scope of the claims of the present application. Any modifications, equivalent substitutions, and improvements made by those skilled in the art without departing from the scope and substance of the embodiments of the present application shall be within the scope of the claims of the present application.

Claims

1. A method for deploying a front-end project, characterized in that, The method includes: Obtain the front-end code to be released in the front-end project, and determine the project information corresponding to the front-end code; wherein, the project information includes project group information, project information, and version number; A JAR package is constructed based on the front-end code and the project information corresponding to the front-end code, and the sealing time of the JAR package is recorded; wherein, the sealing time is the time when the JAR package is completed; The JAR package is stored after an effective time is set so that the backend can test the JAR package; Once it is determined that the backend has completed testing of the JAR package and the effective time of the JAR package is determined, the JAR package is released and the release time of the JAR package is recorded; wherein, the effective time is after the release time; Update resources for unreleased JAR packages in the front-end project based on the JAR packages that have been released in the front-end project; Upload the published JAR files from the front-end project to the resource management platform; The JAR packages that have reached their effective time in the resource management platform are designated as effective JAR packages. Access records of the resources corresponding to the effective JAR packages are counted, and the resources in the cache are updated in real time based on the access records of the resources corresponding to the effective JAR packages. The step of statistically analyzing the access records of the resources corresponding to the effective JAR package, and updating the cached resources in real time based on the access records of the resources corresponding to the effective JAR package, includes: Access records of the resources corresponding to the effective JAR package in the resource management platform are obtained through front-end event tracking. The access volume of each resource is determined based on the access records of the resources corresponding to the effective JAR packages in the resource management platform. Resources with access volume exceeding a first preset access volume threshold are cached first, while resources with access volume below a second preset access volume threshold are cached and cleared; wherein, the first preset access volume threshold is greater than the second preset access volume threshold.

2. The method according to claim 1, characterized in that, The process of building a JAR package based on the front-end code and the project information corresponding to the front-end code includes: Identify the node_modules folder corresponding to the project information; Configure the building modules corresponding to the project information in the node_modules folder; Obtain the project information corresponding to the front-end code, call the build module to build the front-end code and the project information corresponding to the front-end code, and generate a JAR package.

3. The method according to claim 1, characterized in that, The step of setting an effective time for the JAR file and then storing it so that the backend can test the JAR file includes: Obtain the generated JAR file; Set the effective time of the JAR package, and upload the JAR package to MongoDB after adding the effective time; The backend accesses the JAR package in MongoDB via DevOps and tests the JAR package.

4. The method according to claim 1, characterized in that, The process of updating resources for unreleased JAR packages in the front-end project based on the released JAR packages in the front-end project includes: For each version number of the JAR package in the front-end project, set up an independent resource package and store the resources of the JAR package in the corresponding resource package; After the JAR package in the front-end project is released, identify the resources in the front-end project that have changed, and merge the changed resources in the front-end project into the resource package corresponding to the unreleased JAR package.

5. The method according to any one of claims 1 to 4, characterized in that, The method further includes: If a version anomaly is detected in the front-end project, the version number corresponding to the version anomaly is determined, and the front-end project is switched to a version number prior to the version number corresponding to the version anomaly; wherein, the version anomaly includes either a sealing anomaly or a release anomaly.

6. An apparatus for deploying a front-end project, characterized in that, The apparatus used in the method for deploying a front-end project according to any one of claims 1 to 5 includes: The acquisition module is used to acquire the front-end code to be released in the front-end project and determine the project information corresponding to the front-end code; wherein, the project information includes project group information, project information, and version number; A build module is used to build a JAR package based on the front-end code and the project information corresponding to the front-end code, and record the packaging time of the JAR package; wherein, the packaging time is the time to complete the construction of the JAR package; The storage module is used to store the JAR package after setting an effective time, so that the backend can test the JAR package; The publishing module is used to publish the JAR package and record the publishing time of the JAR package after determining that the backend has completed testing of the JAR package and the effective time of the JAR package has been determined; wherein the effective time is after the publishing time. The update module is used to update the resources of unreleased JAR packages in the front-end project based on the JAR packages that have been released in the front-end project.

7. An electronic device, characterized in that, The electronic device includes a memory, a processor, a program stored in the memory and executable on the processor, and a data bus for enabling communication between the processor and the memory, wherein the program, when executed by the processor, implements the steps of the method as described in any one of claims 1 to 5.

8. A computer-readable storage medium for computer-readable storage, characterized in that, The storage medium stores one or more programs, which can be executed by one or more processors to implement the steps of the method according to any one of claims 1 to 5.

Citation Information

Patent Citations

  • Project version release management method and device, electronic equipment and computer readable medium

    CN113504939A