CN111736884A - Componentization method and system - Google Patents

Componentization method and system Download PDF

Info

Publication number
CN111736884A
CN111736884A CN202010575892.3A CN202010575892A CN111736884A CN 111736884 A CN111736884 A CN 111736884A CN 202010575892 A CN202010575892 A CN 202010575892A CN 111736884 A CN111736884 A CN 111736884A
Authority
CN
China
Prior art keywords
component
components
target
common
business
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202010575892.3A
Other languages
Chinese (zh)
Inventor
娄保建
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Ping An Medical Health Technology Service Co Ltd
Original Assignee
Ping An Medical and Healthcare Management Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Ping An Medical and Healthcare Management Co Ltd filed Critical Ping An Medical and Healthcare Management Co Ltd
Priority to CN202010575892.3A priority Critical patent/CN111736884A/en
Publication of CN111736884A publication Critical patent/CN111736884A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/71Version control; Configuration management

Abstract

The invention relates to the field of pedestal operation and maintenance, and provides a modularization method, which comprises the following steps: obtaining a plurality of common components, wherein the common components comprise a common style component and a business component; performing component definition operation on each common component, wherein the component definition operation comprises component naming and component classification; performing component configuration operation on each common component after the component definition operation to obtain a plurality of target components, wherein the component configuration operation comprises interface configuration operation; setting a component lifecycle for each of the plurality of target components; and constructing a component database according to the set target components, wherein the component database is used for calling and instantiating corresponding target components according to user requests. The embodiment of the invention improves the reusability of the service logic of the system, thereby reducing the resource redundancy.

Description

Componentization method and system
Technical Field
The embodiment of the invention relates to the field of pedestal operation and maintenance, in particular to a componentization method, a componentization system, componentization equipment and a computer-readable storage medium.
Background
With the rapid development of computer technology and internet, computer application is more and more popular, application functions are more and more powerful, and processing problems are more and more complicated. When a plurality of complex business logics and complex page interaction occur, a large amount of repeated logics may occur at the moment, some repeated logics may be reused, but due to the difference between the granularities of different logic splits, the whole module may be loaded in order to depend on a certain function, and a large amount of resource redundancy problems occur.
It should be noted that the above-mentioned contents are not intended to limit the scope of the present invention.
Disclosure of Invention
An object of the embodiments of the present invention is to provide a componentization method, system, computer device, and computer-readable storage medium, which are used to solve the technical problem of low reusability of business logic of the current system and resource redundancy caused thereby.
One aspect of an embodiment of the present invention provides a componentization method, including: obtaining a plurality of common components, wherein the common components comprise a common style component and a business component; performing component definition operation on each common component, wherein the component definition operation comprises component naming and component classification; performing component configuration operation on each common component after the component definition operation to obtain a plurality of target components, wherein the component configuration operation comprises interface configuration operation; setting a component lifecycle for each of the plurality of target components; and constructing a component database according to the set target components, wherein the component database is used for calling and instantiating corresponding target components according to user requests.
Optionally, the common style component includes an animation component, and the animation component is configured with an animation component interface, and a detection function and a selection function are encapsulated in the animation component interface; wherein: the detection function is configured to perform the following operations: detecting the attribute and version information of a browser, and judging whether the browser supports one of transitions and animation according to the attribute and version information of the browser; and the selection function is configured to perform the following operations: determining that the page of the browser executes animation effects through transitions or animation according to the output parameters of the detection function; if the browser supports transitions and interactions at the same time, detecting the current running state of the browser, and determining that the page of the browser executes animation effects through transitions or interactions according to the current running state of the browser.
Optionally, the service component includes a functional component for executing corresponding service logic; the step of obtaining a plurality of common components further comprises: acquiring service data from a preset database; extracting relation data between a plurality of business entities and each business entity from the business data; constructing a service knowledge graph according to a plurality of service entities and relation data among the service entities; recording the number of times of reference of each business entity to other business entities in the business knowledge graph; analyzing the number of times of quoting of each business entity according to the business knowledge graph; analyzing a plurality of target business entities with the referenced times higher than a preset threshold value according to the referenced times of each business entity; and respectively packaging the service logic codes realized by each target service into corresponding service components.
Optionally, the step of respectively packaging the service logic codes of each target service implementation into corresponding service components includes: analyzing the independent packaging feasibility of each target business entity; and encapsulating the service logic codes of the target service entities with independent encapsulation feasibility into corresponding service components.
Optionally, the step of analyzing the independent packaging feasibility of each target service entity includes: judging whether the corresponding target business entity has function independence; judging whether the corresponding target business entity does not have independent route configuration; judging whether the corresponding target business entity meets the requirement of not relating to the data stream; and determining that the respective target business entity is a target business entity with independent encapsulation feasibility if the respective target business entity has functional independence, does not have a separate routing configuration, and does not involve a data flow.
Optionally, the step of performing a component definition operation on each common component includes: defining a corresponding component name for each common component, wherein the component name comprises a prefix, a name and a modifier; wherein the prefix is used to ensure uniqueness of the respective common component and to identify the set in which the respective common component is located, the name being used to describe a function or attribute of the respective common component; and the modifiers are used to distinguish the respective common components from other coupled components.
Optionally, the method further includes the step of managing component life cycles of the respective target components: analyzing the negative influence of each target component on the system in the process of creating or running; determining a target assembly with negative influence as a target assembly to be destroyed, and monitoring the current operation stage of the target assembly to be destroyed in real time; and if the target assembly to be destroyed is monitored to be ended, destroying the target assembly to be destroyed.
An aspect of an embodiment of the present invention further provides a componentized system, including: the system comprises an acquisition module, a processing module and a processing module, wherein the acquisition module is used for acquiring a plurality of common components, and the common components comprise common style components and business components; the component definition module is used for carrying out component definition operation on each common component, and the component definition operation comprises component naming and component classification; the component configuration module is used for carrying out component configuration operation on each common component after the component definition operation so as to obtain a plurality of target components, and the component configuration operation comprises interface configuration operation; a component setup module to set up a component lifecycle for each of the plurality of target components; and the construction module is used for constructing a component database according to the set target components, wherein the component database is used for calling and instantiating corresponding target components according to user requests.
An aspect of the embodiments of the present invention further provides a computer device, including a memory, a processor, and a computer program stored on the memory and executable on the processor, the processor implementing the steps of the componentization method as described above when executing the computer program.
An aspect of the embodiments of the present invention further provides a computer-readable storage medium, including a memory, a processor, and a computer program stored on the memory and executable on the processor, the processor implementing the steps of the componentized method as described above when executing the computer program.
The componentization method, the system, the equipment and the computer readable storage medium provided by the embodiment of the invention define and configure a plurality of public components to componentize again to obtain a plurality of corresponding target components, and the target components are stored in the component database for system repeated calling, thereby effectively improving the reusability of the components and reducing the resource redundancy.
Drawings
FIG. 1 schematically shows a flow diagram of a componentization method according to a first embodiment of the invention;
FIG. 2 schematically shows a block diagram of a componentized system according to embodiment two of the invention; and
fig. 3 schematically shows a hardware architecture diagram of a computer device adapted to implement the componentization method according to a third embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
It should be noted that the descriptions relating to "first", "second", etc. in the embodiments of the present invention are only for descriptive purposes and are not to be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one such feature. In addition, technical solutions between various embodiments may be combined with each other, but must be realized by a person skilled in the art, and when the technical solutions are contradictory or cannot be realized, such a combination should not be considered to exist, and is not within the protection scope of the present invention.
Example one
Fig. 1 schematically shows a flow chart of a componentization method according to a first embodiment of the invention. It is to be understood that the flow charts in the embodiments of the present method are not intended to limit the order in which the steps are performed. The following description is made by way of example with the computer device 2 as the execution subject.
As shown in FIG. 1, the componentization method may include steps S100 to S108, wherein:
step S100, a plurality of common components are acquired.
The plurality of common components may include a page base control, a base logic function component, a common style component, and a business component.
The plurality of common components have the following features: the device is responsible for a relatively independent and stable function; no separate routing configuration; and (c) the device can be purely static, and can also contain own state, but does not relate to data flow and is only controlled by parameters transmitted by a parent component (usually a page).
The page basic controls are controls for basic general functions, and the general functions are independent; such as Button, CheckBox, Radio, etc., which are typically reusable.
The basic logic functional components mainly refer to functional components formed by basic logics which are irrelevant to interfaces; purely logical functional encapsulated components such as operations, time and date, tools or checks of the DOM.
The common style component refers to a component packaged by a basic style or an atomic style; such as clearing floating, common animation styles, etc. components with some smaller logical packaging. The clearing is floating: in that the clear attribute of the CSS is used to define the elements adjacent to the floating for line feed display if necessary, and the floating elements are controlled to be displayed in the bank in a crowded mode. clear attribute values include 4: left, right, booth, and none. This type of display control is a high frequency setting for most pages, and therefore, can be packaged as a common component to enable code sharing. The common animation style comprises transform, transitions and animatics, the transitions and animatics are used for transition animation, and the transitions function supports smooth transition of attributes from one value to another value, so that a gradual animation effect is generated; the animation function supports the generation of a sequence gradient animation through key frames; animation components including two functions of transitions and animatics can be packaged for changing operations of displacement, scaling, rotation, tilting and the like of the object.
In an exemplary embodiment, the common style component includes an animation component configured with an animation component interface. In order to realize the technical effect that the browser switches and uses a plurality of picture effects according to the running state, the animation component interface is packaged with a detection function and a selection function. Wherein: the detection function is configured to perform the following operations: detecting the attribute and version information of a browser, and judging whether the browser supports one of transitions and animation according to the attribute and version information of the browser; the selection function is configured to perform the following operations: determining that the page of the browser executes animation effects through transitions or animation according to the output parameters of the detection function; if the browser supports transitions and interactions at the same time, detecting the current running state of the browser, and determining that the page of the browser executes animation effects through transitions or interactions according to the current running state of the browser.
The business components refer to components which are extracted by functional modules which can be quoted for many times, and the components can be conveniently and uniformly managed.
In an exemplary embodiment, the business components may include functional components for executing corresponding business logic. In order to acquire service components with reusability as much as possible and effectively, the step S100 may further include a step of refining the service components according to each functional module, specifically including steps S100a to 100 g: step S100a, obtaining the service data from the preset database. Step S100b, extracting relationship data between a plurality of business entities and each business entity from the business data. Specifically, the service data may be logic function data corresponding to a function module that is referred to multiple times, the plurality of service entities include a plurality of function modules that are referred to multiple times, the relationship data between the service entities is reference relationship data between the function modules, and a reference record is generated when each function module refers to another function module once. Step S100c, a service knowledge map is constructed according to a plurality of service entities and the relation data among the service entities. Specifically, the computer device 2 may define a plurality of functional module triples according to reference relationship data between the functional modules, construct a service knowledge graph according to the plurality of functional module triples, and each functional module may record the functional module triples in the service knowledge graph in the form of a functional module triplet each time a reference operation is performed on another functional module by the functional module. Judging newly generated functional module triples according to the service knowledge graph, and if the functional module triples identical to the newly generated functional module triples do not exist in the service knowledge graph, adding the newly generated functional module triples into the service knowledge graph; and if the functional module triple identical to the newly generated functional module triple exists in the service knowledge graph, accumulating the times of application corresponding to the functional module triple. And step S100d, recording the reference times of each business entity to other business entities in the business knowledge graph. And step S100e, analyzing the referred times of each business entity according to the business knowledge graph. Step S100f, analyzing a plurality of target business entities with the referenced times higher than a preset threshold according to the referenced times of the business entities. Specifically, the applied times of each functional module are analyzed from the service knowledge graph, and the functional module with the applied times higher than a preset threshold value is used as a target functional module, so that a plurality of target functional modules are obtained. Step S100g, respectively packaging the service logic codes of each target service implementation into corresponding service components.
Specifically, the computer device 2 analyzes the independent encapsulation feasibility information of each target function module in the plurality of target service entities (i.e., target function modules), and encapsulates the corresponding service logic code in the target function module having independent encapsulation feasibility as a common service component.
In an exemplary embodiment, in order to avoid packaging some invalid components, step S100g may include the steps of: analyzing the independent packaging feasibility of each target business entity; and encapsulating the service logic codes of the target service entities with independent encapsulation feasibility into corresponding service components. It is understood that the service logic codes of the target service entities without independent packaging feasibility are not packaged into corresponding service components.
In an exemplary embodiment, the independent encapsulation feasibility of each target business entity can be obtained through the following steps: judging whether the corresponding target business entity has function independence; judging whether the corresponding target business entity does not have independent route configuration; judging whether the corresponding target business entity meets the requirement of not relating to the data stream; determining that the respective target business entity is a target business entity with independent encapsulation feasibility if the respective target business entity has functional independence, does not have individual routing configuration, and does not involve data flow; otherwise, determining that the target business entity is a target business entity which is not independently packaged and feasible, that is, the business logic code corresponding to the target business entity is not suitable for being packaged into a business component in the plurality of common components.
And step S102, carrying out component definition operation on each common component, wherein the component definition operation comprises component naming and component classification.
The computer device 2 may make classification definitions for each common component as needed.
In an exemplary embodiment, in order to improve the efficiency of component management, the step S102 may include the step S102 a: defining a corresponding component name for each common component, the component name comprising a prefix, a name and a modifier. Wherein the prefix is used to ensure uniqueness of the respective common component and to identify the set in which the respective common component is located, the name being used to describe a function or attribute of the respective common component; and the modifiers are used to distinguish the respective common components from other coupled components.
In order to better manage, extract, display and call the common components uniformly, the embodiment carries out component naming and component classification on the common components.
The component naming of the common component after component naming can comprise a prefix, a name and a modifier;
the prefixes are used to guarantee uniqueness of the respective common components to prevent conflicts with other components, and the set of the respective common components can be quickly identified. Each common component may employ a prefix of the form < cui- > such as < cui-button >. In some embodiments, prefixes have an important role when creating some set of common components. For example, Web components have no scope because they are declared globally in a Web page, which means that a "unique" prefix is needed to prevent conflicts. In addition, Web components need to include a "-" dash in the tag name, and thus the component name contains a prefix.
The names are used to describe the functions or attributes of the corresponding common components. Each common component is not an action, which is conceptually a "thing," so the names are nouns, such as "animation" rather than "animation. Illustratively, the names may be "animation," "input," "tab," "navigation," and "menu," among others.
The modifiers are used to distinguish the respective common components from other coupled components. When several components are related or coupled to share a component name, the components may be distinguished by adding different modifiers, such as: < cui-card >, < cui-card-head >, < cui-card-content >.
Illustratively, the component definition operation may also include customization of component themes. For example, theme style definitions including style definitions of main colors, round corners, borders, and partial components may be made according to visual needs of business and brand diversification. In some embodiments, Less/Sass may be used as a development language, a series of global/component theme style variables may be defined, and these theme style variables may be customized in a manner of covering variables, and the theme style may be adjusted accordingly according to requirements. For example, the theme style variables may include: global dominant color, link color, warning color, component float fillet, dominant character color, title color, failure color, border color, and the like.
Step S104, carrying out component configuration operation on each common component after the component definition operation to obtain a plurality of target components, wherein the component configuration operation comprises interface configuration operation.
The computer device 2 can perform a specification interface configuration operation for each common component, the interface configuration operation comprises a configuration request interface and a response interface, and the values needing to be input and the corresponding output are determined through the configured request interface and the response interface.
Illustratively, the interface configuration operation further comprises a configuration of component default presentation and a dynamic configuration of the component, wherein the content of the component default presentation is to present the component default content according to the input value received by the response interface; the content of the components dynamically embodied as common components may be dynamically adjusted. For example: a common component has a text, a picture and a button. Fonts, colors, display or not of pictures, positions of buttons, processing logic of button click events, etc. may be made configurable, for example, by passing configured values to the common component through the attributes, and then performing corresponding modification and presentation by reading the values of the attributes during the life cycle of the common component initialization. Of course, functions may also be executed by calling functions exposed by a common component, passing valid values to functions, modifying global styles, passing specific events to common components, and listening for the events within common components, etc. In addition, in order to make the common component more robust, it is ensured that the common component receives valid attributes, and the function receives valid parameters, some check rules may also be configured.
Step S106, setting a component life cycle for each target component in the plurality of target components.
The component lifecycle includes before update (component initialization), created (component instantiation), before count, created (component addition), before update, updated (component loading), before release, released (component destruction), and the like.
In an exemplary embodiment, in order to reduce the burden on the computer device 2 and improve the stability of the system operation, the componentization method may further include: managing the component life cycle of each target component: analyzing the negative influence of each target component on the system in the process of creating or running, such as system crash and the like possibly caused; determining the target assembly with negative influence as the target assembly to be destroyed, and monitoring the current operation stage of the target assembly to be destroyed in real time; and fourthly, if the target component to be destroyed is monitored to be ended, destroying the target component to be destroyed.
In some embodiments, the common component generates an initialization event before the component is instantiated and added to the created component instance by traversing the attributes and methods of the common component after the instantiation is executed; compiling the component template to combine the data and the template, and rendering the data and the template into a DOM tree; loading the DOM structure of the public component to the corresponding DOM node; and finally, destroying the public component, unbinding, destroying the sub-components and the event listener and ending the life cycle of the component.
And step S108, constructing a component database according to the set target components, wherein the component database is used for calling and instantiating corresponding target components according to user requests.
The component database may be configured with a component API (Application programming interface) for component calling for calling and instantiating a corresponding target component according to a user request.
In the componentization scheme provided by the embodiment, a plurality of common components are defined and configured to be componentized again to obtain a plurality of corresponding target components, and the target components are stored in the component database and used for system repeated calling, so that the reusability of the components is effectively improved. In addition, when the reusability of the components is provided for a plurality of common components, the testability, the automatic test and the like of the components are improved, the maintainability is improved, each component has single responsibility and is easier to reuse, only one part can be modified when the modification is met, and the independent components are easier to understand; the coupling of the system is reduced, the aggregation of the functions is improved, the extensibility of the system is improved, and one component can be replaced by another component under the condition of keeping the interface unchanged, so that the function upgrading is realized; the development complexity is effectively reduced, the development efficiency is improved, and the development cost is reduced.
Example two
Fig. 2 schematically illustrates a block diagram of a componentized system that may be partitioned into one or more program modules, stored in a storage medium, and executed by one or more processors to implement an embodiment of the invention, according to a second embodiment of the invention. The program modules referred to in the embodiments of the present invention refer to a series of computer program instruction segments that can perform specific functions, and the following description will specifically describe the functions of the program modules in the embodiments.
As shown in fig. 2, the componentization system 200 may include an acquisition module 210, a component definition module 220, a component configuration module 230, a configuration module 240, and a build module 250, wherein:
an obtaining module 210, configured to obtain a plurality of common components, where the common components include a common style component and a business component;
a component definition module 220, configured to perform component definition operations on each common component, where the component definition operations include component naming and component classification;
a component configuration module 230, configured to perform component configuration operations on each common component after the component definition operation to obtain a plurality of target components, where the component configuration operations include interface configuration operations;
a component setup module 240 for setting a component lifecycle for each of the plurality of target components; and
and the building module 250 is used for building a component database according to the set target components, wherein the component database is used for calling and instantiating corresponding target components according to user requests.
In an exemplary embodiment, the common style component includes an animation component configured with an animation component interface in which a detection function and a selection function are encapsulated; wherein: the detection function is configured to perform the following operations: detecting the attribute and version information of a browser, and judging whether the browser supports one of transitions and animation according to the attribute and version information of the browser; and the selection function is configured to perform the following operations: determining that the page of the browser executes animation effects through transitions or animation according to the output parameters of the detection function; if the browser supports transitions and interactions at the same time, detecting the current running state of the browser, and determining that the page of the browser executes animation effects through transitions or interactions according to the current running state of the browser.
In an exemplary embodiment, the business components include functional components for executing respective business logic; the obtaining module 210 is further configured to: acquiring service data from a preset database; extracting relation data between a plurality of business entities and each business entity from the business data; constructing a service knowledge graph according to a plurality of service entities and relation data among the service entities; recording the number of times of reference of each business entity to other business entities in the business knowledge graph; analyzing the number of times of quoting of each business entity according to the business knowledge graph; analyzing a plurality of target business entities with the referenced times higher than a preset threshold value according to the referenced times of each business entity; and respectively packaging the service logic codes realized by each target service into corresponding service components.
In an exemplary embodiment, the obtaining module 210 is further configured to: analyzing the independent packaging feasibility of each target business entity; and encapsulating the service logic codes of the target service entities with independent encapsulation feasibility into corresponding service components.
In an exemplary embodiment, the obtaining module 210 is further configured to: judging whether the corresponding target business entity has function independence; judging whether the corresponding target business entity does not have independent route configuration; judging whether the corresponding target business entity meets the requirement of not relating to the data stream; and determining that the respective target business entity is a target business entity with independent encapsulation feasibility if the respective target business entity has functional independence, does not have a separate routing configuration, and does not involve a data flow.
In an exemplary embodiment, the component definition module 220 is further configured to: defining a corresponding component name for each common component, wherein the component name comprises a prefix, a name and a modifier; wherein the prefix is used to ensure uniqueness of the respective common component and to identify the set in which the respective common component is located, the name being used to describe a function or attribute of the respective common component; and the modifiers are used to distinguish the respective common components from other coupled components.
In an exemplary embodiment, a lifecycle management module (not shown) is also included for managing component lifecycles of the respective target components: analyzing the negative influence of each target component on the system in the process of creating or running; determining a target assembly with negative influence as a target assembly to be destroyed, and monitoring the current operation stage of the target assembly to be destroyed in real time; and if the target assembly to be destroyed is monitored to be ended, destroying the target assembly to be destroyed.
EXAMPLE III
Fig. 3 schematically shows a hardware architecture diagram of a computer device 2 adapted to implement the componentization method according to a third embodiment of the present invention. In the present embodiment, the computer device 2 is a device capable of automatically performing numerical calculation and/or information processing in accordance with a command set in advance or stored. For example, the server may be a smart phone, a tablet computer, a notebook computer, a desktop computer, a rack server, a blade server, a tower server, or a rack server (including an independent server or a server cluster composed of a plurality of servers). As shown in fig. 3, the computer device 2 includes at least, but is not limited to: memory 310, processor 320, network interface 330 may be communicatively linked to each other via a system bus. Wherein:
the memory 310 includes at least one type of computer-readable storage medium including a flash memory, a hard disk, a multimedia card, a card-type memory (e.g., SD or DX memory, etc.), a Random Access Memory (RAM), a Static Random Access Memory (SRAM), a read-only memory (ROM), an electrically erasable programmable read-only memory (EEPROM), a programmable read-only memory (PROM), a magnetic memory, a magnetic disk, an optical disk, etc. In some embodiments, the storage 310 may be an internal storage module of the computer device 2, such as a hard disk or a memory of the computer device 2. In other embodiments, the memory 310 may also be an external storage device of the computer device 2, such as a plug-in hard disk provided on the computer device 2, a Smart Memory Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), and the like. Of course, the memory 310 may also include both internal and external memory modules of the computer device 2. In this embodiment, the memory 310 is generally used for storing an operating system and various types of application software installed on the computer device 2, such as program codes of componentization methods. In addition, the memory 310 may also be used to temporarily store various types of data that have been output or are to be output.
Processor 320 may be a Central Processing Unit (CPU), a controller, a microcontroller, a microprocessor, or other data Processing chip in some embodiments. The processor 320 is generally configured to control the overall operation of the computer device 2, such as performing control and processing related to data interaction or communication with the computer device 2. In this embodiment, the processor 320 is used to execute program codes stored in the memory 310 or process data.
Network interface 330 may include a wireless network interface or a wired network interface, with network interface 330 typically being used to establish communication links between computer device 2 and other computer devices. For example, the network interface 330 is used to connect the computer device 2 with an external terminal through a network, establish a data transmission channel and a communication link between the computer device 2 and the external terminal, and the like. The network may be a wireless or wired network such as an Intranet (Intranet), the Internet (Internet), a global system for Mobile communications (GSM), Wideband Code Division Multiple Access (WCDMA), a 4G network, a 5G network, Bluetooth (Bluetooth), or Wi-Fi.
It should be noted that fig. 3 only shows a computer device having components 310 and 330, but it should be understood that not all of the shown components are required to be implemented, and that more or fewer components may be implemented instead.
In this embodiment, the componentization method stored in the memory 310 may be further divided into one or more program modules and executed by one or more processors (in this embodiment, the processor 320) to implement the embodiment of the present invention.
Example four
The invention also provides a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements the steps of the componentization method of an embodiment.
In this embodiment, the computer-readable storage medium includes a flash memory, a hard disk, a multimedia card, a card type memory (e.g., SD or DX memory, etc.), a Random Access Memory (RAM), a Static Random Access Memory (SRAM), a Read Only Memory (ROM), an Electrically Erasable Programmable Read Only Memory (EEPROM), a Programmable Read Only Memory (PROM), a magnetic memory, a magnetic disk, an optical disk, and the like. In some embodiments, the computer readable storage medium may be an internal storage unit of the computer device, such as a hard disk or a memory of the computer device. In other embodiments, the computer readable storage medium may be an external storage device of the computer device, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), and the like provided on the computer device. Of course, the computer-readable storage medium may also include both internal and external storage devices of the computer device. In this embodiment, the computer-readable storage medium is generally used for storing an operating system and various types of application software installed in the computer device, for example, the program codes of the componentization method in the embodiment, and the like. Further, the computer-readable storage medium may also be used to temporarily store various types of data that have been output or are to be output.
It will be apparent to those skilled in the art that the modules or steps of the embodiments of the invention described above may be implemented by a general purpose computing device, they may be centralized on a single computing device or distributed across a network of multiple computing devices, and alternatively, they may be implemented by program code executable by a computing device, such that they may be stored in a storage device and executed by a computing device, and in some cases, the steps shown or described may be performed in an order different than that described herein, or they may be separately fabricated into individual integrated circuit modules, or multiple ones of them may be fabricated into a single integrated circuit module. Thus, embodiments of the invention are not limited to any specific combination of hardware and software.
The above description is only a preferred embodiment of the present invention, and not intended to limit the scope of the present invention, and all modifications of equivalent structures and equivalent processes, which are made by using the contents of the present specification and the accompanying drawings, or directly or indirectly applied to other related technical fields, are included in the scope of the present invention.

Claims (10)

1. A componentization method, comprising:
obtaining a plurality of common components, wherein the common components comprise a common style component and a business component;
performing component definition operation on each common component, wherein the component definition operation comprises component naming and component classification;
performing component configuration operation on each common component after the component definition operation to obtain a plurality of target components, wherein the component configuration operation comprises interface configuration operation;
setting a component lifecycle for each of the plurality of target components; and
and constructing a component database according to the set target components, wherein the component database is used for calling and instantiating corresponding target components according to user requests.
2. The componentization method of claim 1, wherein the common style component comprises an animation component configured with an animation component interface in which a detection function and a selection function are encapsulated; wherein:
the detection function is configured to perform the following operations: detecting the attribute and version information of a browser, and judging whether the browser supports one of transitions and animation according to the attribute and version information of the browser; and
the selection function is configured to perform the following operations: determining that the page of the browser executes animation effects through transitions or animation according to the output parameters of the detection function; if the browser supports transitions and interactions at the same time, detecting the current running state of the browser, and determining that the page of the browser executes animation effects through transitions or interactions according to the current running state of the browser.
3. The componentized method of claim 1, wherein the business components comprise functional components for executing respective business logic; the step of obtaining a plurality of common components further comprises:
acquiring service data from a preset database;
extracting relation data between a plurality of business entities and each business entity from the business data;
constructing a service knowledge graph according to a plurality of service entities and relation data among the service entities;
recording the number of times of reference of each business entity to other business entities in the business knowledge graph;
analyzing the number of times of quoting of each business entity according to the business knowledge graph;
analyzing a plurality of target business entities with the referenced times higher than a preset threshold value according to the referenced times of each business entity; and
and respectively packaging the service logic codes realized by each target service into corresponding service components.
4. The componentization method of claim 3, wherein the step of encapsulating the service logic codes of each target service implementation into corresponding service components respectively comprises:
analyzing the independent packaging feasibility of each target business entity;
and encapsulating the service logic codes of the target service entities with independent encapsulation feasibility into corresponding service components.
5. The componentization method of claim 4, wherein the step of analyzing the feasibility of individual encapsulation for each target business entity comprises:
judging whether the corresponding target business entity has function independence;
judging whether the corresponding target business entity does not have independent route configuration;
judging whether the corresponding target business entity meets the requirement of not relating to the data stream; and
determining that the respective target business entity is a target business entity with independent encapsulation feasibility if the respective target business entity has functional independence, does not have a separate routing configuration, and does not involve a data flow.
6. The componentization method of claim 1, wherein the step of performing component definition operations on each common component comprises:
defining a corresponding component name for each common component, wherein the component name comprises a prefix, a name and a modifier;
wherein the prefix is used to ensure uniqueness of the respective common component and to identify the set in which the respective common component is located, the name being used to describe a function or attribute of the respective common component; and the modifiers are used to distinguish the respective common components from other coupled components.
7. The componentization method of claim 1, further comprising the step of managing component lifecycle for each target component:
analyzing the negative influence of each target component on the system in the process of creating or running;
determining a target assembly with negative influence as a target assembly to be destroyed, and monitoring the current operation stage of the target assembly to be destroyed in real time; and
and if the target assembly to be destroyed is monitored to be ended, destroying the target assembly to be destroyed.
8. A modular system, comprising:
the system comprises an acquisition module, a processing module and a processing module, wherein the acquisition module is used for acquiring a plurality of common components, and the common components comprise common style components and business components;
the component definition module is used for carrying out component definition operation on each common component, and the component definition operation comprises component naming and component classification;
the component configuration module is used for carrying out component configuration operation on each common component after the component definition operation so as to obtain a plurality of target components, and the component configuration operation comprises interface configuration operation;
a component setup module to set up a component lifecycle for each of the plurality of target components; and
and the construction module is used for constructing a component database according to the set target components, wherein the component database is used for calling and instantiating corresponding target components according to user requests.
9. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the processor, when executing the computer program, is adapted to carry out the steps of the modular method according to any of claims 1 to 7.
10. A computer-readable storage medium, having stored therein a computer program executable by at least one processor to cause the at least one processor to perform the steps of the modular method of any of claims 1-7.
CN202010575892.3A 2020-06-22 2020-06-22 Componentization method and system Pending CN111736884A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010575892.3A CN111736884A (en) 2020-06-22 2020-06-22 Componentization method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010575892.3A CN111736884A (en) 2020-06-22 2020-06-22 Componentization method and system

Publications (1)

Publication Number Publication Date
CN111736884A true CN111736884A (en) 2020-10-02

Family

ID=72652004

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010575892.3A Pending CN111736884A (en) 2020-06-22 2020-06-22 Componentization method and system

Country Status (1)

Country Link
CN (1) CN111736884A (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112527666A (en) * 2020-12-18 2021-03-19 平安银行股份有限公司 Automatic testing method and device for business process and computer equipment
CN112631682A (en) * 2020-12-28 2021-04-09 北京百度网讯科技有限公司 Applet processing method, device, equipment and storage medium
CN113296841A (en) * 2021-04-13 2021-08-24 京东数字科技控股股份有限公司 Application program processing method, device, equipment and medium
CN115562652A (en) * 2022-11-24 2023-01-03 金现代信息产业股份有限公司 Component style processing method and system for low-code development platform
CN112527666B (en) * 2020-12-18 2024-05-17 平安银行股份有限公司 Automatic testing method and device for business process and computer equipment

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5946464A (en) * 1996-06-05 1999-08-31 Hitachi, Ltd. Groupware system having agent function
CN109491653A (en) * 2018-11-21 2019-03-19 泰康保险集团股份有限公司 Component sharing method under micro services framework, device, electronic equipment
CN110633098A (en) * 2019-08-20 2019-12-31 华能四川水电有限公司 Realization mode of modularized service

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5946464A (en) * 1996-06-05 1999-08-31 Hitachi, Ltd. Groupware system having agent function
CN109491653A (en) * 2018-11-21 2019-03-19 泰康保险集团股份有限公司 Component sharing method under micro services framework, device, electronic equipment
CN110633098A (en) * 2019-08-20 2019-12-31 华能四川水电有限公司 Realization mode of modularized service

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112527666A (en) * 2020-12-18 2021-03-19 平安银行股份有限公司 Automatic testing method and device for business process and computer equipment
CN112527666B (en) * 2020-12-18 2024-05-17 平安银行股份有限公司 Automatic testing method and device for business process and computer equipment
CN112631682A (en) * 2020-12-28 2021-04-09 北京百度网讯科技有限公司 Applet processing method, device, equipment and storage medium
CN113296841A (en) * 2021-04-13 2021-08-24 京东数字科技控股股份有限公司 Application program processing method, device, equipment and medium
CN115562652A (en) * 2022-11-24 2023-01-03 金现代信息产业股份有限公司 Component style processing method and system for low-code development platform
CN115562652B (en) * 2022-11-24 2023-08-15 金现代信息产业股份有限公司 Component style processing method and system for low-code development platform

Similar Documents

Publication Publication Date Title
CN111736884A (en) Componentization method and system
CN111639287A (en) Page processing method and device, terminal equipment and readable storage medium
CN108572825B (en) User interface processing method, device and equipment
CN111694565A (en) Data visualization application development method and system
CN110162344B (en) Isolation current limiting method and device, computer equipment and readable storage medium
CN114020256A (en) Front-end page generation method, device and equipment and readable storage medium
CN116974620A (en) Application program generation method, operation method and corresponding device
KR101552914B1 (en) Web server application framework web application processing method using the framework and computer readable medium processing the method
CN114647548A (en) Log generation method and device
CN115080046B (en) Multi-component abstract association fusion method and device in page design
CN111488144A (en) Data processing method and equipment
US9176746B2 (en) Data templates in user interface elements
CN108153564B (en) Interface management method, device and system and computer readable storage medium
CN110599112A (en) Method and device for developing and maintaining network page
CN111651160B (en) Plug-in construction and webpage design method and device
CN114356290A (en) Data processing method and device and computer readable storage medium
CN110908644B (en) Configuration method and device of state node, computer equipment and storage medium
CN112486378A (en) Graph generation method, device, terminal and storage medium
CN111258474B (en) Interaction method and device based on GUI and electronic equipment
CN112988136B (en) User interface editing method and device
CN110098963B (en) Server operation and maintenance management and control method and system
CN107479899B (en) File processing method and device, storage medium and processor
CN117591097A (en) Optimization method, device, equipment and storage medium for materials in various use scenes
CN113918194A (en) Page component display method and device, electronic equipment and storage medium
CN117492748A (en) Capability multiplexing method, device, equipment and storage medium based on low-code system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
TA01 Transfer of patent application right

Effective date of registration: 20220526

Address after: 518000 China Aviation Center 2901, No. 1018, Huafu Road, Huahang community, Huaqiang North Street, Futian District, Shenzhen, Guangdong Province

Applicant after: Shenzhen Ping An medical and Health Technology Service Co.,Ltd.

Address before: Room 12G, Area H, 666 Beijing East Road, Huangpu District, Shanghai 200001

Applicant before: PING AN MEDICAL AND HEALTHCARE MANAGEMENT Co.,Ltd.

TA01 Transfer of patent application right