CN112631573A - Component adding method, device, equipment and computer readable storage medium - Google Patents

Component adding method, device, equipment and computer readable storage medium Download PDF

Info

Publication number
CN112631573A
CN112631573A CN202011564924.6A CN202011564924A CN112631573A CN 112631573 A CN112631573 A CN 112631573A CN 202011564924 A CN202011564924 A CN 202011564924A CN 112631573 A CN112631573 A CN 112631573A
Authority
CN
China
Prior art keywords
component
added
target
page
information
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.)
Granted
Application number
CN202011564924.6A
Other languages
Chinese (zh)
Other versions
CN112631573B (en
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.)
Ping An Bank Co Ltd
Original Assignee
Ping An Bank 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 Bank Co Ltd filed Critical Ping An Bank Co Ltd
Priority to CN202011564924.6A priority Critical patent/CN112631573B/en
Publication of CN112631573A publication Critical patent/CN112631573A/en
Application granted granted Critical
Publication of CN112631573B publication Critical patent/CN112631573B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/34Graphical or visual programming
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/957Browsing optimisation, e.g. caching or content distillation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/38Creation or generation of source code for implementing user interfaces

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Databases & Information Systems (AREA)
  • Human Computer Interaction (AREA)
  • Data Mining & Analysis (AREA)
  • Stored Programmes (AREA)

Abstract

The invention relates to big data processing, and discloses a component adding method, which comprises the following steps: acquiring page information of a component to be added according to a page component adding instruction; loading a component corresponding to the information of the component to be added as a target component; extracting attribute parameters in the target assembly, and loading the attribute parameters into a preset self-defining method template to obtain a target self-defining method; performing user-defined configuration on the target component according to a target user-defined method to obtain a target component to be added; and adding the target component to be added to the position, to be added, of the component to be added in the page. The invention also relates to a block chain technology, and the preset self-defining method template is stored in the block chain. The invention can solve the problem that the unification of code structures cannot be ensured because the loading and using sequence needs to be concerned in the process of introducing the components; and the accessed components can not be placed according to the page requirements of the access party, so that the compatibility is poor, the access cost of the access party is increased, and the like.

Description

Component adding method, device, equipment and computer readable storage medium
Technical Field
The present invention relates to big data processing, and in particular, to a method and an apparatus for adding a component, an electronic device, and a computer-readable storage medium.
Background
The front-end component, which simply means that functions are developed and maintained as independent items, forms a universal capability and is applied to various scenes, is divided into a pure logic component and a component with a UI interface.
The existing method for adding components is that dynamic js code access is adopted, namely, the dynamic js code is introduced into a service code, the monitoring function of onload and onerror (capturing errors in a webpage) is used, the monitoring function cannot be accessed according to a static resource conventional mode, the monitoring function needs to be put into the service code to dynamically load, the code structure of a project is changed, and the introduction of different component files of the project is dispersed in different positions in the project; if different pages of the same project need to use the same component, the same code logic needs to be introduced respectively, namely the same project needs to be introduced into the same component for multiple times, and the maintainability of the mode is poor; accessing according to a general way of loading static resources, performing logic processing after introducing a code segment of a component, having strict requirements on introduction and use sequences, requiring introduction first and then use, limiting the flexibility of a code structure, and still requiring judgment of existence of various objects during use; in order to not affect the performance of the page, the access party often puts such external components into the final introduction, which causes the configuration code of the components and the page service code to be separated, and the unification of the code structure cannot be achieved; the control to the UI part of the assembly is to provide two position choices of an access party, the two position choices are respectively suspended to the top or the bottom of a page, when a plurality of pages are accessed, the page structures can be various, the two suspended positions can not satisfy all the pages, the access party can not determine proper positions and interaction according to the page structure of the access party, conflict with the suspended structure of the page of the access party can often occur, for example, the structures of each page such as a product purchase page and each activity page are different, and different suspended structures exist in the page, at this time, the access party has to redesign the page interaction, the original structure of the access party is modified to be compatible with the assembly, the mode of enabling the access party to be compatible with the assembly can greatly increase the access cost of the access party.
Disclosure of Invention
The invention provides a component adding method, a component adding device, electronic equipment and a computer readable storage medium, and mainly aims to solve the problems that components in the prior art cannot be introduced according to a conventional mode of static resources, page performance is influenced, loading and using sequences need to be concerned in the process of introducing the components, and the unification of code structures cannot be ensured; and the accessed components can not be placed according to the page requirements of the access party, the compatibility is poor, the access cost of the access party is increased, and the like.
In a first aspect, to achieve the above object, the present invention provides a component adding method, including:
acquiring page information of a component to be added according to a page component adding instruction; the page information of the component to be added comprises the position of the component to be added in the page and the information of the component to be added;
loading a component corresponding to the information of the component to be added as a target component;
extracting attribute parameters in the target assembly, and loading the attribute parameters into a preset self-defining method template to obtain a target self-defining method;
performing user-defined configuration on the target component according to the target user-defined method to obtain a target component to be added;
and adding the target component to be added to the position, to be added, of the component to be added in the page.
In a second aspect, in order to solve the above problem, the present invention further provides a component addition apparatus, including:
the page information acquisition module is used for acquiring page information of the component to be added according to the page component adding instruction; the page information of the component to be added comprises the position of the component to be added in the page and the information of the component to be added;
the target component acquisition module is used for loading a component corresponding to the information of the component to be added as a target component;
the target self-defining method acquisition module is used for extracting the attribute parameters in the target assembly and loading the attribute parameters into a preset self-defining method template to obtain a target self-defining method;
the target component to be added acquisition module is used for carrying out user-defined configuration on the target component according to the target user-defined method to obtain the target component to be added;
and the component adding module is used for adding the target component to be added to the position to be added of the component to be added in the page.
In a third aspect, to solve the above problem, the present invention further provides an electronic apparatus, including:
a memory storing at least one instruction; and
and the processor executes the instructions stored in the memory to realize the steps of the component adding method.
In a fourth aspect, to solve the above problem, the present invention further provides a computer-readable storage medium, having at least one instruction stored therein, where the at least one instruction is executed by a processor in an electronic device to implement the steps of the component adding method described above.
According to the component adding method and device, the electronic equipment and the computer readable storage medium, page information of a component to be added is obtained according to the page component adding instruction; the page information of the component to be added comprises the position of the component to be added in the page and the information of the component to be added; the method comprises the following steps of loading a component to be added to a specified position of a page of the component to be added; extracting attribute parameters in the target assembly, and loading the attribute parameters into a preset user-defined method template to obtain a target user-defined method; the judgment of the loading and using sequence in the prior art is not needed, the operation is not needed according to the loading sequence, the next operation can be carried out no matter whether the folder self-defining method of the target assembly is loaded, and the time is saved in the whole process. The invention can lead the component to be introduced according to the conventional mode of static resources without influencing the page performance, and does not need to pay attention to the loading and using sequence, thereby ensuring the unification of the code structure, reducing the access cost of an access party and providing a component adding method compatible with various using scenes.
Drawings
FIG. 1 is a flow chart illustrating a component adding method according to an embodiment of the present invention;
FIG. 2 is a block diagram of a Chinese component adding apparatus according to an embodiment of the present invention;
FIG. 3 is a schematic diagram of an internal structure of an electronic device implementing the method for adding Chinese components according to an embodiment of the present invention;
the implementation, functional features and advantages of the objects of the present invention will be further explained with reference to the accompanying drawings.
Detailed Description
It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
The invention provides a component adding method. Fig. 1 is a schematic flow chart of a component adding method according to an embodiment of the present invention. The method may be performed by an apparatus, which may be implemented by software and/or hardware.
In this embodiment, the component adding method includes:
s110, acquiring page information of the component to be added according to the page component adding instruction; the page information of the component to be added comprises the position of the component to be added in the page and the information of the component to be added.
Specifically, when a user opens a page to which a component is to be added for component addition operation, for example, when a button for adding the component or an adding frame is on the page to be added, a page component addition instruction is generated by clicking the button or the adding frame; the processor obtains a page component adding instruction, obtains page information of the component to be added according to the page component adding instruction, wherein the page information of the component to be added at least comprises a position to be added of the component to be added in a page and the information of the component to be added, and completes subsequent operation of adding the component to be added according to the page information of the component to be added.
As an optional embodiment of the present invention, acquiring page information of a component to be added according to a page component addition instruction includes:
acquiring a page component adding instruction; the page component adding instruction comprises a page address of a component to be added;
and acquiring page information of the component to be added according to the page address of the component to be added.
Specifically, the page to be added is generally a web page, for example, a page is obtained by inputting a page address in a browser, when the web page is a component page to be added, the component page to be added needs to be obtained according to the address, and information of the component page to be added is obtained from the component page to be added. Therefore, when the page to-be-added component page of the user side generates the page component adding instruction, the page component adding instruction at least comprises the page address of the to-be-added component, and the processor obtains the page information of the to-be-added component according to the page address of the to-be-added component.
And S120, loading the component corresponding to the information of the component to be added as a target component.
Specifically, the components can be divided into a plurality of types according to specific functions and the like, which type of components to be added is specifically required in the pages of the components to be added, and specific instructions are given in the page information of the components to be added; for example, if the component to be added is a music component, then according to the information, a suitable music component is selected and loaded into the local folder of the user side. And taking the component loaded into the local file as a target component.
As an optional embodiment of the present invention, the loading a component corresponding to the information of the component to be added, as a target component, includes:
acquiring component information corresponding to information of a component to be added from a preset component information table as target component information; the preset component information table comprises preset component information and a component storage address corresponding to the preset component information;
acquiring a target component storage address corresponding to the target component information from a preset component information table;
and loading the target component according to the target component storage address to obtain the target component.
Specifically, in order to easily query the component to be added, a component information table may be preset, where the preset component information table includes preset component information and a component storage address corresponding to the preset component information; and finding a target component storage address corresponding to the target component information according to the preset component information table, and loading the corresponding target component into the local folder according to the address.
S130, extracting the attribute parameters in the target assembly, and loading the attribute parameters into a preset self-defining method template to obtain the target self-defining method.
Specifically, each target component is actually a folder, and corresponding attribute parameters are stored in the file, in the prior art, whether a corresponding custom method is loaded in the folder of the target component is judged, then the use of the component function (attribute parameters) is judged, if the two points are loaded, the component loading is completed, then the custom method is called, the component function is realized, and a certain sequence is provided.
As an optional embodiment of the present invention, the preset custom method template is stored in the block chain, the attribute parameter in the target component is extracted, and the attribute parameter is loaded into the preset custom method template, and the obtaining of the target custom method includes:
extracting attribute parameters from the target component; the attribute parameters comprise custom configuration object information of the target assembly;
and loading the attribute parameters serving as input parameters into a preset custom method template to obtain the target custom method.
Specifically, the preset custom method template is a common method pre-stored locally at the user end, for example, a common method carried by the user in a browser, and only the template parameters need to be modified. The target self-defining method is obtained by extracting the attribute parameters from the target assembly, wherein the attribute parameters comprise the self-defining configuration object information of the target assembly, namely the use function of the target assembly, and whether the definition method in the target assembly is loaded or not is not required to be judged.
And S140, performing user-defined configuration on the target component according to a target user-defined method to obtain the target component to be added.
Specifically, the realization of the function of the target component needs to be realized through a target customization method and the configuration of the functionality, so that the target component needs to be configured before being added to the position to be added in the page of the component to be added, and the usable target component to be added is obtained after the configuration.
As an optional embodiment of the present invention, performing a custom configuration on the target component according to a target custom method, and obtaining a target component to be added includes:
loading the target self-defining method to a preset component configuration script as an entry part to obtain a component configuration script to be added;
and carrying out user-defined configuration on the target component through the component configuration script to be added to obtain the target component to be added.
Specifically, automatic configuration can be achieved through a preset component configuration script, when the processor obtains the target self-defining method, the preset component configuration script is started, the target self-defining method is used as a joining part to be loaded to the preset component configuration script, a component configuration script to be added is obtained, and then the target component is subjected to self-defining configuration through the component configuration script to be added, so that the target component to be added is obtained.
S150, adding the target component to be added to the position, to be added, of the component to be added in the page.
Specifically, in the prior art, in the process of loading the component to be added to the page to be added, two access positions are usually provided for selection, and the access positions respectively float to the top or the bottom of the page. When a plurality of access pages are available, the page structures can be various, the two suspension positions can not satisfy all the pages, the access party can not determine proper positions and interaction according to the page structure of the access party, the conflict with the suspension structure of the page of the access party can often occur, for example, the structures of each page such as a product purchase page and a respective activity page are different, different suspension structures exist in the page, at the moment, the access party has to redesign the page interaction, the original structure of the access party is transformed to form a compatible component, and the access cost of the access party can be greatly increased by adopting the mode of enabling the access party to be compatible with the component. The embodiment of the invention can meet the requirement of an access party by adding the target component to be added to the position of the component to be added in the page, and the target component is added according to the appointed position, thereby achieving better interaction effect.
As an optional embodiment of the invention, adding the target component to be added to the position to be added of the component to be added in the page comprises the following steps:
analyzing the target component to be added to obtain an analyzed target component;
and adding the analyzed target component to the position to be added of the component to be added in the page.
Specifically, the target component to be added is generally in a compressed form in order to save space, decompression is required, and the decompressed target component can be directly added to the position to be added of the component to be added in the page.
As an optional embodiment of the present invention, adding the parsed target component to the to-be-added position of the to-be-added component in the page includes:
acquiring a preset front-end script extraction label;
and extracting the analyzed target assembly through a preset front-end script tag, and loading the analyzed target assembly to a position to be added of the assembly to be added in the page.
Specifically, the target assembly after analysis is extracted through the preset front-end script tag, the method can be more convenient, the processor acquires information about analysis completion of the target assembly to be added, the preset front-end script tag is started, then the preset front-end script tag extracts the target assembly after analysis, the target assembly after analysis is loaded to the position to be added of the assembly to be added in the page, and the addition of the assembly to be added is completed.
Fig. 2 is a functional block diagram of a component adding apparatus according to an embodiment of the present invention.
The component adding apparatus 200 of the present invention may be installed in an electronic device. According to the implemented functions, the component adding device may include a page information obtaining module 210, a target component obtaining module 220, a target customization method obtaining module 230, a target component to be added obtaining module 240, and a component adding module 250. A module according to the present invention, which may also be referred to as a unit, refers to a series of computer program segments that can be executed by a processor of an electronic device and that can perform a fixed function, and that are stored in a memory of the electronic device.
In the present embodiment, the functions regarding the respective modules/units are as follows:
the page information obtaining module 210 is configured to obtain page information of the component to be added according to the page component adding instruction; the page information of the component to be added comprises the position of the component to be added in the page and the information of the component to be added.
Specifically, when a user opens a page to which a component is to be added for component addition operation, for example, when a button for adding the component or an adding frame is on the page to be added, a page component addition instruction is generated by clicking the button or the adding frame; the processor obtains a page component adding instruction, obtains page information of the component to be added according to the page component adding instruction, wherein the page information of the component to be added at least comprises a position to be added of the component to be added in a page and the information of the component to be added, and completes subsequent operation of adding the component to be added according to the page information of the component to be added.
As an optional embodiment of the present invention, acquiring page information of a component to be added according to a page component addition instruction includes:
acquiring a page component adding instruction; the page component adding instruction comprises a page address of a component to be added;
and acquiring page information of the component to be added according to the page address of the component to be added.
Specifically, the page to be added is generally a web page, for example, a page is obtained by inputting a page address in a browser, when the web page is a component page to be added, the component page to be added needs to be obtained according to the address, and information of the component page to be added is obtained from the component page to be added. Therefore, when the page to-be-added component page of the user side generates the page component adding instruction, the page component adding instruction at least comprises the page address of the to-be-added component, and the processor obtains the page information of the to-be-added component according to the page address of the to-be-added component.
And a target component obtaining module 220, configured to load a component corresponding to the component information to be added as a target component.
Specifically, the components can be divided into a plurality of types according to specific functions and the like, which type of components to be added is specifically required in the pages of the components to be added, and specific instructions are given in the page information of the components to be added; for example, if the component to be added is a music component, then according to the information, a suitable music component is selected and loaded into the local folder of the user side. And taking the component loaded into the local file as a target component.
As an optional embodiment of the present invention, the loading a component corresponding to the information of the component to be added, as a target component, includes:
acquiring component information corresponding to information of a component to be added from a preset component information table as target component information; the preset component information table comprises preset component information and a component storage address corresponding to the preset component information;
acquiring a target component storage address corresponding to the target component information from a preset component information table;
and loading the target component according to the target component storage address to obtain the target component.
Specifically, in order to easily query the component to be added, a component information table may be preset, where the preset component information table includes preset component information and a component storage address corresponding to the preset component information; and finding a target component storage address corresponding to the target component information according to the preset component information table, and loading the corresponding target component into the local folder according to the address.
And the target self-defining method obtaining module 230 is configured to extract the attribute parameters in the target component, and load the attribute parameters into a preset self-defining method template to obtain the target self-defining method.
Specifically, each target component is actually a folder, and corresponding attribute parameters are stored in the file, in the prior art, whether a corresponding custom method is loaded in the folder of the target component is judged, then the use of the component function (attribute parameters) is judged, if the two points are loaded, the component loading is completed, then the custom method is called, the component function is realized, and a certain sequence is provided.
As an optional embodiment of the present invention, the preset custom method template is stored in the block chain, the attribute parameter in the target component is extracted, and the attribute parameter is loaded into the preset custom method template, and the obtaining of the target custom method includes:
extracting attribute parameters from the target component; the attribute parameters comprise custom configuration object information of the target assembly;
and loading the attribute parameters serving as input parameters into a preset custom method template to obtain the target custom method.
Specifically, the preset custom method template is a common method pre-stored locally at the user end, for example, a common method carried by the user in a browser, and only the template parameters need to be modified. The target self-defining method is obtained by extracting the attribute parameters from the target assembly, wherein the attribute parameters comprise the self-defining configuration object information of the target assembly, namely the use function of the target assembly, and whether the definition method in the target assembly is loaded or not is not required to be judged.
And the target component to be added acquisition module 240 is configured to perform custom configuration on the target component according to a target custom method to obtain the target component to be added.
Specifically, the realization of the function of the target component needs to be realized through a target customization method and the configuration of the functionality, so that the target component needs to be configured before being added to the position to be added in the page of the component to be added, and the usable target component to be added is obtained after the configuration.
As an optional embodiment of the present invention, performing a custom configuration on the target component according to a target custom method, and obtaining a target component to be added includes:
loading the target self-defining method to a preset component configuration script as an entry part to obtain a component configuration script to be added;
and carrying out user-defined configuration on the target component through the component configuration script to be added to obtain the target component to be added.
Specifically, automatic configuration can be achieved through a preset component configuration script, when the processor obtains the target self-defining method, the preset component configuration script is started, the target self-defining method is used as a joining part to be loaded to the preset component configuration script, a component configuration script to be added is obtained, and then the target component is subjected to self-defining configuration through the component configuration script to be added, so that the target component to be added is obtained.
And the component adding module 250 is used for adding the target component to be added to the position to be added of the component to be added in the page.
Specifically, in the prior art, in the process of loading the component to be added to the page to be added, two access positions are usually provided for selection, and the access positions respectively float to the top or the bottom of the page. When a plurality of access pages are available, the page structures can be various, the two suspension positions can not satisfy all the pages, the access party can not determine proper positions and interaction according to the page structure of the access party, the conflict with the suspension structure of the page of the access party can often occur, for example, the structures of each page such as a product purchase page and a respective activity page are different, different suspension structures exist in the page, at the moment, the access party has to redesign the page interaction, the original structure of the access party is transformed to form a compatible component, and the access cost of the access party can be greatly increased by adopting the mode of enabling the access party to be compatible with the component. The embodiment of the invention can meet the requirement of an access party by adding the target component to be added to the position of the component to be added in the page, and the target component is added according to the appointed position, thereby achieving better interaction effect.
As an optional embodiment of the invention, adding the target component to be added to the position to be added of the component to be added in the page comprises the following steps:
analyzing the target component to be added to obtain an analyzed target component;
and adding the analyzed target component to the position to be added of the component to be added in the page.
Specifically, the target component to be added is generally in a compressed form in order to save space, decompression is required, and the decompressed target component can be directly added to the position to be added of the component to be added in the page.
As an optional embodiment of the present invention, adding the parsed target component to the to-be-added position of the to-be-added component in the page includes:
acquiring a preset front-end script extraction label;
and extracting the analyzed target assembly through a preset front-end script tag, and loading the analyzed target assembly to a position to be added of the assembly to be added in the page.
Specifically, the target assembly after analysis is extracted through the preset front-end script tag, the method can be more convenient, the processor acquires information about analysis completion of the target assembly to be added, the preset front-end script tag is started, then the preset front-end script tag extracts the target assembly after analysis, the target assembly after analysis is loaded to the position to be added of the assembly to be added in the page, and the addition of the assembly to be added is completed.
Fig. 3 is a schematic structural diagram of an electronic device implementing a component adding method according to an embodiment of the present invention.
The electronic device 1 may comprise a processor 10, a memory 11 and a bus, and may further comprise a computer program, such as a component adding program 12, stored in the memory 11 and executable on the processor 10.
The memory 11 includes at least one type of readable storage medium, which includes flash memory, removable hard disk, multimedia card, card-type memory (e.g., SD or DX memory, etc.), magnetic memory, magnetic disk, optical disk, etc. The memory 11 may in some embodiments be an internal storage unit of the electronic device 1, such as a removable hard disk of the electronic device 1. The memory 11 may also be an external storage device of the electronic device 1 in other embodiments, such as a plug-in mobile hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), and the like, which are provided on the electronic device 1. Further, the memory 11 may also include both an internal storage unit and an external storage device of the electronic device 1. The memory 11 may be used not only to store application software installed in the electronic device 1 and various types of data, such as codes of component addition programs, etc., but also to temporarily store data that has been output or is to be output.
The processor 10 may be composed of an integrated circuit in some embodiments, for example, a single packaged integrated circuit, or may be composed of a plurality of integrated circuits packaged with the same or different functions, including one or more Central Processing Units (CPUs), microprocessors, digital Processing chips, graphics processors, and combinations of various control chips. The processor 10 is a Control Unit (Control Unit) of the electronic device, connects various components of the whole electronic device by using various interfaces and lines, and executes various functions and processes data of the electronic device 1 by running or executing programs or modules (e.g., component adding programs, etc.) stored in the memory 11 and calling data stored in the memory 11.
The bus may be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The bus may be divided into an address bus, a data bus, a control bus, etc. The bus is arranged to enable connection communication between the memory 11 and at least one processor 10 or the like.
Fig. 3 shows only an electronic device with components, and it will be understood by those skilled in the art that the structure shown in fig. 3 does not constitute a limitation of the electronic device 1, and may comprise fewer or more components than those shown, or some components may be combined, or a different arrangement of components.
For example, although not shown, the electronic device 1 may further include a power supply (such as a battery) for supplying power to each component, and preferably, the power supply may be logically connected to the at least one processor 10 through a power management device, so as to implement functions of charge management, discharge management, power consumption management, and the like through the power management device. The power supply may also include any component of one or more dc or ac power sources, recharging devices, power failure detection circuitry, power converters or inverters, power status indicators, and the like. The electronic device 1 may further include various sensors, a bluetooth module, a Wi-Fi module, and the like, which are not described herein again.
Further, the electronic device 1 may further include a network interface, and optionally, the network interface may include a wired interface and/or a wireless interface (such as a WI-FI interface, a bluetooth interface, etc.), which are generally used for establishing a communication connection between the electronic device 1 and other electronic devices.
Optionally, the electronic device 1 may further comprise a user interface, which may be a Display (Display), an input unit (such as a Keyboard), and optionally a standard wired interface, a wireless interface. Alternatively, in some embodiments, the display may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, an OLED (Organic Light-Emitting Diode) touch device, or the like. The display, which may also be referred to as a display screen or display unit, is suitable for displaying information processed in the electronic device 1 and for displaying a visualized user interface, among other things.
It is to be understood that the described embodiments are for purposes of illustration only and that the scope of the appended claims is not limited to such structures.
The component adding program 12 stored in the memory 11 of the electronic device 1 is a combination of a plurality of instructions, which when executed in the processor 10, can realize:
acquiring page information of a component to be added according to a page component adding instruction; the page information of the component to be added comprises the position of the component to be added in the page and the information of the component to be added;
loading a component corresponding to the information of the component to be added as a target component;
extracting attribute parameters in the target assembly, and loading the attribute parameters into a preset self-defining method template to obtain a target self-defining method;
performing user-defined configuration on the target component according to a target user-defined method to obtain a target component to be added;
and adding the target component to be added to the position, to be added, of the component to be added in the page.
Specifically, the specific implementation method of the processor 10 for the instruction may refer to the description of the relevant steps in the embodiment corresponding to fig. 1, which is not described herein again. It should be emphasized that, in order to further ensure the privacy and security of the preset customized method template, the preset customized method template may also be stored in a node of a block chain.
Further, the integrated modules/units of the electronic device 1, if implemented in the form of software functional units and sold or used as separate products, may be stored in a computer readable storage medium. The computer-readable medium may include: any entity or device capable of carrying said computer program code, recording medium, U-disk, removable hard disk, magnetic disk, optical disk, computer Memory, Read-Only Memory (ROM).
In the embodiments provided in the present invention, it should be understood that the disclosed apparatus, device and method can be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the modules is only one logical functional division, and other divisions may be realized in practice.
The modules described as separate parts may or may not be physically separate, and parts displayed as modules may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment.
In addition, functional modules in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, or in a form of hardware plus a software functional module.
It will be evident to those skilled in the art that the invention is not limited to the details of the foregoing illustrative embodiments, and that the present invention may be embodied in other specific forms without departing from the spirit or essential attributes thereof.
The present embodiments are therefore to be considered in all respects as illustrative and not restrictive, the scope of the invention being indicated by the appended claims rather than by the foregoing description, and all changes which come within the meaning and range of equivalency of the claims are therefore intended to be embraced therein. Any reference signs in the claims shall not be construed as limiting the claim concerned.
The block chain is a novel application mode of computer technologies such as distributed data storage, point-to-point transmission, a consensus mechanism, an encryption algorithm and the like. A block chain (Blockchain), which is essentially a decentralized database, is a series of data blocks associated by using a cryptographic method, and each data block contains information of a batch of network transactions, so as to verify the validity (anti-counterfeiting) of the information and generate a next block. The blockchain may include a blockchain underlying platform, a platform product service layer, an application service layer, and the like.
Furthermore, it is obvious that the word "comprising" does not exclude other elements or steps, and the singular does not exclude the plural. A plurality of units or means recited in the system claims may also be implemented by one unit or means in software or hardware. The terms second, etc. are used to denote names, but not any particular order.
Finally, it should be noted that the above embodiments are only for illustrating the technical solutions of the present invention and not for limiting, and although the present invention is described in detail with reference to the preferred embodiments, it should be understood by those skilled in the art that modifications or equivalent substitutions may be made on the technical solutions of the present invention without departing from the spirit and scope of the technical solutions of the present invention.

Claims (10)

1. A component adding method, characterized in that the method comprises:
acquiring page information of a component to be added according to a page component adding instruction; the page information of the component to be added comprises the position of the component to be added in the page and the information of the component to be added;
loading a component corresponding to the information of the component to be added as a target component;
extracting attribute parameters in the target assembly, and loading the attribute parameters into a preset self-defining method template to obtain a target self-defining method;
performing user-defined configuration on the target component according to the target user-defined method to obtain a target component to be added;
and adding the target component to be added to the position, to be added, of the component to be added in the page.
2. The component adding method according to claim 1, wherein the acquiring page information of the component to be added according to the page component adding instruction comprises:
acquiring a page component adding instruction; the page component adding instruction comprises a page address of a component to be added;
and acquiring the page information of the component to be added according to the page address of the component to be added.
3. The component adding method according to claim 1, wherein the loading of the component corresponding to the component information to be added as a target component comprises:
acquiring component information corresponding to the information of the component to be added from a preset component information table as target component information; the preset component information table comprises preset component information and a component storage address corresponding to the preset component information;
acquiring a target component storage address corresponding to the target component information from the preset component information table;
and loading the target component according to the target component storage address to obtain the target component.
4. The component addition method according to claim 1, wherein the preset custom method template is stored in a block chain, the extracting of the attribute parameters in the target component and the loading of the attribute parameters into the preset custom method template to obtain the target custom method comprises:
extracting attribute parameters from the target component; wherein the attribute parameters comprise custom configuration object information of the target component;
and loading the attribute parameters serving as participation into a preset custom method template to obtain the target custom method.
5. The component adding method according to claim 1, wherein the performing custom configuration on the target component according to the target custom method to obtain the target component to be added comprises:
loading the target self-defining method to a preset component configuration script as an entry part to obtain a component configuration script to be added;
and carrying out user-defined configuration on the target component through the component configuration script to be added to obtain the target component to be added.
6. The component adding method according to claim 1, wherein the adding the target component to be added to the position to be added of the component to be added in the page comprises:
analyzing the target component to be added to obtain an analyzed target component;
and adding the analyzed target component to a position to be added of the component to be added in a page.
7. The component adding method according to claim 6, wherein the adding the parsed target component to the to-be-added position of the to-be-added component in the page comprises:
acquiring a preset front-end script extraction label;
and extracting the analyzed target assembly through the preset front-end script tag, and loading the analyzed target assembly to a position to be added of the assembly to be added in a page.
8. An component adding device, characterized in that the device comprises:
the page information acquisition module is used for acquiring page information of the component to be added according to the page component adding instruction; the page information of the component to be added comprises the position of the component to be added in the page and the information of the component to be added;
the target component acquisition module is used for loading a component corresponding to the information of the component to be added as a target component;
the target self-defining method acquisition module is used for extracting the attribute parameters in the target assembly and loading the attribute parameters into a preset self-defining method template to obtain a target self-defining method;
the target component to be added acquisition module is used for carrying out user-defined configuration on the target component according to the target user-defined method to obtain the target component to be added;
and the component adding module is used for adding the target component to be added to the position to be added of the component to be added in the page.
9. An electronic device, characterized in that the electronic device comprises:
at least one processor; and the number of the first and second groups,
a memory communicatively coupled to the at least one processor; wherein,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the steps of the component addition method as claimed in any one of claims 1 to 7.
10. A computer-readable storage medium, in which a computer program is stored which, when being executed by a processor, carries out the steps of the component addition method according to any one of claims 1 to 7.
CN202011564924.6A 2020-12-25 2020-12-25 Component adding method, device, equipment and computer readable storage medium Active CN112631573B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011564924.6A CN112631573B (en) 2020-12-25 2020-12-25 Component adding method, device, equipment and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011564924.6A CN112631573B (en) 2020-12-25 2020-12-25 Component adding method, device, equipment and computer readable storage medium

Publications (2)

Publication Number Publication Date
CN112631573A true CN112631573A (en) 2021-04-09
CN112631573B CN112631573B (en) 2024-05-10

Family

ID=75325105

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011564924.6A Active CN112631573B (en) 2020-12-25 2020-12-25 Component adding method, device, equipment and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN112631573B (en)

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5802362A (en) * 1996-05-31 1998-09-01 International Business Machines Corporation System and method for enabling adapters in a computer system
WO2000022517A1 (en) * 1998-10-13 2000-04-20 Codagen Technologies Corp. Component-based source code generator
US20050216885A1 (en) * 2004-03-29 2005-09-29 Sybase, Inc. Attribute-Based Component Programming System and Methodology for Object-Oriented Languages
CN107678745A (en) * 2017-09-25 2018-02-09 南京中新赛克科技有限责任公司 System and method based on page assembly
CN108495192A (en) * 2018-03-13 2018-09-04 武汉斗鱼网络科技有限公司 Page editing processing method and processing device
CN110377367A (en) * 2019-07-24 2019-10-25 广州虎牙科技有限公司 Arrrangement method, device, electric terminal and computer readable storage medium
CN110727457A (en) * 2019-08-30 2020-01-24 平安证券股份有限公司 Component management method, device, storage medium and electronic equipment
CN111475162A (en) * 2020-03-27 2020-07-31 平安银行股份有限公司 Page generation method, device, server and storage medium

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5802362A (en) * 1996-05-31 1998-09-01 International Business Machines Corporation System and method for enabling adapters in a computer system
WO2000022517A1 (en) * 1998-10-13 2000-04-20 Codagen Technologies Corp. Component-based source code generator
US20050216885A1 (en) * 2004-03-29 2005-09-29 Sybase, Inc. Attribute-Based Component Programming System and Methodology for Object-Oriented Languages
CN107678745A (en) * 2017-09-25 2018-02-09 南京中新赛克科技有限责任公司 System and method based on page assembly
CN108495192A (en) * 2018-03-13 2018-09-04 武汉斗鱼网络科技有限公司 Page editing processing method and processing device
CN110377367A (en) * 2019-07-24 2019-10-25 广州虎牙科技有限公司 Arrrangement method, device, electric terminal and computer readable storage medium
CN110727457A (en) * 2019-08-30 2020-01-24 平安证券股份有限公司 Component management method, device, storage medium and electronic equipment
CN111475162A (en) * 2020-03-27 2020-07-31 平安银行股份有限公司 Page generation method, device, server and storage medium

Also Published As

Publication number Publication date
CN112631573B (en) 2024-05-10

Similar Documents

Publication Publication Date Title
CN112052242A (en) Data query method and device, electronic equipment and storage medium
CN111638876A (en) Dynamic form implementation method and device, electronic equipment and storage medium
CN112685117A (en) System language internationalization maintenance method, device and computer readable storage medium
CN112506779A (en) Software interface testing method and device, electronic equipment and storage medium
CN114881616A (en) Business process execution method and device, electronic equipment and storage medium
CN112580079A (en) Authority configuration method and device, electronic equipment and readable storage medium
CN112631903A (en) Task testing method and device, electronic equipment and storage medium
CN114398194A (en) Data collection method and device, electronic equipment and readable storage medium
CN111985194A (en) Data storage method and device, electronic equipment and storage medium
CN112559355A (en) Test case generation method and device, electronic equipment and storage medium
CN114491646A (en) Data desensitization method and device, electronic equipment and storage medium
CN113360139A (en) Integration method and device of front-end frame, electronic equipment and storage medium
CN112541688A (en) Service data checking method and device, electronic equipment and computer storage medium
CN115220740A (en) Database environment deployment method and device, electronic equipment and storage medium
CN114911479A (en) Interface generation method, device, equipment and storage medium based on configuration
CN114185522A (en) Page theme customizing method and device, electronic equipment and storage medium
CN113515265B (en) Site configuration method, device, equipment and computer readable storage medium
CN112631573A (en) Component adding method, device, equipment and computer readable storage medium
CN114625712A (en) Data synchronization method and device, electronic equipment and storage medium
CN115016754A (en) Method and device for synchronously displaying pages among devices, electronic device and medium
CN114020414A (en) Symbiotic method and device of Android system and bottom layer Linux, electronic equipment and storage medium
CN112669029A (en) Bank card adding method, device, equipment and computer readable storage medium
CN113010129A (en) Virtual studio full-flow multi-terminal blackboard writing extraction method and device
CN112527443A (en) Prompt box display method and device, electronic equipment and computer readable storage medium
CN111859452A (en) Page information checking method, device and equipment and computer readable storage medium

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
GR01 Patent grant
GR01 Patent grant