Service component selection method and device, storage medium, electronic equipment and product
By selecting the target business components that match product requirements from the aggregated business components and introducing external business plug-ins, the problem of limited functions of business components in the existing technology is solved, and flexible business component selection and expansion is realized, which is suitable for a variety of business scenarios.
Patent Information
- Application Number
- CN202411626115.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-14
- Publication Date
- 2025-03-07
AI Technical Summary
In the prior art, the front-end business component design model cannot be applied to multiple business scenarios, resulting in limited business functions that components can achieve and cannot meet the variability of project needs.
By providing a method of business component selection, it allows the selection of target business components from the aggregate business components that match the product requirements configuration parameters, and introduce external business plug-ins through slot points to achieve flexible business component selection and expansion.
It realizes flexible selection and expansion of business components, is suitable for a variety of business scenarios, protects the core business code of business components, is easy to maintain, and does not require modification of code.
Smart Images

Figure CN119576434A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of business processing technology, and in particular to a method, device, storage medium, electronic device and product for selecting a business component. Background Art
[0002] With the emergence of MVVM front-end frameworks such as React, Angular, and Vue, the front-end has been truly applied. The framework has also promoted the complete separation of the front-end and back-end. Since then, the demand for front-end interaction logic has increased. With the continuous iteration of products and projects, in order to shorten the development and testing time, and to meet the changing customization functions of project requirements, it is very important to design front-end business components that include business logic. However, because Vue itself supports UI components, the front-end focuses on pages, and the principle of UI component design needs to be separated from business logic and design pure UI components. Vue's own Mvvm mode is to separate the view layer (UI layer) from the business layer (data layer), but only realizes two-way binding through the ViewModel layer.
[0003] The current design pattern is that after installing the basic UI components, the UI components can be repackaged into public UI components, and the products or projects can then reference the repackaged public components in the views layer and implement their own business logic in combination with the backend business. However, the business functions that can be implemented by the components in this design pattern are limited and cannot be applied to a variety of business scenarios.
[0004] Therefore, how to provide a technical solution for a method of selecting a business component with high flexibility becomes a technical problem that needs to be solved urgently. Summary of the invention
[0005] The purpose of some embodiments of the present application is to provide a method, device, storage medium, electronic device and product for selecting a business component. The technical solutions of the embodiments of the present application can realize flexible selection and expansion of business components, which are suitable for product requirements in various business scenarios, and protect the core business code of the business components, making them easy to maintain.
[0006] In a first aspect, some embodiments of the present application provide a method for selecting a business component, comprising: obtaining configuration parameters of product requirements; selecting a target business component that matches the configuration parameters from aggregated business components of installed business component versions; wherein the aggregated business component includes multiple business components and slot points, and one business component corresponds to a business function; the slot point is used to insert an external business plug-in; the target business component is at least one of the multiple business components and the external business plug-in; and the target business component is used to process the product requirements.
[0007] Some embodiments of the present application can select a target business component that matches the configuration parameters from the aggregated business component, and the target business component can include a business component inside the aggregated business component or an external business plug-in to achieve the processing of product requirements. Some embodiments of the present application can achieve flexible selection and expansion of business components, which are applicable to product requirements in various business scenarios, and do not require code modification, thereby protecting the core business code of the business component and facilitating maintenance.
[0008] In some embodiments, the business component version is obtained by the following method: creating a business component folder corresponding to the product requirements; creating the multiple business components under the business component folder and then packaging them to obtain packaged components; generating the business component version corresponding to the packaged components and publishing them to the business library.
[0009] Some embodiments of the present application create multiple business components in a business component folder, package them, and generate corresponding business component versions to a business library for users to download and use.
[0010] In some embodiments, creating the multiple business components under the business component folder includes: creating at least one atomic business component under the business component folder; creating at least one built-in business plug-in under each atomic business component in the at least one atomic business component; creating the aggregate business component, wherein the aggregate business component includes the at least one atomic business component, at least one built-in business plug-in under each atomic business component, and slot points of each atomic business component.
[0011] Some embodiments of the present application create atomic business components under a business component folder, create built-in business plug-ins under it, and place these components and plug-ins in an aggregated business component so that appropriate components can be selected according to user needs. The components are highly flexible in use and can be applied to a variety of business scenarios.
[0012] In some embodiments, the at least one built-in business plug-in inherits the entire business component page of each atomic business component; the naming of data attributes and business processing methods in the at least one built-in business plug-in is the same as that of each atomic business component.
[0013] The built-in business plug-in in some embodiments of the present application can inherit the page of the atomic business component and overwrite the atomic business component through attribute and method naming, so as to achieve the effect of coexistence of multiple logical functions in one business component, and has wide adaptability.
[0014] In some embodiments, selecting a target business component that matches the configuration parameters from the aggregated business components of the installed business component version includes: if it is confirmed that the target business component exists in the aggregated business component, selecting the target business component; if it is confirmed that at least one of the target business components does not exist in the aggregated business component, introducing the pre-defined external business plug-in into the slot point to obtain the target business component.
[0015] Some embodiments of the present application can introduce external business plug-ins when appropriate by confirming whether the aggregated business component contains all target business components that meet the requirements, which has good scalability and high flexibility.
[0016] In some embodiments, the method further includes: when the service component version is upgraded, converting the external service plug-in into a built-in service plug-in in the aggregate service component.
[0017] Some embodiments of the present application convert external business plug-ins into built-in business plug-ins during version upgrades, which not only maintains the core business logic, but also does not conflict with the project customized business and does not affect each other, thereby expanding the scope of business processing and shortening development and testing time.
[0018] In a second aspect, some embodiments of the present application provide a device for selecting a business component, comprising: an acquisition module for acquiring configuration parameters of product requirements; a component selection module for selecting a target business component that matches the configuration parameters from the aggregated business components of the installed business component versions; wherein the aggregated business component includes multiple business components and slot points, and one business component corresponds to a business function; the slot point is used to insert an external business plug-in; the target business component is at least one of the multiple business components and the external business plug-in; and a processing module for using the target business component to process the product requirements.
[0019] In a third aspect, some embodiments of the present application provide a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, can implement the method described in any embodiment of the first aspect.
[0020] In a fourth aspect, some embodiments of the present application provide an electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor can implement a method as described in any embodiment of the first aspect when executing the program.
[0021] In a fifth aspect, some embodiments of the present application provide a computer program product, wherein the computer program product comprises a computer program, wherein the computer program, when executed by a processor, can implement the method described in any embodiment of the first aspect. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] In order to more clearly illustrate the technical solutions of some embodiments of the present application, the drawings required for use in some embodiments of the present application will be briefly introduced below. It should be understood that the following drawings only show some embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.
[0023] Figure 1 Traditional business component design diagrams provided for some embodiments of the present application;
[0024] Figure 2 A system diagram of the business components provided for some embodiments of the present application;
[0025] Figure 3 A flow chart of a method for obtaining a service component version provided in some embodiments of the present application;
[0026] Figure 4 One of the flow charts of the method for selecting a service component provided in some embodiments of the present application;
[0027] Figure 5 A second flow chart of a method for selecting a service component provided in some embodiments of the present application;
[0028] Figure 6 A block diagram of a device for selecting a service component provided in some embodiments of the present application;
[0029] Figure 7 A schematic diagram of an electronic device is provided for some embodiments of the present application. DETAILED DESCRIPTION
[0030] The technical solutions in some embodiments of the present application will be described below in conjunction with the drawings in some embodiments of the present application.
[0031] It should be noted that similar reference numerals and letters represent similar items in the following drawings, so once an item is defined in one drawing, it does not need to be further defined and explained in subsequent drawings. At the same time, in the description of this application, the terms "first", "second", etc. are only used to distinguish the description and cannot be understood as indicating or implying relative importance.
[0032] In related technologies, traditional hierarchical design patterns such as Figure 1As shown, the project installs the basic layer 101 (UI component), and the secondary expansion is encapsulated into the public component public layer 102 of the product. The product references the backend processing logic in the business layer 103 to implement its own business logic. If the product cannot meet the project requirements, the project needs to be customized to create a custom layer 104. However, the business layer 103 and the custom layer 104 cannot be logically reused, and only one of them can exist. The effect of the traditional model is that the product only has the business layer 103 but not the custom layer 104 function of the project, and the product cannot meet the integrated and changeable needs of the project; in another case, the project only has the custom layer 104 but not the business layer 103 logic of the product, the core code business layer 103 is replaced, and the project is out of touch with the product.
[0033] Based on the current Figure 1 The design pattern has the following disadvantages: For projects with unified core business logic but only some different requirements, this design does not have a business component with complete functions, which cannot be directly referenced or modified, and cannot prevent the project from redeveloping the core business logic. This design pattern increases development and testing time, has high development risks, and repeats the testing of products and projects with the same functions, which extends the testing scope and the project and product upgrade cycle. This design cannot protect the core business code. Project customization functions can only be achieved by modifying the code, and cannot be interactively replaced with the core code, which is inconvenient for later maintenance and code tracing. When there are many customized tasks in the project, they are seriously separated from the product, and the product cannot meet the integrated and changing needs of the project.
[0034] In view of this, some embodiments of the present application provide a method for selecting business components. After obtaining the configuration parameters corresponding to the product requirements of the project, the method can select the required target business components from the aggregated business components. When some requirements cannot be met, external business plug-ins can also be introduced through slot points to meet various project requirements.
[0035] Moreover, the design scheme of the embodiment of the present application implements the front-end business component according to the business needs in combination with the back-end logic. Multiple business plug-ins can be built into the business component. The business plug-in is a page logic extension of the business component, which can cover the original sub-business component data attributes and the business logic processing method; at the same time, the business aggregation component has built-in slot points, which can be used by the project to introduce its own external business plug-ins. When the business component is upgraded, the external business plug-in can be converted into a built-in business plug-in. The product designed with this scheme can meet the needs of the project to be integrated and changeable. It has a business layer and a customization layer. The customization layer references the business layer. At the same time, the project does not deviate from the product, and the core code is protected.
[0036] The following is combined with Figure 2 The overall structure of a system composed of business components provided in some embodiments of the present application is exemplified.
[0037] like Figure 2 As shown, some embodiments of the present application provide a system composed of business components, which system composed of business components includes: a basic layer 210, a common layer 220, a first atomic business component 230, a first built-in business plug-in 231, a second business built-in plug-in 232, a second atomic business component 240, a third built-in business plug-in 241, a fourth business built-in plug-in 242, an aggregate business component 250, and an external business plug-in 206 that can be deployed in a customized layer.
[0038] In some embodiments of the present application, the internal directory structure of the atomic business component (i.e., the first atomic business component 230 and the second atomic business component 240) is clear, with independent configuration parameters such as router, store, plugins and views layers. It references the basic components of the basic layer 210 and the public components of the public layer 220 to implement the core business logic. Data and methods are introduced internally by mixins. The internal logic is independent and can be referenced separately externally.
[0039] In some embodiments of the present application, the built-in business plug-in can inherit the atomic business component page, name the same properties and methods as the atomic business component, and overwrite the properties and methods of the atomic business component, thereby replacing the atomic business component method, thereby realizing the common use of the atomic business component and the business plug-in. The external side can select which built-in business plug-in or atomic business component to use through parameter passing. The business plug-in can also be extended externally, and can be converted into an internal business plug-in after testing. This not only protects the core business component code, but also replaces the atomic business component function by overwriting the internal and external business plug-ins. Through parameter configuration, one module can meet multiple application scenarios, and the core code and business plug-in can be switched at any time.
[0040] In some embodiments of the present application, the aggregate business component 250 combines the atomic business components and built-in business plug-ins of each business component for external selection, and at the same time, the built-in slot points of each business component facilitate the introduction of external business plug-ins (that is, external business plug-ins 260).
[0041] In some embodiments of the present application, external business plug-ins: If the built-in atomic business components and built-in business plug-ins cannot meet the customization requirements of the project, customized business plug-ins can be introduced through slot points. When the business component version is upgraded, the external business plug-in of the project can be encapsulated inside the business component and converted into a built-in business plug-in. After continuous accumulation, the built-in business plug-ins of the business component will become more and more abundant to meet multiple application scenarios.
[0042] In order to make the business component version applicable to a variety of application scenarios, you first need to install the business component version. Figure 3 The implementation process of obtaining the service component version provided by some embodiments of the present application is exemplified.
[0043] Please see attached Figure 3 , Figure 3 A flow chart of a method for obtaining a business component version provided for some embodiments of the present application. In some embodiments of the present application, the business component version corresponding to the product requirements is stored in the business library, and the business component version can be downloaded and installed from the business library. For example, the business component version corresponding to the product requirements of the project can be found in the business library. After that, the project can install the corresponding business component version released through npm.
[0044] The above process is explained below as an example.
[0045] In some embodiments of the present application, the method for obtaining a business component version may include: S301, creating a business component folder corresponding to the product requirement. S302, creating the multiple business components in the business component folder and then packaging them to obtain a packaged component. S303, generating the business component version corresponding to the packaged component and publishing it to the business library.
[0046] For example, in some embodiments of the present application, the base layer 210 (i.e., UI component) is referenced, and the UI component is secondary packaged as a public component, i.e., the public layer 202, according to product requirements. Then, a business component folder is created, and the lib packaging instruction is configured in package.json. The business component folder containing multiple business components is packaged by the lib packaging instruction to obtain a packaged component, and a corresponding business component version is generated and published to a private warehouse (as a specific example of a business library) for download and installation.
[0047] In some embodiments of the present application, S302 may include:
[0048] S3021. Create at least one atomic business component in the business component folder.
[0049] For example, in some embodiments of the present application, an atomic business component is created by responding to a user's operation instruction. Figure 2As shown, the first atomic business component 230 and the second atomic business component 240 are created. Each atomic business component requires a clear directory structure, and each atomic business component has its own folders such as api, components, plugins, data, router, store, and views. Among them, api is a calling interface folder, components are multiple fine-grained business components, plugins are built-in business plug-ins, data is encapsulated data attributes and business processing methods, router is the routing definition of internal business components, store is the storage definition of internal business components, and views is a combination of fine-grained business components.
[0050] S3022, creating at least one built-in business plug-in under each atomic business component in the at least one atomic business component. The at least one built-in business plug-in inherits the entire business component page of each atomic business component; the data attributes and business processing methods in the at least one built-in business plug-in are named the same as those of each atomic business component.
[0051] For example, in some embodiments of the present application, plugins creates multiple built-in business plug-ins in the atomic business component, such as Figure 2 The first built-in business plug-in 231 and the second built-in business plug-in 232 under the first atomic business component 230 are shown; the third built-in business plug-in 241 and the fourth built-in business plug-in 242 under the second atomic business component 240 are shown. The data attributes and business logic implementation methods (i.e. business processing methods) of the built-in business plug-in are written in data.js, and the inheritable method is written in index.vue. For example: extends: TemplateFileInfo inherits the entire business component page of the atomic business component, and at the same time, the built-in business plug-in internally names the same data attributes (i.e. data attributes) and methods as the atomic business component, thereby overwriting the attributes and methods of the atomic business component, thereby realizing the coexistence of multiple logical functions in one business component, and the atomic business component and the built-in business plug-in can be replaced selectively. Taking the electronic contract signing system as an example, a standard template A business component (as a specific example of an atomic business component) can be created, and at the same time, B business template plug-in and C business template plug-in (as a specific example of a built-in business plug-in) can be provided to the outside for project selection and use.
[0052] S3023: Create the aggregated business component, wherein the aggregated business component includes the at least one atomic business component, at least one built-in business plug-in under each of the atomic business components, and slot points of each of the atomic business components.
[0053] For example, in some embodiments of the present application, an aggregated business component 250 is created. The aggregated business component 250 includes all the atomic business components and built-in business plug-ins created above. The aggregated business component 260 can list all the atomic business components and their built-in business plug-ins required by the page, and then provide a slot point for each business component to facilitate external application business plug-ins to cover internal components and business plug-in logic.
[0054] After completing the creation of the above business components, Figure 4 The specific process of selecting a service component provided by some embodiments of the present application is exemplified.
[0055] Please see attached Figure 4 , Figure 4 A flow chart of a method for selecting a service component is provided for some embodiments of the present application. The method for selecting a service component may be executed by a terminal device. The method may include:
[0056] S410, obtaining configuration parameters required by the product.
[0057] For example, in some embodiments of the present application, configuration parameters of product requirements in a business project to be processed are first obtained.
[0058] S420, selecting a target business component that matches the configuration parameters from the aggregated business components of the installed business component version; wherein the aggregated business component includes multiple business components and slot points, and one business component corresponds to one business function; the slot point is used to insert an external business plug-in; the target business component is at least one of the multiple business components and the external business plug-in.
[0059] For example, in some embodiments of the present application, the target business component that implements the business project can be selected from the aggregated business component 250 through configuration parameters. Figure 2 and Figure 3 From the multiple business components shown, one of the first atomic business component 230, the first built-in business plug-in 231, and the second built-in business plug-in 232, and one of the second atomic business component 240, the third built-in business plug-in 241, and the fourth built-in business plug-in 242 can be selected. By selecting a business component as the target business component from the two atomic business components, two business functions can be formed. Specifically, which business component is selected from the aggregated business component or which business component combinations are selected is determined based on the configuration parameters of the product requirements, and the embodiments of the present application are not limited thereto.
[0060] Specifically, when importing a business component in the main.js of a business project, if the store is used in the business project, the store in the business component needs to be registered in the global store, and the business component route needs to be registered in the router.js of the business project. When a new custom layer is added to the business project, the required aggregate business component can be referenced through the API provided by the business component version. By passing parameters (that is, configuration parameters), you can choose to use atomic business components or built-in business plug-ins, for example: <ec-template-file>The component also passes the compPlugin parameter to the component. In compPlugin, you can select the name of the built-in business plug-in of the business component. If compPlugin is empty, the corresponding atomic business component is selected by default. If the component does not pass the compPlugin parameter, compPlugin defaults to empty, which means the default atomic business component is selected.
[0061] In some embodiments of the present application, S420 may include: if it is confirmed that the target business component exists in the aggregate business component, selecting the target business component; if it is confirmed that at least one business component in the target business component does not exist in the aggregate business component, introducing the pre-defined external business plug-in into the slot point to obtain the target business component.
[0062] For example, in some embodiments of the present application, it is possible to determine through configuration parameters whether the aggregated business component contains all the business components that can handle the product requirements. If so, the target business component can be directly selected; if only part of it is contained or none is contained, it is necessary to customize the external business plug-in through the slot point.
[0063] Specifically, business projects can customize their own external business plug-ins and introduce them into the slot points provided by the aggregate business component. For example: use the two #TempplateInfo and #TemplateFileInfo slot points provided by the aggregate business component to define two external business plug-ins and place them in the slots. The defined external business plug-ins are the same as the built-in business plug-ins. They inherit the atomic business component page through extends, define the same data and methods as the atomic business component to replace the atomic business component functions, and the project references the business component from then on. Compared with the traditional method, the design of this external business plug-in is aimed at projects with unified core business logic but only some different requirements, and allows the project to directly reference or modify it. The number of external business plug-ins can be customized according to actual needs, and the embodiments of the present application are not specifically limited here.
[0064] Taking the above-mentioned electronic contract signing system as an example, if the above-mentioned three business components A, B and C cannot meet the functional requirements of the project, the project can expand the external business plug-in according to the slot points provided by the aggregated business component. Compared with the traditional design mode, this design method of internal and external business plug-ins protects the core business code and interacts with the core code to facilitate later maintenance and code tracing. At the same time, the project is not out of touch with the product, and the product also meets the needs of the project's integration and diversity.
[0065] S430: Use the target business component to process the product demand.
[0066] For example, in some embodiments of the present application, after selecting the target business component, relevant business processing operations can be performed to complete product requirements.
[0067] In some embodiments of the present application, the method for selecting a service component may further include: when the service component version is upgraded, converting the external service plug-in into a built-in service plug-in in the aggregate service component.
[0068] For example, in some embodiments of the present application, when the business component version is upgraded, the external business plug-ins under the customized atomic business components of the business project can be collected and converted into built-in business plug-ins. In the future, there will be more and more business plug-ins inside the business component, and the selectable businesses will become more and more abundant, which not only maintains the core business logic but also does not conflict with the project customized business. Compared with the traditional design and development model, this iterative upgrade method of converting external business plug-ins into built-in business plug-ins shortens the development and testing time, has low development risks, does not require repeated testing of products and projects with the same functions, shortens the test scope, and shortens the project and product upgrade cycle.
[0069] The following is combined with Figure 5 The specific process of selecting a service component provided by some embodiments of the present application is exemplified.
[0070] Please see attached Figure 5 , Figure 5 A flow chart of a method for selecting a business component is provided for some embodiments of the present application.
[0071] S510, reference the UI component of the base layer, re-encapsulate the UI component as a public layer according to product requirements, create a business component folder, and configure the lib packaging instruction in package.json.
[0072] S520: Create at least one atomic business component in a business component folder.
[0073] S530: Create at least one built-in service plug-in under each atomic service component in at least one atomic service component.
[0074] S540: Create the aggregation service component.
[0075] S550, use the lib packaging instruction to package the business component folder, and generate a corresponding business component version and publish it to the business library.
[0076] S560, download and install the service component version from the service library.
[0077] S570, obtaining configuration parameters required by the product.
[0078] S580: Select a target business component that matches the configuration parameters from the aggregated business components of the business component version.
[0079] The target service component may include one or more combinations of the service component created in S520 to S530 and an external service plug-in introduced through a slot point provided to the outside.
[0080] S590, Process product requirements using target business components.
[0081] It can be understood that the specific implementation process of S510 to S590 can refer to the method embodiment provided above, and in order to avoid repetition, the detailed description is appropriately omitted here.
[0082] It can be seen from some embodiments of the present application that the present application has the following advantages:
[0083] 1) This application uses customization and access functions without modifying the core code. Each business component has atomic business components and built-in business plug-ins, which are uniformly provided to the outside by the aggregated business component. The project can select and configure parameters. The atomic business component is the core business code. Both internal and external business plug-ins can replace the atomic business component, which not only protects the core business code, but also allows the business logic to be freely replaced.
[0084] 2) Customizable development with fine-grained features, low development risk, and reduced testing scope: Each business component is an independent business module, which is aggregated by business components and finally combined to form a complete business. This allows for fine-grained customization and development. If only a certain business component needs to be customized, other unrelated business components do not need to be developed and tested when upgrading, which greatly shortens the development and testing time.
[0085] 3) Component functions, plug-in and unplug-in, projects and products can be quickly upgraded: All atomic components and built-in business plug-ins are provided to the outside world by aggregated business components. In the project, you can choose whether to call them through parameters to achieve plug-in freedom and code isolation between components and business plug-ins. If one of the business plug-ins is upgraded or a new built-in business plug-in is added, you only need to test the specific upgraded or newly added business plug-in function, without the need to test all business components, which not only shortens the development and testing time, but also allows projects and products to be quickly upgraded.
[0086] 4) Business components and business plug-ins can be freely combined, with complete functions and clear code structure: Each atomic business component has a clear directory structure inside, realizing its own independent store, router, plugins, etc. The aggregated business component provides external parameters, and the atomic business components and built-in business plug-ins can be freely matched when the project references them. If these cannot meet the project customization requirements, external business plug-ins can be customized to replace the atomic business components and built-in business plug-ins. After the component upgrade test, the external business plug-in can be upgraded to a built-in business plug-in. In the future, the number of built-in business plug-ins in business components will increase, and the requirements that can be met will become more and more abundant. Not only are the functions complete, but the code structure is clear.
[0087] Please refer to Figure 6 , Figure 6 The block diagram of the composition of the device for selecting a business component provided by some embodiments of the present application is shown. It should be understood that the device for selecting a business component corresponds to the above method embodiment and can execute each step involved in the above method embodiment. The specific functions of the device for selecting a business component can be found in the description above. To avoid repetition, the detailed description is appropriately omitted here.
[0088] Figure 6 The device for selecting business components includes at least one software function module that can be stored in a memory in the form of software or firmware or solidified in the device for selecting business components, and the device for selecting business components includes: an acquisition module 610, used to obtain configuration parameters of product requirements; a component selection module 620, used to select a target business component that matches the configuration parameters from the aggregated business components of the installed business component versions; wherein the aggregated business component includes multiple business components and slot points, and one business component corresponds to a business function; the slot point is used to insert an external business plug-in; the target business component is at least one of the multiple business components and the external business plug-in; a processing module 630, used to use the target business component to process the product requirements.
[0089] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the device described above can refer to the corresponding process in the aforementioned method, and will not be described in detail here.
[0090] Some embodiments of the present application further provide a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, can implement the operations of the method corresponding to any of the above methods provided in the above embodiments.
[0091] Some embodiments of the present application further provide a computer program product, which includes a computer program, wherein when the computer program is executed by a processor, it can implement the operations corresponding to any of the above methods provided in the above embodiments.
[0092] like Figure 7 As shown, some embodiments of the present application provide an electronic device 700, which includes: a memory 710, a processor 720, and a computer program stored in the memory 710 and executable on the processor 720, wherein the processor 720 can implement a method as described in any of the above embodiments when reading the program from the memory 710 through a bus 730 and executing the program.
[0093] Processor 720 can process digital signals and can include various computing structures, such as complex instruction set computer structure, reduced instruction set computer structure, or a structure that implements a combination of multiple instruction sets. In some examples, processor 720 can be a microprocessor.
[0094] The memory 710 may be used to store instructions executed by the processor 720 or data related to the execution of instructions. These instructions and / or data may include codes for implementing some or all functions of one or more modules described in the embodiments of the present application. The processor 720 of the disclosed embodiment may be used to execute instructions in the memory 710 to implement the method shown above. The memory 710 includes a dynamic random access memory, a static random access memory, a flash memory, an optical memory, or other memory known to those skilled in the art.
[0095] The above description is only an embodiment of the present application and is not intended to limit the scope of protection of the present application. For those skilled in the art, the present application may have various changes and variations. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application should be included in the scope of protection of the present application. It should be noted that similar reference numerals and letters represent similar items in the following drawings, so once an item is defined in one drawing, it does not need to be further defined and explained in the subsequent drawings.
[0096] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
[0097] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "comprise", "include" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the presence of other identical elements in the process, method, article or device including the element.
Claims
1. A method for selecting a business component, characterized in that: include: Get the configuration parameters required by the product; Selecting a target business component that matches the configuration parameters from the aggregated business components of the installed business component versions; wherein the aggregated business component includes a plurality of business components and slot points, one business component corresponds to a business function; the slot point is used to insert an external business plug-in; the target business component is at least one of the plurality of business components and the external business plug-in; The product requirement is processed using the target business component.
2. The method according to claim 1, characterized in that The business component version is obtained by the following method: Create business component folders corresponding to the product requirements; After creating the multiple business components in the business component folder, they are packaged to obtain packaged components; The business component version corresponding to the packaged component is generated and published to the business library.
3. The method according to claim 2, characterized in that The step of creating the plurality of business components under the business component folder includes: Creating at least one atomic business component under the business component folder; Creating at least one built-in service plug-in under each atomic service component in the at least one atomic service component; The aggregated service component is created, wherein the aggregated service component includes the at least one atomic service component, at least one built-in service plug-in under each of the atomic service components, and slot points of each of the atomic service components.
4. The method according to claim 3, characterized in that The at least one built-in business plug-in inherits the entire business component page of each atomic business component; the naming of data attributes and business processing methods in the at least one built-in business plug-in is the same as that of each atomic business component.
5. The method according to any one of claims 1 to 4, characterized in that The selecting a target business component matching the configuration parameter from the aggregated business components of the installed business component versions includes: If it is confirmed that the target service component exists in the aggregate service component, the target service component is selected; If it is confirmed that at least one service component in the target service component does not exist in the aggregate service component, the pre-defined external service plug-in is introduced into the slot point to obtain the target service component.
6. The method according to any one of claims 1 to 4, characterized in that The method further comprises: When the service component version is upgraded, the external service plug-in is converted into a built-in service plug-in in the aggregate service component.
7. A device for selecting a service component, characterized in that: include: Acquisition module, used to obtain configuration parameters required by the product; A component selection module, used to select a target business component matching the configuration parameters from the aggregated business components of the installed business component version; wherein the aggregated business component includes a plurality of business components and slot points, one business component corresponds to a business function; the slot point is used to insert an external business plug-in; the target business component is at least one of the plurality of business components and the external business plug-in; A processing module is used to process the product demand using the target business component.
8. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, wherein the computer program executes the method according to any one of claims 1 to 6 when executed by a processor.
9. An electronic device, characterized in that: The method comprises a memory, a processor, and a computer program stored in the memory and running on the processor, wherein the computer program executes the method according to any one of claims 1 to 6 when being run by the processor.
10. A computer program product, characterized in that The computer program product comprises a computer program, wherein the computer program executes the method according to any one of claims 1 to 6 when executed by a processor.