Service module configuration method and device

By dynamically obtaining and configuring business modules in front-end engineering projects, and splitting and merging using general template files, the problems of high coupling between modules and inflexible configuration are solved, and high scalability and flexible business module configuration are achieved.

CN119576316AActive Publication Date: 2025-03-07CHINA CONSTRUCTION BANK +1
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
CN202411625997.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-14
Publication Date
2025-03-07
Estimated Expiration
2044-11-14

AI Technical Summary

Technical Problem

In the prior art, front-end modular development has high coupling between modules, resulting in increased code complexity, affecting the scalability and maintainability of the system, and the configuration is not flexible enough to meet the rapidly changing business needs.

Method used

When monitoring the start-up exception of the front-end project project, obtain the business module, define the update or addition of the business submodule according to the business needs, configure the general template file, and configure the packaging request based on the scale of the front-end project project, determine whether there are configuration parameters, match the business submodule to be packaged and determine the packaging method. Finally, split or merge the business submodule based on the general template file to be packaged, and perform page packaging.

Benefits of technology

It effectively reduces the coupling between business modules, improves the scalability and maintainability of the system, supports the dynamic loading and configuration of business submodules, meets the rapidly changing business needs, and realizes the independent packaging and deployment of business modules.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119576316A_ABST
    Figure CN119576316A_ABST
Patent Text Reader

Abstract

The invention discloses a service module configuration method and device, and relates to the front-end technical field, the method comprises the following steps: when monitoring that a front-end engineering project is started abnormally, obtaining a service module under the project, the service module being defined according to a service demand; the service requirements at least comprise a service sub-module updating requirement and a service sub-module newly-added requirement; configuring a universal template file for the service module; receiving a packaging request configured according to the scale to which the project belongs, judging whether configuration parameters exist in the packaging request or not, matching a to-be-packaged service sub-module which comprises an updated service sub-module or a newly added service sub-module according to a judgment result, and determining a packaging mode according to the packaging mode and based on a universal template file. And splitting and / or merging the to-be-packaged business sub-modules from the business main module, and then packaging pages to obtain a packaged file. According to the invention, decoupling and flexible configuration between the service modules can be effectively realized, the service requirement of rapid change can be met, and the expansibility is relatively high.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of front-end technology, and in particular to a configuration method and device for a service module. Background Art

[0002] In the field of front-end technology, modular development is a common practice that improves code reusability and maintainability by splitting functions into independent modules. However, traditional modular development methods often have the problem of high coupling between modules. Highly coupled modules increase the complexity of the code and also affect the scalability and maintainability of the system. In addition, tight coupling between modules is not conducive to the dynamic loading and configuration of sub-modules, making it difficult to meet rapidly changing business needs.

[0003] At present, existing technologies achieve decoupling between modules by defining unified interfaces and specifications. These solutions usually include the design of main modules and sub-modules. The main module is responsible for overall management and scheduling, and the sub-module is responsible for specific business logic. Although these solutions reduce the coupling between modules to a certain extent, there are still some problems, such as inflexible configuration and limited scalability.

[0004] To address the above problems, no effective solution has been proposed yet. Summary of the invention

[0005] The embodiments of the present specification provide a method and device for configuring a service module to solve the problems of high coupling between modules, inflexible module configuration, and limited expansibility in the prior art.

[0006] In a first aspect, an embodiment of the present specification provides a method for configuring a service module, the method comprising:

[0007] When an abnormal start of a front-end engineering project is detected, a business module under the front-end engineering project is obtained, the business module includes multiple business sub-modules and corresponding business main modules, and the business module is defined according to business requirements; the business requirements at least include business sub-module update requirements and business sub-module addition requirements. When the business requirement is a business sub-module update requirement, the multiple business sub-modules are configured to include the updated business sub-modules, and when the business requirement is a business sub-module addition requirement, the multiple business sub-modules are configured to include the newly added business sub-modules;

[0008] The same general template file is configured for the business modules, and the general template file is a basic file for splitting or merging the business modules;

[0009] Receiving a packaging request configured according to the scale of the front-end engineering project, determining whether there are configuration parameters in the packaging request, and matching the business sub-modules to be packaged from the multiple business sub-modules according to the determination result, and determining the packaging method corresponding to the business sub-modules to be packaged; the business sub-modules to be packaged include the updated business sub-modules or the newly added business sub-modules;

[0010] According to the packaging method, based on the general template file, the business sub-modules to be packaged are split and / or merged from the business main module, and then page packaging is performed to obtain a packaging file.

[0011] In some embodiments, when the business requirement is a business submodule update requirement, configuring the multiple business submodules to include an updated business submodule includes:

[0012] Convert multiple business sub-modules into multiple independent business module plug-ins, and convert the target business sub-module carried by the business sub-module update requirements into the target business sub-module plug-in;

[0013] When the business requirement is a business submodule update requirement, the business submodule plug-in to be updated among the multiple business module plug-ins is replaced with a target business submodule plug-in, and the target business submodule plug-in is used as the updated business submodule.

[0014] In some embodiments, when the business demand is a new demand for a business submodule, configuring the multiple business submodules to include a new business submodule includes:

[0015] Convert the new business submodule with the new business submodule added demand into the new business submodule plug-in;

[0016] When the business demand is a new demand for a business submodule, the new business submodule plug-in is loaded into the business main module, and the new business submodule plug-in is used as the new business submodule.

[0017] In some embodiments, configuring the same general template file for the business modules includes:

[0018] Configure the internal files of the business module, the internal files include temp files;

[0019] Using the output file corresponding to the internal file as the general template file of the business module, the output file includes the outTemp file;

[0020] The execution instruction of the general template file is called, and based on the execution instruction, the business modules have the same general template file.

[0021] In some embodiments, the packaging request configured according to the scale of the front-end engineering project includes:

[0022] When the scale of the front-end engineering project is small, the configuration packaging request is a full packaging request, and there is no configuration parameter in the full packaging request;

[0023] When the scale of the front-end engineering project is large-scale, the configuration packaging request is a specified module packaging request, and the specified module packaging request contains configuration parameters.

[0024] In some embodiments, the determining whether there is a configuration parameter in the packaging request includes:

[0025] Calling a configuration parameter separation instruction from a preset configuration file, wherein the configuration parameter separation instruction includes a string separation function;

[0026] Using the string separation function, determining whether configuration parameters can be separated from the packaging request;

[0027] If so, determining that there are configuration parameters in the packaging request;

[0028] If not, it is determined that no configuration parameters exist in the packaging request.

[0029] In some embodiments, matching the to-be-packaged business submodules from the multiple business submodules according to the judgment result and determining the packaging method corresponding to the to-be-packaged business submodules includes:

[0030] When it is determined that there are configuration parameters in the packaging request, a splitting instruction is called from a preset configuration file, wherein the splitting instruction includes a string splitting function;

[0031] Using the string splitting function, split the configuration parameter into multiple sub-configuration parameters;

[0032] According to the multiple sub-configuration parameters, a designated module is matched from multiple business sub-modules as the business sub-module to be packaged, and a packaging method corresponding to the business sub-module to be packaged is determined as designated module packaging;

[0033] When it is determined that no configuration parameters exist in the packaging request, multiple business sub-modules are used as business sub-modules to be packaged, and the packaging method corresponding to the business sub-modules to be packaged is determined to be full packaging.

[0034] In some embodiments, according to the packaging method, based on the general template file, the business sub-modules to be packaged are split or merged from the business main module, and then page packaging is performed, including:

[0035] When the packaging method is full packaging, based on the general template file, multiple business sub-modules are split from the business main module and merged, and then the merged multiple business sub-modules are packaged into an independent page as a packaging file;

[0036] When the packaging method is designated module packaging, the designated modules are separated from the business main module based on the general template file, and then the separated designated modules are packaged into corresponding independent pages as packaging files.

[0037] In a second aspect, an embodiment of the present specification further provides a device for configuring a service module, the device comprising:

[0038] An acquisition module is used to acquire a business module under the front-end engineering project when an abnormal startup of the front-end engineering project is detected, wherein the business module includes multiple business sub-modules and corresponding business main modules, and the business module is defined according to business requirements; the business requirements at least include business sub-module update requirements and business sub-module addition requirements, and when the business requirement is a business sub-module update requirement, the multiple business sub-modules are configured to include the updated business sub-modules, and when the business requirement is a business sub-module addition requirement, the multiple business sub-modules are configured to include the newly added business sub-modules;

[0039] A configuration module, used to configure the same general template file for the business modules, wherein the general template file is a basic file for splitting or merging the business modules;

[0040] A determination module is used to receive a packaging request configured according to the scale of the front-end engineering project, determine whether there are configuration parameters in the packaging request, and match the business sub-modules to be packaged from the multiple business sub-modules according to the determination result, and determine the packaging method corresponding to the business sub-modules to be packaged; the business sub-modules to be packaged include the updated business sub-modules or the newly added business sub-modules;

[0041] The packaging module is used to split and / or merge the business sub-modules to be packaged from the business main module according to the packaging method and based on the general template file, and then perform page packaging to obtain a packaging file.

[0042] In a third aspect, an embodiment of the present specification also provides a computer device, including a memory, a processor, and a computer program / instructions stored in the memory, wherein the processor executes the computer program / instructions to implement the steps of the above-mentioned business module configuration method.

[0043] In a fourth aspect, the embodiments of this specification further provide a computer-readable storage medium having a computer program / instruction stored thereon, which implements the steps of the above-mentioned business module configuration method when the computer program / instruction is executed by a processor.

[0044] In a fifth aspect, the embodiments of this specification also provide a computer program product, and when the computer program / instructions are executed by a processor, the steps of the configuration method of the above-mentioned business module are implemented.

[0045] The embodiment of this specification provides a method and device for configuring a business module. First, when a front-end engineering project is detected to be abnormal in startup, the business module under the front-end engineering project is obtained. The business module includes multiple business sub-modules and corresponding business main modules. The business module is defined according to business requirements. The business requirements at least include business sub-module update requirements and business sub-module new requirements. When the business requirements are business sub-module update requirements, the multiple business sub-modules are configured to include updated business sub-modules. When the business requirements are business sub-module new requirements, the multiple business sub-modules are configured to include new business sub-modules. Then, the same general template file is configured for the business modules, and the general template file is the basic file for splitting or merging the business modules. Then, a packaging request configured according to the scale of the front-end engineering project is received, and it is determined whether there are configuration parameters in the packaging request, and the business sub-modules to be packaged are matched from the multiple business sub-modules according to the judgment result, and the packaging method corresponding to the business sub-modules to be packaged is determined, and the business sub-modules to be packaged include the updated business sub-modules or the new business sub-modules. Finally, according to the packaging method, based on the general template file, the business submodules to be packaged are split and / or merged from the business main module, and then the page is packaged to obtain a packaged file. In the embodiment of this specification, when the front-end engineering project is detected to be abnormally started, the business module under the project is automatically obtained, and the decoupling between the business modules is performed, which can effectively solve the problem of abnormal startup of the front-end project. By setting the business module, it can be defined according to business needs, and the business submodule can include updated business submodules and newly added business submodules in the configuration business submodule, so that the business module configuration is more flexible and can meet the rapidly changing business needs. By configuring the general template file for the business module, the foundation can be laid for the splitting or merging of the business module. By configuring the packaging request according to the scale of the front-end engineering project, it is suitable for projects of different scales, and the development and maintenance efficiency of projects of different scales can be improved. By judging whether there are configuration parameters in the packaging request, the business submodules to be packaged and the corresponding packaging method can be accurately determined, and the business submodules to be packaged also include updated business submodules or newly added business submodules, so as to meet the business needs of users. Finally, according to the packaging method and based on the general template file, the business sub-modules to be packaged can be split and / or merged from the business main module, and then page packaging can be performed, so as to realize independent packaging and deployment of the business module, effectively reduce the coupling degree between multiple business sub-modules and the business main module in the business module, improve the reusability and maintainability of the code, and have strong scalability to support the integration of new businesses. BRIEF DESCRIPTION OF THE DRAWINGS

[0046] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the prior art descriptions. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work. In the drawings:

[0047] Figure 1 It is a flowchart of a method for configuring a service module provided in an embodiment of this specification;

[0048] Figure 2 It is a schematic diagram of an embodiment of a configuration method of a service module provided by an embodiment of this specification, in a scenario example;

[0049] Figure 3 It is a schematic diagram of an embodiment of a configuration method of a service module provided by an embodiment of this specification, in a scenario example;

[0050] Figure 4 It is a schematic diagram of an embodiment of a configuration method of a service module provided by an embodiment of this specification, in a scenario example;

[0051] Figure 5 It is a schematic diagram of an embodiment of a configuration method of a service module provided by an embodiment of this specification, in a scenario example;

[0052] Figure 6 It is a schematic diagram of the structure of a configuration device for a service module provided in an embodiment of this specification;

[0053] Figure 7 It is a schematic diagram of the structural composition of an electronic device provided in an embodiment of this specification. DETAILED DESCRIPTION

[0054] In order to enable those skilled in the art to better understand the technical solutions in this specification, the technical solutions in the embodiments of this specification will be clearly and completely described below in conjunction with the drawings in the embodiments of this specification. Obviously, the described embodiments are only part of the embodiments of this specification, not all of the embodiments. Based on the embodiments in this specification, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of this specification.

[0055] In the field of front-end technology, modular development is a common practice. By splitting functions into independent modules, the reusability and maintainability of the code can be improved. However, the traditional modular development method often has the problem of high coupling between modules.

[0056] To solve this problem, some existing technical solutions attempt to achieve decoupling between modules by defining unified interfaces and specifications. These solutions usually include the design of main modules and sub-modules, where the main module is responsible for overall management and scheduling, and the sub-module is responsible for specific business logic. Although these solutions reduce the coupling between modules to a certain extent, there are still some problems, such as inflexible configuration and limited scalability.

[0057] However, the existing technology has the following problems: the coupling degree between modules is high, which makes system maintenance and expansion difficult; the configuration is not flexible enough to meet rapidly changing business needs; the scalability is limited and cannot well support the rapid integration of new businesses.

[0058] In view of the above problems existing in the prior art, this application considers introducing a configuration method and device for a business module, which can achieve effective decoupling between multiple business sub-modules and the business main module, effectively reduce the coupling between multiple business sub-modules and the business main module, and improve the scalability and maintainability of the system. At the same time, it also supports dynamic loading and configuration of multiple business sub-modules to meet rapidly changing business needs.

[0059] It should be noted that the user-related information and data involved in the embodiments of this specification are all information and data authorized by the user or fully authorized by relevant parties, and the collection, storage, use, processing, transmission, provision, disclosure and application of the relevant data comply with relevant laws, regulations and standards, take necessary confidentiality measures, do not violate public order and good morals, and provide corresponding operation entrances for users or relevant parties to choose to authorize or refuse.

[0060] It should also be noted that in the embodiments of this specification, certain software, components, models and other existing solutions in the industry may be mentioned. They should be regarded as exemplary. Their purpose is only to illustrate the feasibility of implementing the technical solution of this application, but it does not mean that the applicant has or will necessarily use the solution.

[0061] Figure 1It is a flowchart of a method for configuring a business module provided in an embodiment of this specification. Although this specification provides method operation steps or device structures as shown in the following embodiments or drawings, the method or device may include more or fewer operation steps or module units after partial merger based on routine or no creative labor. In the steps or structures that do not logically have a necessary causal relationship, the execution order of these steps or the module structure of the device is not limited to the execution order or module structure shown in the embodiments or drawings of this specification. When the method or module structure is applied in an actual device, server or terminal product, it can be executed sequentially or in parallel according to the method or module structure shown in the embodiments or drawings (for example, in an environment of parallel processors or multi-threaded processing, or even including distributed processing, server cluster implementation environment). For specific implementation, refer to Figure 1 As shown, the method may include the following contents.

[0062] S101: When an abnormal startup of a front-end engineering project is detected, a business module under the front-end engineering project is obtained, the business module includes multiple business sub-modules and corresponding business main modules, and the business module is defined according to business requirements; the business requirements at least include business sub-module update requirements and business sub-module addition requirements, when the business requirement is a business sub-module update requirement, the multiple business sub-modules are configured to include the updated business sub-module, and when the business requirement is a business sub-module addition requirement, the multiple business sub-modules are configured to include the newly added business sub-module.

[0063] S102: configuring the same general template file for the business modules, where the general template file is a basic file for splitting or merging the business modules.

[0064] S103: Receive a packaging request configured according to the scale of the front-end engineering project, determine whether there are configuration parameters in the packaging request, and match the business sub-modules to be packaged from the multiple business sub-modules according to the judgment result, and determine the packaging method corresponding to the business sub-modules to be packaged; the business sub-modules to be packaged include the updated business sub-modules or the newly added business sub-modules.

[0065] S104: According to the packaging method, based on the general template file, the business sub-modules to be packaged are split and / or merged from the business main module, and then page packaging is performed to obtain a packaging file.

[0066] Based on the above embodiment, when the front-end engineering project is detected to be abnormal in startup, the business module under the front-end engineering project is automatically obtained to decouple the modules, which can effectively solve the problem of abnormal startup of the front-end project. The business module is defined according to the business needs, and the configuration business submodule can include the updated business submodule and the newly added business submodule, so that the business module configuration is more flexible and can meet the rapidly changing business needs. Then the same general template file is configured for the business module, which can lay the foundation for the splitting or merging of the business module. On this basis, a packaging request configured according to the scale of the front-end engineering project is received, and it is determined whether there are configuration parameters in the packaging request, so that the business submodule to be packaged and the corresponding packaging method can be accurately determined. The business submodule to be packaged also includes the updated business submodule or the newly added business submodule, so that the business needs of users can be met. At the same time, it is suitable for projects of different scales and can improve the development and maintenance efficiency of projects of different scales. Finally, according to the packaging method, based on the general template file, the business sub-modules to be packaged are split and / or merged from the business main module, and then the pages are packaged, so that the independent packaging and deployment of the business module can be realized, which effectively reduces the coupling degree between multiple business sub-modules and the business main module in the business module, improves the reusability and maintainability of the code, has strong scalability, and can support the integration of new businesses.

[0067] In some embodiments, the configuration method of the above-mentioned service module can be specifically applied to a server side, wherein the server can be connected to a user terminal.

[0068] In this embodiment, the server may specifically include a background server applied to one side of the network service platform, capable of realizing functions such as data transmission and data processing. Specifically, the server may be, for example, an electronic device having data calculation, storage and network interaction functions. Alternatively, the server may also be a software program running in the electronic device to provide support for data processing, storage and network interaction. In this embodiment, the number of the servers is not specifically limited. The server may specifically be one server, or several servers, or a server cluster formed by several servers.

[0069] The user terminal may specifically include a front end applied to the user side and capable of realizing functions such as data collection and data transmission. Specifically, the user terminal may be, for example, an electronic device such as a desktop computer, a tablet computer, a laptop computer, a smart phone, etc. Alternatively, the user terminal may also be a software application that can run in the above electronic devices.

[0070] The above-mentioned users may specifically be developers of the network service platform, and the target users of this specification may refer to developers.

[0071] Before the specific implementation, the target user can determine the business requirements for the business module configuration and send the business requirements to the server through the user terminal. The target user can also configure the packaging request according to the scale of the front-end engineering project and send it to the server so that the server can perform packaging and other processing in time.

[0072] In the specific implementation, the server can first monitor whether there is a startup abnormality in the front-end engineering project, such as whether there is a situation where the front-end engineering project cannot be started or starts slowly. If the front-end engineering project is detected to be abnormal in startup, the configuration method of the business module provided by the embodiment of the present application can be automatically triggered to automatically obtain multiple business sub-modules and corresponding business main modules under the front-end engineering project, realize the effective decoupling of multiple business sub-modules and business main modules, and support the flexible configuration and expansion of multiple business sub-modules to meet the rapidly changing business needs. Specifically, first, the business module under the front-end engineering project can be obtained first. The business module can include multiple business sub-modules and corresponding business main modules, and then send the business needs according to the received target user, and then define the acquired business module, so that the business module configuration is more flexible and can meet the rapidly changing business needs. Then, the server can configure a general template file for the business module so that the business modules all have consistent or identical general template files, thereby laying the foundation for the splitting or merging of business modules. Then, the server can receive the packaging request. Since the packaging request is configured according to the scale of the front-end engineering project, the server packaging process (such as page packaging) is applicable to projects of different scales. Then, it is determined whether there are configuration parameters in the packaging request, so that the business sub-modules to be packaged can be matched from multiple business sub-modules according to the judgment result, and the packaging method corresponding to the business sub-modules to be packaged can be determined. The business sub-modules to be packaged include the updated business sub-modules or the newly added business sub-modules, so as to meet the business needs of users. Finally, according to the packaging method, based on the general template file, the business sub-modules to be packaged are split and / or merged from the business main module, and then the page is packaged to obtain a packaging file, which can effectively realize the decoupling of multiple business sub-modules and the business main module, reduce the coupling degree of multiple business sub-modules and the business main module, and improve the scalability and maintainability of the system.

[0073] In some embodiments, the front-end engineering project in S101 above may refer to a Web application or website project built using a series of engineering methods and technologies throughout the entire life cycle from demand analysis, design, coding to testing, deployment and maintenance. When it is detected that there is a startup anomaly in the front-end engineering project, the business modules under the front-end engineering project can be automatically obtained to decouple the modules so that the front-end engineering project can be started normally. The scale of the front-end engineering project varies, and the business modules under it can be configured and decoupled in different ways according to the scale of the front-end engineering project (such as: full packaging, specified module packaging, etc.).

[0074] In some embodiments, when the business requirement in S101 is a business submodule update requirement, configuring the multiple business submodules to include an updated business submodule may include:

[0075] S11: converting multiple business sub-modules into multiple independent business module plug-ins, and converting a target business sub-module carried by a business sub-module update requirement into a target business sub-module plug-in;

[0076] S12: When the business requirement is a business submodule update requirement, a business submodule plug-in to be updated among multiple business module plug-ins is replaced with a target business submodule plug-in, and the target business submodule plug-in is used as an updated business submodule.

[0077] In some embodiments, when the business demand in S101 is a new demand for a business submodule, configuring the multiple business submodules to include a new business submodule may include:

[0078] S13: converting the newly added business submodule with the newly added business submodule into a newly added business submodule plug-in;

[0079] S14: When the business demand is a demand for adding a new business sub-module, the new business sub-module plug-in is loaded into the business main module, and the new business sub-module plug-in is used as the new business sub-module.

[0080] In the above embodiment, in order to improve the flexibility of business module configuration and meet rapidly changing business needs, the server can receive business needs sent by target users in real time, and the business needs can include at least one of the following: business submodule update needs, business submodule new addition needs. When the business needs are business submodule update needs or business submodule new addition needs, a plug-in extension mechanism can be introduced to convert the corresponding business module into a plug-in. Each plug-in can be independently developed, tested and deployed, but all converted plug-ins are managed by the business main module, thereby realizing modular management, rapid business expansion and customization.

[0081] Specifically, multiple business submodules can be converted into multiple independent business module plug-ins, the target business submodule carried by the business submodule update requirement can be converted into the target business submodule plug-in, or the business submodule new requirement carrying the new business submodule can be converted into the new business submodule plug-in. Afterwards, when the business requirement is a business submodule update requirement, the business submodule plug-in to be updated can be replaced with the target business submodule plug-in, thereby realizing the update of the business submodule plug-in to be updated, that is, the business submodule A to be updated can be updated to the target business submodule plug-in A1. When the business requirement is a new requirement for a business submodule, the new business submodule plug-in can be loaded into the business main module. This way of loading plug-ins will not affect the normal operation of the business main module.

[0082] For example: in an e-commerce platform, the main business module can be the main application, and multiple business sub-modules can be: payment function module, product management function module, user management function module, etc. The payment function module, product management function module, user management function module, etc. can be converted into multiple independent plug-ins. If the business needs to add or update a certain function module, it only needs to load or replace the corresponding plug-in to achieve it, and this process will not affect the operation of the main application. Of course, when a business sub-module is not needed, its corresponding plug-in can be uninstalled, etc., which can effectively improve the scalability and maintainability of the system, realize the flexible configuration of business modules, and meet rapidly changing business needs.

[0083] In some embodiments, see Figure 2 As shown, configuring the same general template file for the business modules in S102 may include, in specific implementation, the following:

[0084] S21: configuring the internal files of the business module, wherein the internal files include temp files;

[0085] S22: Using the output file corresponding to the internal file as the general template file of the business module, the output file includes the outTemp file;

[0086] S23: Calling the execution instruction of the common template file, and making the business modules have the same common template file based on the execution instruction.

[0087] In this embodiment, configuring the general template file of the business template is the basis for ensuring the smooth splitting or merging of the business modules. The configured general template file may include a temp file, and the outTemp file (output file) corresponding to the temp file may be defined as the general template file for all global business modules, and then the node instruction or command is called to keep the general template files of all business modules consistent, so that a set of basic templates can be shared during development and packaging.

[0088] Specifically, you can first configure the internal file of the business module, that is, the temp file, and then use the output file corresponding to the internal file, that is, the outTemp file, as the general template file of the business module. Finally, you can call the execution instruction of the general template file, such as the node instruction or command. Based on the execution instruction, all business modules have the same general template file. In this way, the basic development templates (that is, the general template file) of all modules can be kept consistent, and the same set of basic templates can be shared during development and packaging. At this time, configure the corresponding execution command, which can be directly executed during development and packaging, ensuring that the general template files of each module are consistent for each module.

[0089] In some embodiments, the packaging request configured according to the scale of the front-end engineering project in S103 may include:

[0090] When the scale of the front-end engineering project is small, the configuration packaging request is a full packaging request, and there is no configuration parameter in the full packaging request;

[0091] When the scale of the front-end engineering project is large-scale, the configuration packaging request is a specified module packaging request, and the specified module packaging request contains configuration parameters.

[0092] In this embodiment, the target user (such as a developer) can configure a packaging request according to the scale of the front-end engineering project, and then send the packaging request to the server for different processing. This can avoid projects of different scales using the same packaging processing method, which further causes problems such as slow project startup or inconvenient code deployment.

[0093] Specifically, when the scale of the front-end engineering project is small, the packaging request can be configured as a full packaging request, and the full packaging request can be set to have no configuration parameters, so that when the server determines that there are no configuration parameters in the packaging request, it can perform full packaging of the corresponding business sub-module to be packaged, making code deployment more convenient. When the scale of the front-end engineering project is large, the packaging request can be configured as a specified module packaging request, and the specified module packaging request can be set to have configuration parameters, so that when the server determines that there are configuration parameters in the packaging request, it can perform specified module packaging of the corresponding business sub-module to be packaged, preventing direct merging and packaging from causing memory overflow or very slow project startup.

[0094] Among them, the configured packaging request can be represented by the build command, specifically: vue-cli-service build--mode prod----packPage=xxx, the vue-cli-service build in this command is a command provided by Vue CLI, which is used to package resource files and prepare for application deployment, mode prod specifies the operating mode as production mode, package=xxx The two dashes here represent passing parameters to the build tool, and package=xxx is a custom parameter used to pass specific configurations or data during the build process. The purpose of this command is to build the Vue project in production mode and pass a custom parameter package=xxx. Among them, the custom parameter package=xxx can be used to specify the target package name, version number or any other information that needs to be used in the build process. In this manual, you can customize the business sub-modules to be packaged and the corresponding packaging method, which is highly flexible and scalable.

[0095] In some embodiments, see Figure 3 As shown, the determination of whether there are configuration parameters in the packaging request in S103 may include:

[0096] S31: calling a configuration parameter separation instruction from a preset configuration file, wherein the configuration parameter separation instruction includes a string separation function;

[0097] S32: using the string separation function, determining whether configuration parameters can be separated from the packaging request;

[0098] S321: If yes, determine that there are configuration parameters in the packaging request;

[0099] S322: If not, determine that there is no configuration parameter in the packaging request.

[0100] In some embodiments, see Figure 4 As shown, the above S103, matching the to-be-packaged business submodules from the multiple business submodules according to the judgment result and determining the packaging method corresponding to the to-be-packaged business submodules, when specifically implemented, may include:

[0101] S41: When it is determined that there are configuration parameters in the packaging request, calling a splitting instruction from a preset configuration file, wherein the splitting instruction includes a string splitting function;

[0102] S42: using the string splitting function, splitting the configuration parameter into a plurality of sub-configuration parameters;

[0103] S43: According to the multiple sub-configuration parameters, a designated module is matched from multiple business sub-modules as the business sub-module to be packaged, and a packaging method corresponding to the business sub-module to be packaged is determined as designated module packaging;

[0104] S44: When it is determined that there is no configuration parameter in the packaging request, multiple business sub-modules are used as business sub-modules to be packaged, and the packaging method corresponding to the business sub-modules to be packaged is determined to be full packaging.

[0105] In the above embodiment, the business submodules that need to be packaged can be effectively separated through parameter configuration interception as the above-mentioned business submodules to be packaged. The specific process of parameter configuration interception is: in the config file, through the command[i].startsWith('--packPage='), to determine and intercept and analyze the parameter xxx, for example: --packPack=acct, then through command[i].split['='][1] to get the corresponding business submodule that needs to be packaged. When this parameter is not configured, it is a full package with index as the entry.

[0106] Specifically, a configuration parameter separation instruction can be called from a preset configuration file. The configuration parameter separation instruction can include a string parsing function. The string separation function can be used to make judgments and intercept and analyze configuration parameters. That is, the string separation function can be used to determine whether the configuration parameters can be separated from the packaging request. If so, it is determined that the configuration parameters exist in the packaging request. Otherwise, it is determined that the configuration parameters do not exist in the packaging request.

[0107] When it is determined that there are configuration parameters in the packaging request, a split instruction is called from a preset configuration file. The split instruction may include a string splitting function. The separated configuration parameters may be further split using the string splitting function to obtain multiple sub-configuration parameters. Finally, according to the module names in the multiple configuration sub-parameters, the business sub-modules corresponding to the module names may be matched from multiple business sub-modules as designated modules. The designated modules are the business sub-modules to be packaged. At this time, due to the existence of configuration parameters, that is, the scale of the front-end engineering project is large, the corresponding packaging method can be determined as designated module packaging, that is, each designated module is packaged independently. When it is determined that there are no configuration parameters in the packaging request, multiple business sub-modules can be used as business sub-modules to be packaged. Due to the absence of configuration parameters, that is, the scale of the front-end engineering project is small, the corresponding packaging method can be determined as full packaging.

[0108] Among them, the preset configuration file is such as: config file, which can contain settings and configuration information and different programs, and these data can be stored in different formats. The configuration parameter separation instruction can be: command[i].startsWith('--packPage='), startsWith() is a string parsing function, which can be used to intercept and analyze the configuration parameters.

[0109] The split instruction may be command[i].split['='], where split[] is a string splitting function. The string splitting function may be used to split configuration parameters to obtain the business submodules that need to be packaged.

[0110] By configuring the interception parameters, the business submodules to be packaged can be effectively separated. These business submodules to be packaged can be dynamically selected according to business needs, or they can be preset fixed modules. After separating the business submodules to be packaged, these business submodules to be packaged can also be marked for subsequent packaging processing.

[0111] In some embodiments, the above S104, according to the packaging method, based on the general template file, splitting or merging the to-be-packaged business submodules from the business main module, and then performing page packaging, may include:

[0112] When the packaging method is full packaging, based on the general template file, multiple business sub-modules are split from the business main module and merged, and then the merged multiple business sub-modules are packaged into an independent page as a packaging file;

[0113] When the packaging method is designated module packaging, the designated modules are separated from the business main module based on the general template file, and then the separated designated modules are packaged into corresponding independent pages as packaging files.

[0114] In this embodiment, the general template file is the basic file for splitting or merging business modules. After determining the business submodules to be packaged and the corresponding packaging methods, the split and / or merged business submodules to be packaged can be packaged into independent pages based on the packaging method and the general template file, thereby achieving module decoupling and flexible configuration.

[0115] Specifically, if the packaging method is full packaging, multiple business sub-modules can be split from the business main module based on the general template file, and then the merged multiple business sub-modules can be packaged into an independent page. If the packaging method is specified module packaging, the specified module can be split from the business main module based on the general template file, and then the split specified modules are packaged into corresponding independent pages, that is, each specified module corresponds to an independent page, thereby avoiding memory overflow or very slow project startup. That is, full packaging can package multiple business sub-modules into an independent page, while specified module packaging can package each specified module into an independent page, which can be updated by module. Therefore, it can be applied to projects of different sizes and improve the development and maintenance efficiency of projects of different sizes.

[0116] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. For details, please refer to the description of the above-mentioned related processing related embodiments, and no further description is given here.

[0117] The above is an explanation of the present invention, however, it is worth noting that the specific embodiment is only for the purpose of better illustrating the present application and describing a specific embodiment of the specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the embodiments and still achieve the desired results. In addition, the processes depicted in the accompanying drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0118] In a specific implementation scenario, see Figure 5 As shown, the configuration method of the business module provided in this specification can be applied to automatically generate a packaging file, and the specific implementation process may include the following contents.

[0119] Step 1: Write and assemble basic templates and configure general templates

[0120] In the present invention, configuring a general template file is the basis for ensuring smooth splitting and merging of modules. First, a general template file for all business modules is configured, including a temp file, and outTemp (output template) is defined as a general template for all global business modules, which is executed through the node command. In this way, the basic development templates of all modules are kept consistent, and the same set of basic templates can be shared during development and packaging. At this time, the corresponding execution command is configured, which can be directly executed during development and packaging, ensuring the consistency of the template files of each module and laying the foundation for the splitting and merging of each module.

[0121] Step 2: Start the configuration command and add the configuration parameter --packPage=xxx

[0122] In the present invention, the packing configuration command, namely the build command, specifically vue-cli-service build--modeprod----packPage=xxx, is the key to triggering the packing process. The command accepts a series of parameters, and determines which modules need to be packed and the packing method according to these parameters.

[0123] Step 3: Intercept through parameter configuration to determine whether configuration parameters are included

[0124] When the pack configuration command is executed, it will first judge and intercept and analyze the parameter xxx according to '--packPack=xxx' through the command[i].startsWith('--packPage=') in the config file. For example: --packPack=acct, then the corresponding module to be packaged is obtained through command[i].split['='][1]. When this parameter is not configured, it is a full package with index as the entry. These parameters can specify the modules to be packaged, the packaging method (full or specified modules), etc. Through parameter configuration interception, the modules to be packaged can be effectively separated. These modules can be dynamically selected according to business needs, or they can be preset fixed modules. The system will mark these modules for subsequent packaging processing.

[0125] Step 4: Page Packaging

[0126] If configuration parameters are included, the configuration parameters are read dynamically, and the module packaging method is specified. Otherwise, the default value is configured, and the full packaging method is used. Get the configuration items, that is, get the business sub-modules to be packaged and the corresponding packaging method, split and / or merge the configured general template files, and then package the pages to generate or obtain the packaging file.

[0127] The page packaging method of the present invention allows different modules to be packaged into independent pages, thereby realizing the decoupling and flexible configuration of modules. Through page packaging, full packaging (packaging all modules into one page) and specified module packaging (packaging only specific modules) can be realized. Generally, if the project is small, each business submodule has little content, and the submodules are all in the same project, then full packaging can be considered, so that the code deployment is convenient; if in a relatively large project, each business submodule is relatively independent and has the demand for independent deployment, or there is a large amount of content and memory overflow occurs when merging and packaging, or the project starts very slowly, then it is suitable for partial packaging and updating by module.

[0128] Compared with the prior art, the present invention can achieve the following technical effects:

[0129] (1) Reduced coupling between modules: Decoupling between multiple business sub-modules and the main business module is achieved, reducing the coupling between multiple business sub-modules and the main business module, improving the scalability and maintainability of the system, and eliminating the need to bind them together.

[0130] (2) More flexible configuration: It supports dynamic packaging configuration of business sub-modules. Each business sub-module can be packaged and deployed independently or in combination, meeting rapidly changing business needs. Each package can be packaged through configuration.

[0131] (3) Support plug-in extension: Through the plug-in extension mechanism, developers are allowed to customize business sub-modules according to business needs and integrate them into the main business module as plug-ins. They can be packaged in blocks and deployed in the same location. Access to the corresponding module can be intercepted through ng configuration, realizing rapid business expansion and customization.

[0132] (4) Improved development efficiency: The solution provided by the present invention simplifies the interaction process between modules, reduces the development difficulty and workload of developers, and improves development efficiency.

[0133] Although this specification provides examples such as the following embodiments or the attached Figure 6 The method operation steps or device structure shown in the figure, but based on routine or without creative labor, the method or device may include more or fewer operation steps or module units after partial merger. In the steps or structures that do not have a necessary causal relationship logically, the execution order of these steps or the module structure of the device is not limited to the execution order or module structure shown in the embodiments of this specification or the drawings. When the method or module structure is applied to an actual device, server or terminal product, it can be executed sequentially or in parallel according to the method or module structure shown in the embodiments or drawings (for example, a parallel processor or multi-threaded processing environment, or even a distributed processing, server cluster implementation environment). Based on the above-mentioned method for configuring a business module, the embodiments of this specification also propose an embodiment of a configuration device for a business module. As Figure 6 As shown, the device may specifically include the following modules:

[0134] The acquisition module 601 can be used to acquire the business module under the front-end engineering project when the front-end engineering project startup abnormality is detected, the business module includes multiple business sub-modules and corresponding business main modules, and the business module is defined according to business requirements; the business requirements at least include business sub-module update requirements and business sub-module addition requirements. When the business requirement is a business sub-module update requirement, the multiple business sub-modules are configured to include the updated business sub-modules, and when the business requirement is a business sub-module addition requirement, the multiple business sub-modules are configured to include the newly added business sub-modules;

[0135] Configuration module 602, which can be used to configure the same general template file for the business modules, and the general template file is a basic file for splitting or merging the business modules;

[0136] The determination module 603 may be used to receive a packaging request configured according to the scale of the front-end engineering project, determine whether there are configuration parameters in the packaging request, and match the business submodules to be packaged from the multiple business submodules according to the determination result, and determine the packaging method corresponding to the business submodules to be packaged; the business submodules to be packaged include the updated business submodules or the newly added business submodules;

[0137] The packaging module 604 can be used to split and / or merge the business sub-modules to be packaged from the business main module according to the packaging method and based on the general template file, and then perform page packaging to obtain a packaging file.

[0138] In some embodiments, the above-mentioned acquisition module 601 can be specifically used to convert multiple business sub-modules into multiple independent business module plug-ins, and convert a target business sub-module carried by a business sub-module update requirement into a target business sub-module plug-in; when the business requirement is a business sub-module update requirement, the business sub-module plug-in to be updated in the multiple business module plug-ins is replaced with the target business sub-module plug-in, and the target business sub-module plug-in is used as the updated business sub-module.

[0139] In some embodiments, the above-mentioned acquisition module 601 can also be used to convert the new business sub-module carrying the new business sub-module into a new business sub-module plug-in; when the business demand is a new business sub-module demand, the new business sub-module plug-in is loaded into the business main module, and the new business sub-module plug-in is used as the new business sub-module.

[0140] In some embodiments, the above-mentioned configuration module 602 can be specifically used to configure the internal files of the business module, and the internal files include temp files; use the output files corresponding to the internal files as the general template files of the business module, and the output files include outTemp files; call the execution instructions of the general template files, and based on the execution instructions, make the business module have the same general template file.

[0141] In some embodiments, the above-mentioned determination module 603 can be specifically used to configure the packaging request as a full packaging request when the scale of the front-end engineering project is small, and there are no configuration parameters in the full packaging request; when the scale of the front-end engineering project is large, the packaging request is configured as a specified module packaging request, and there are configuration parameters in the specified module packaging request.

[0142] In some embodiments, the above-mentioned determination module 603 can also be specifically used to call a configuration parameter separation instruction from a preset configuration file, and the configuration parameter separation instruction includes a string separation function; using the string separation function, it is determined whether the configuration parameters can be separated from the packaging request; if so, it is determined that the configuration parameters exist in the packaging request; if not, it is determined that the configuration parameters do not exist in the packaging request.

[0143] In some embodiments, the above-mentioned determination module 603 can also be specifically used to call a splitting instruction from a preset configuration file when it is determined that there are configuration parameters in the packaging request, and the splitting instruction includes a string splitting function; using the string splitting function, the configuration parameters are split into multiple sub-configuration parameters; according to the multiple sub-configuration parameters, a specified module is matched from multiple business sub-modules as the business sub-module to be packaged, and the packaging method corresponding to the business sub-module to be packaged is determined to be the packaging of the specified module; when it is determined that there are no configuration parameters in the packaging request, multiple business sub-modules are used as the business sub-modules to be packaged, and the packaging method corresponding to the business sub-module to be packaged is determined to be full packaging.

[0144] In some embodiments, the above-mentioned packaging module 604 can be specifically used for when the packaging method is full packaging, based on the general template file, splitting multiple business sub-modules from the business main module and merging them, and then packaging the merged multiple business sub-modules into an independent page as a packaging file; when the packaging method is designated module packaging, based on the general template file, splitting the designated module from the business main module, and then packaging the split designated modules into corresponding independent pages as packaging files.

[0145] It can be seen from the above that a business module configuration device provided based on the embodiment of this specification can effectively realize the decoupling between business modules, improve the maintainability and scalability of the system, and improve the reusability and maintainability of the code; the business module configuration is highly flexible and can meet rapidly changing business needs; it has strong scalability and can well support the rapid integration of new businesses.

[0146] The embodiment of the present specification also provides an electronic device based on the configuration method of the above-mentioned business module, including a processor and a memory for storing processor executable programs / instructions. When the processor is implemented, it can perform the following steps according to the program / instructions: when a front-end engineering project startup abnormality is detected, the business module under the front-end engineering project is obtained, the business module includes multiple business sub-modules and corresponding business main modules, and the business module is defined according to business requirements; the business requirements at least include business sub-module update requirements and business sub-module addition requirements. When the business requirement is a business sub-module update requirement, the multiple business sub-modules are configured to include the updated business sub-module. When the business requirement is a business sub-module addition requirement, the business module is configured The multiple business sub-modules include a newly added business sub-module; the same general template file is configured for the business modules, and the general template file is a basic file for splitting or merging the business modules; a packaging request configured according to the scale of the front-end engineering project is received, and it is determined whether there are configuration parameters in the packaging request, and the business sub-modules to be packaged are matched from the multiple business sub-modules according to the judgment result, and the packaging method corresponding to the business sub-modules to be packaged is determined; the business sub-module to be packaged includes the updated business sub-module or the newly added business sub-module; according to the packaging method, based on the general template file, the business sub-module to be packaged is split and / or merged from the business main module, and then page packaging is performed to obtain a packaging file.

[0147] In order to complete the above instructions more accurately, refer to Figure 7 As shown, the embodiment of this specification also provides another specific electronic device, wherein the electronic device includes a network communication port 701, a processor 702 and a memory 703, and the above structures are connected through internal cables so that each structure can perform specific data interaction.

[0148] The network communication port 701 can be used to obtain the business module under the front-end engineering project when the front-end engineering project startup abnormality is detected. The business module includes multiple business sub-modules and corresponding business main modules. The business module is defined according to business requirements; the business requirements at least include business sub-module update requirements and business sub-module addition requirements. When the business requirement is a business sub-module update requirement, the multiple business sub-modules are configured to include the updated business sub-modules. When the business requirement is a business sub-module addition requirement, the multiple business sub-modules are configured to include the newly added business sub-modules.

[0149] The processor 702 may be specifically configured to configure the same general template file for the business modules, the general template file being a basic file for splitting or merging the business modules; receiving a packaging request configured according to the scale of the front-end engineering project, determining whether there are configuration parameters in the packaging request, and matching the business submodules to be packaged from the multiple business submodules according to the determination result, and determining a packaging method corresponding to the business submodules to be packaged; the business submodules to be packaged include the updated business submodules or the newly added business submodules; according to the packaging method, based on the general template file, the business submodules to be packaged are split and / or merged from the business main module, and then page packaging is performed to obtain a packaging file;

[0150] The memory 703 may be specifically used to store corresponding instruction programs.

[0151] In this embodiment, the network communication port 701 can be a virtual port that is bound to different communication protocols so that different data can be sent or received. For example, the network communication port can be a port responsible for web data communication, a port responsible for FTP data communication, or a port responsible for email data communication. In addition, the network communication port can also be a physical communication interface or communication chip. For example, it can be a wireless mobile network communication chip, such as GSM, CDMA, etc.; it can also be a Wifi chip; it can also be a Bluetooth chip.

[0152] In this embodiment, the processor 702 may be implemented in any appropriate manner. For example, the processor may take the form of a microprocessor or processor and a computer-readable medium storing a computer-readable program code (such as software or firmware) executable by the (micro)processor, a logic gate, a switch, an application specific integrated circuit (ASIC), a programmable logic controller, and an embedded microcontroller, etc. This specification does not limit this.

[0153] In this embodiment, the memory 703 may include multiple levels. In a digital system, anything that can store binary data can be a memory; in an integrated circuit, a circuit with a storage function that has no physical form is also called a memory, such as RAM, FIFO, etc.; in a system, a storage device with a physical form is also called a memory, such as a memory stick, TF card, etc.

[0154] The embodiment of the present specification also provides a computer storage medium based on the configuration method of the above-mentioned business module, wherein the computer storage medium stores a computer program / instruction, and when the computer program / instruction is executed, the following is achieved: when an abnormal startup of a front-end engineering project is detected, the business module under the front-end engineering project is obtained, the business module includes multiple business sub-modules and corresponding business main modules, and the business module is defined according to business requirements; the business requirements at least include business sub-module update requirements and business sub-module addition requirements, when the business requirements are business sub-module update requirements, the multiple business sub-modules are configured to include the updated business sub-modules, and when the business requirements are business sub-module addition requirements, the multiple business sub-modules are configured to include the updated business sub-modules. The submodule includes a newly added business submodule; the same general template file is configured for the business module, and the general template file is the basic file for splitting or merging the business module; a packaging request configured according to the scale of the front-end engineering project is received, and it is determined whether there are configuration parameters in the packaging request, and the business submodules to be packaged are matched from the multiple business submodules according to the judgment result, and the packaging method corresponding to the business submodule to be packaged is determined; the business submodule to be packaged includes the updated business submodule or the newly added business submodule; according to the packaging method, based on the general template file, the business submodule to be packaged is split and / or merged from the business main module, and then page packaging is performed to obtain a packaging file.

[0155] In this embodiment, the storage medium includes, but is not limited to, a random access memory (RAM), a read-only memory (ROM), a cache, a hard disk (HDD), or a memory card. The memory may be used to store computer program instructions. The network communication unit may be an interface for network connection communication set in accordance with the standard specified by the communication protocol.

[0156] In this embodiment, the functions and effects specifically implemented by the program instructions stored in the computer storage medium can be explained in comparison with other implementations and will not be described in detail here.

[0157] The embodiment of the present specification also provides a computer program product based on the above-mentioned business module configuration method, including a non-transitory computer-readable storage medium storing a computer program / instruction, wherein the computer program / instruction is operable to cause a computer to perform the following steps: when an abnormal startup of a front-end engineering project is detected, a business module under the front-end engineering project is obtained, wherein the business module includes multiple business sub-modules and corresponding business main modules, and the business module is defined according to business requirements; the business requirements at least include business sub-module update requirements and business sub-module addition requirements, and when the business requirements are business sub-module update requirements, the multiple business sub-modules are configured to include the updated business sub-module, and when the business requirements are business sub-module addition requirements, The multiple business sub-modules include a newly added business sub-module; the same general template file is configured for the business modules, and the general template file is a basic file for splitting or merging the business modules; a packaging request configured according to the scale of the front-end engineering project is received, and it is determined whether there are configuration parameters in the packaging request, and the business sub-modules to be packaged are matched from the multiple business sub-modules according to the judgment result, and the packaging method corresponding to the business sub-modules to be packaged is determined; the business sub-module to be packaged includes the updated business sub-module or the newly added business sub-module; according to the packaging method, based on the general template file, the business sub-module to be packaged is split and / or merged from the business main module, and then page packaging is performed to obtain a packaging file.

[0158] Although the present specification provides method operation steps as described in the embodiments or flow charts, more or less operation steps may be included based on conventional or non-creative means. The order of steps listed in the embodiments is only one way of executing the order of many steps, and does not represent a unique execution order. When the device or client product in practice is executed, it can be executed in sequence or in parallel according to the method shown in the embodiments or the drawings (for example, a parallel processor or a multi-threaded processing environment, or even a distributed data processing environment). The term "include", "include" or any other variant thereof is intended to cover non-exclusive inclusion, so that the process, method, product or device including a series of elements includes not only those elements, but also includes other elements that are not explicitly listed, or also includes elements inherent to such a process, method, product or device. In the absence of more restrictions, it is not excluded that there are other identical or equivalent elements in the process, method, product or device including the elements. The first, second, etc. words are used to represent the name, and do not represent any particular order.

[0159] Those skilled in the art also know that, in addition to implementing the controller in a purely computer-readable program code, the controller can be made to implement the same function in the form of logic gates, switches, application-specific integrated circuits, programmable logic controllers, and embedded microcontrollers by logically programming the method steps. Therefore, such a controller can be considered as a hardware component, and the devices for implementing various functions included therein can also be considered as structures within the hardware component. Or even, the devices for implementing various functions can be considered as both software modules for implementing the method and structures within the hardware component.

[0160] This specification may 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, classes, etc. that perform specific tasks or implement specific abstract data types. This specification may also be practiced in distributed computing environments where tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules may be located in local and remote computer storage media including storage devices.

[0161] Through the description of the above embodiments, it can be known that those skilled in the art can clearly understand that the present specification can be implemented by means of software plus a necessary general hardware platform. Based on such an understanding, the technical solution of the present specification can essentially be embodied in the form of a software product, which can be stored in a storage medium such as ROM / RAM, a disk, an optical disk, etc., and includes a number of instructions for enabling a computer device (which can be a personal computer, a mobile terminal, a server, or a network device, etc.) to execute the methods described in each embodiment of the present specification or some parts of the embodiments.

[0162] The various embodiments in this specification are described in a progressive manner, and the same or similar parts between the various embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. This specification can be used in many general or special computer system environments or configurations. For example: personal computers, server computers, handheld devices or portable devices, tablet devices, multi-processor systems, microprocessor-based systems, set-top boxes, programmable electronic devices, network PCs, minicomputers, mainframe computers, distributed computing environments including any of the above systems or devices, etc.

[0163] Although the present specification is described through embodiments, persons skilled in the art will appreciate that there are many variations of the present specification without departing from the spirit of the present specification, and it is intended that the appended claims include these variations without departing from the spirit of the present specification.

Claims

1. A method for configuring a service module, characterized in that: include: When an abnormal start of a front-end engineering project is detected, a business module under the front-end engineering project is obtained, the business module includes multiple business sub-modules and corresponding business main modules, and the business module is defined according to business requirements; the business requirements at least include business sub-module update requirements and business sub-module addition requirements. When the business requirement is a business sub-module update requirement, the multiple business sub-modules are configured to include the updated business sub-modules, and when the business requirement is a business sub-module addition requirement, the multiple business sub-modules are configured to include the newly added business sub-modules; The same general template file is configured for the business modules, and the general template file is a basic file for splitting or merging the business modules; Receiving a packaging request configured according to the scale of the front-end engineering project, determining whether there are configuration parameters in the packaging request, and matching the business sub-modules to be packaged from the multiple business sub-modules according to the determination result, and determining the packaging method corresponding to the business sub-modules to be packaged; the business sub-modules to be packaged include the updated business sub-modules or the newly added business sub-modules; According to the packaging method, based on the general template file, the business sub-modules to be packaged are split and / or merged from the business main module, and then page packaging is performed to obtain a packaging file.

2. The method according to claim 1, characterized in that When the business requirement is a business submodule update requirement, configuring the multiple business submodules to include an updated business submodule includes: Convert multiple business sub-modules into multiple independent business module plug-ins, and convert the target business sub-module carried by the business sub-module update requirements into the target business sub-module plug-in; When the business requirement is a business submodule update requirement, the business submodule plug-in to be updated among the multiple business module plug-ins is replaced with a target business submodule plug-in, and the target business submodule plug-in is used as the updated business submodule.

3. The method according to claim 1, characterized in that When the business demand is a new demand for a business submodule, configuring the multiple business submodules to include a new business submodule comprises: Convert the new business submodule with the new business submodule added demand into the new business submodule plug-in; When the business demand is a new demand for a business submodule, the new business submodule plug-in is loaded into the business main module, and the new business submodule plug-in is used as the new business submodule.

4. The method according to claim 1, characterized in that: The configuring the same general template file for the business modules includes: Configure the internal files of the business module, the internal files include temp files; Using the output file corresponding to the internal file as the general template file of the business module, the output file includes the outTemp file; The execution instruction of the general template file is called, and based on the execution instruction, the business modules have the same general template file.

5. The method according to claim 1, characterized in that The packaging request configured according to the scale of the front-end engineering project includes: When the scale of the front-end engineering project is small, the configuration packaging request is a full packaging request, and there is no configuration parameter in the full packaging request; When the scale of the front-end engineering project is large-scale, the configuration packaging request is a specified module packaging request, and the specified module packaging request contains configuration parameters.

6. The method according to claim 1, characterized in that The determining whether there is a configuration parameter in the packaging request includes: Calling a configuration parameter separation instruction from a preset configuration file, wherein the configuration parameter separation instruction includes a string separation function; Using the string separation function, determining whether configuration parameters can be separated from the packaging request; If so, determining that there are configuration parameters in the packaging request; If not, it is determined that no configuration parameters exist in the packaging request.

7. The method according to claim 1, characterized in that The matching of the to-be-packaged business submodules from the multiple business submodules according to the judgment result and determining the packaging method corresponding to the to-be-packaged business submodules includes: When it is determined that there are configuration parameters in the packaging request, a splitting instruction is called from a preset configuration file, wherein the splitting instruction includes a string splitting function; Using the string splitting function, split the configuration parameter into multiple sub-configuration parameters; According to the multiple sub-configuration parameters, a designated module is matched from multiple business sub-modules as the business sub-module to be packaged, and a packaging method corresponding to the business sub-module to be packaged is determined as designated module packaging; When it is determined that no configuration parameters exist in the packaging request, multiple business sub-modules are used as business sub-modules to be packaged, and the packaging method corresponding to the business sub-modules to be packaged is determined to be full packaging.

8. The method according to claim 1, characterized in that The step of splitting or merging the to-be-packaged business submodules from the business main module based on the general template file according to the packaging method and then performing page packaging includes: When the packaging method is full packaging, based on the general template file, multiple business sub-modules are split from the business main module and merged, and then the merged multiple business sub-modules are packaged into an independent page as a packaging file; When the packaging method is designated module packaging, the designated modules are separated from the business main module based on the general template file, and then the separated designated modules are packaged into corresponding independent pages as packaging files.

9. A configuration device for a service module, characterized in that: include: An acquisition module is used to acquire a business module under the front-end engineering project when an abnormal startup of the front-end engineering project is detected, wherein the business module includes multiple business sub-modules and corresponding business main modules, and the business module is defined according to business requirements; the business requirements at least include business sub-module update requirements and business sub-module addition requirements, and when the business requirement is a business sub-module update requirement, the multiple business sub-modules are configured to include the updated business sub-modules, and when the business requirement is a business sub-module addition requirement, the multiple business sub-modules are configured to include the newly added business sub-modules; A configuration module, used to configure the same general template file for the business modules, wherein the general template file is a basic file for splitting or merging the business modules; A determination module is used to receive a packaging request configured according to the scale of the front-end engineering project, determine whether there are configuration parameters in the packaging request, and match the business sub-modules to be packaged from the multiple business sub-modules according to the determination result, and determine the packaging method corresponding to the business sub-modules to be packaged; the business sub-modules to be packaged include the updated business sub-modules or the newly added business sub-modules; The packaging module is used to split and / or merge the business sub-modules to be packaged from the business main module according to the packaging method and based on the general template file, and then perform page packaging to obtain a packaging file.

10. A computer device comprising a memory, a processor and a computer program / instruction stored in the memory, characterized in that: The processor executes the computer program / instructions to implement the steps of the method according to any one of claims 1 to 8.

11. A computer-readable storage medium having a computer program / instruction stored thereon, characterized in that: When the computer program / instructions are executed by a processor, the steps of the method according to any one of claims 1 to 8 are implemented.

12. A computer program product comprising a computer program / instructions, characterized in that: When the computer program / instructions are executed by a processor, the steps of the method according to any one of claims 1 to 8 are implemented.

Citation Information

Patent Citations

  • Multi-module project configuration file management method and equipment

    CN111651219A

  • Business module development method and device, equipment and storage medium

    CN113885840A

  • Modularized software development method, system and equipment and storage medium

    CN114489854A

  • Abnormal service function module processing method and device, equipment and medium

    CN115269334A

  • Business processing method and device based on micro-front-end single-bin architecture and architecture

    CN118170426A