CN112631573B - 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
CN112631573B
CN112631573B CN202011564924.6A CN202011564924A CN112631573B CN 112631573 B CN112631573 B CN 112631573B CN 202011564924 A CN202011564924 A CN 202011564924A CN 112631573 B CN112631573 B CN 112631573B
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.)
Active
Application number
CN202011564924.6A
Other languages
Chinese (zh)
Other versions
CN112631573A (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

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 component information to be added as a target component; extracting attribute parameters in the target component, and loading the attribute parameters into a preset custom method template to obtain a target custom method; carrying out custom configuration on the target component according to a target custom 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 blockchain technology, and the preset custom method template is stored in the blockchain. The method can solve the problem that the loading and using sequence is required to be concerned in the process of introducing the component, and the unification of the code structure cannot be ensured; and the access components cannot 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.

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, an apparatus, an electronic device, and a computer readable storage medium for adding components.
Background
The front-end components, which simply are to be developed and maintained as independent projects, form general-purpose capabilities and are applied in various scenarios, are divided into pure logic components and UI-carrying components.
The current component adding method is that dynamic js code is accessed, namely introduced into service codes, and used in monitoring functions onload (loading) and onerror (capturing errors in a webpage), the service codes cannot be accessed in a conventional mode according to static resources, the service codes are required to be placed for dynamic loading, the code structure of the project is changed, and the introduction of different component files of the project is dispersed at different positions in the project; if the same component is needed to be used by different pages of the same item, the same code logic needs to be used for each introduction, namely the same item needs to be introduced into the same component for a plurality of times, and the maintainability of the mode is poor; the method is accessed according to a general mode of loading static resources, logic processing is carried out after a code segment of a component is introduced, strict requirements are imposed on the introduction and use sequence, the code structure flexibility is limited by using the code segment after introduction, and the existence judgment of various objects is still required during the use; in order not to influence the performance of the page, an access party often places such external components at the last introduction, and the mode leads to the separation of configuration codes and page service codes of the components, so that the unification of the code structures cannot be realized; the control of the UI part of the component is usually to provide two position choices of the access party, the two position choices suspend to the top or bottom of the page respectively, when the access pages are numerous, the page structure is various, the two suspension positions can not meet all the pages, the access party can not determine proper positions and interactions according to the page structure of the access party, the conflict with the suspension structure of the page of the access party frequently occurs, for example, each page structure of a product purchasing page, each active page and the like is different, and different suspension structures exist in the page, at the moment, the access party has to redesign the page interaction, reform the original structure of the access party to be compatible with the component, and the mode of making the access party compatible with the component can greatly increase the access cost of the access party.
Disclosure of Invention
The invention provides a component adding method, a device, electronic equipment and a computer readable storage medium, which mainly aim to solve the problems that components in the prior art cannot be introduced in a conventional way of static resources, page performance is affected, loading and using sequences need to be focused in the process of introducing the components, and unification of code structures cannot be ensured; and the access components cannot 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.
In order to achieve the above object, a first aspect of 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 components to be added comprises positions to be added of the components to be added in the page and the information of the components to be added;
Loading a component corresponding to the component information to be added as a target component;
extracting attribute parameters in the target component, and loading the attribute parameters into a preset custom method template to obtain a target custom method;
carrying out custom configuration on the target component according to the target custom 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-described problems, the present invention also provides a component adding apparatus, the apparatus including:
The page information acquisition module is used for acquiring page information of the components to be added according to the page component adding instruction; the page information of the components to be added comprises positions to be added of the components to be added in the page and the information of the components to be added;
The target component acquisition module is used for loading a component corresponding to the component information to be added as a target component;
the target self-defining method acquisition module is used for extracting attribute parameters in the target component 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 custom configuration on the target component according to the target custom 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 order to solve the above-mentioned problems, the present invention also provides an electronic device including:
a memory storing at least one instruction; and
And a processor executing the instructions stored in the memory to implement the steps of the component adding method described above.
In a fourth aspect, in order to solve the above-mentioned problems, the present invention also provides a computer-readable storage medium having stored therein at least one instruction that is executed by a processor in an electronic device to implement the steps of the component adding method described above.
The invention provides a method, a device, electronic equipment and a computer readable storage medium for adding components, which acquire page information of components to be added according to page component adding instructions; the page information of the components to be added comprises positions to be added of the components to be added in the page and the component information to be added; the components to be added can be loaded to the appointed position of the pages of the components to be added; obtaining a target custom method by extracting attribute parameters in a target component and loading the attribute parameters into a preset custom method template; the loading and using sequence judgment in the prior art is not needed, the operation is not needed according to the loading sequence, no matter whether the folder custom method of the target component is loaded or not, the next operation can be performed, and the whole process saves time. The invention can lead the components to be introduced according to the conventional mode of static resources, does not influence the page performance, does not need to pay attention to loading and using sequences, ensures the unification of code structures, reduces the access cost of an access party, and provides a component adding method compatible with various use scenes.
Drawings
FIG. 1 is a flow chart of a method for adding components according to an embodiment of the invention;
FIG. 2 is a schematic 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 for implementing a method for adding Chinese components according to an embodiment of the present invention;
The achievement of the objects, functional features and advantages of the present invention will be further described with reference to the accompanying drawings, in conjunction with the embodiments.
Detailed Description
It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the invention.
The invention provides a component adding method. Referring to fig. 1, a flow chart of a component adding method according to an embodiment of the invention is shown. The method may be performed by an apparatus, which may be implemented in software and/or hardware.
In this embodiment, the component adding method includes:
S110, acquiring page information of a component to be added according to a page component adding instruction; the page information of the components to be added comprises positions to be added of the components to be added in the page and the component information to be added.
Specifically, when a user opens a page of a component to be added to perform component adding operation, for example, when a button or an adding frame for adding the component is arranged on the page to be added, a page component adding instruction is generated by clicking the button or the adding frame; the method comprises the steps that a processor obtains a page component adding instruction, and obtains page information of a component to be added according to the page component adding instruction, wherein the page information of the component to be added at least comprises the position to be added of the component to be added in a page and the information of the component to be added, and subsequent operation of adding the component to be added is completed according to the page information of the component to be added.
As an optional embodiment of the present invention, according to a page component adding instruction, obtaining page information of a component to be added includes:
Acquiring a page component adding instruction; the page component adding instruction comprises a component page address 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.
Specifically, the page to be added is generally a web page, for example, by inputting a page address in a browser, so as to obtain the page, 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 the component page information to be added is obtained from the component page to be added. Therefore, when the page component to be added of the user side generates a page component adding instruction, the page component adding instruction at least comprises a page address of the component to be added, and the processor obtains page information of the component to be added according to the page address of the component to be added.
S120, loading the 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 components to be added are specifically needed in the pages of the components to be added, and specific indication exists in the page information of the components to be added; for example, if the component to be added is a music component, an appropriate music component is selected according to the information and loaded into a local folder of the user side, and of course, the component information may include a more specific name of the component to be added, for example, a specific music player. The component loaded into the local file is taken as a target component.
As an alternative embodiment of the present invention, loading a component corresponding to the component information to be added, as a target component, includes:
Acquiring component information corresponding to the information of the component to be added from a preset component information table, and taking the component information 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 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 searching a target component storage address corresponding to the target component information according to the query preset component information table, and loading the corresponding target component into a local folder according to the address.
S130, extracting attribute parameters in the target component, and loading the attribute parameters into a preset custom method template to obtain the target custom method.
Specifically, each target component is actually a folder, corresponding attribute parameters are stored in the file, in the prior art, whether the corresponding custom method is loaded or not is judged from the folder of the target component, then the use (attribute parameters) of the component function is judged, if the loading of the components is completed at two points, the custom method is called to realize the component function, and a certain sequence is realized.
As an optional embodiment of the present invention, the preset custom method template is stored in the blockchain, the attribute parameters in the target component are extracted, and the attribute parameters are loaded into the preset custom method template, so as to obtain the target custom method, which comprises:
Extracting attribute parameters from the target component; the attribute parameters comprise custom configuration object information of the target component;
and taking the attribute parameters as input parts to be loaded into a preset custom method template to obtain the target custom method.
Specifically, the preset custom method template is a locally shared method stored in the client in advance, for example, a shared method in the 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 component, wherein the attribute parameters comprise self-defining configuration object information of the target component, namely the use function of the target component, and whether the defining method in the target component is loaded is not required to be judged.
And S140, carrying out custom configuration on the target component according to the target custom method to obtain the target component to be added.
Specifically, the implementation of the function of the target component is realized through a target custom method and the configuration of the functionality, so that before the target component is added to the position to be added in the page of the component to be added, the configuration is performed, and the target component to be added which can be used is obtained after the configuration.
As an optional embodiment of the present invention, performing custom configuration on the target component according to a target custom method, and obtaining the target component to be added includes:
taking the target self-defining method as an entry to be loaded into a preset component configuration script to obtain a component configuration script to be added;
and carrying out custom configuration on the target component through a component configuration script to be added to obtain the target component to be added.
Specifically, automatic configuration can be realized through a preset component configuration script, when a processor acquires a target custom method, the preset component configuration script is started, the target custom method is used as an entry to be loaded into the preset component configuration script to obtain a component configuration script to be added, and then the target component is subjected to custom configuration through the component configuration script to be added to obtain the target component to be added.
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, during the process of loading the component to be added into the page to be added, two access positions are usually provided for selection, and the two access positions are respectively suspended to the top or the bottom of the page. When the access pages are numerous, the page structures are various, the two suspension positions cannot meet all the pages, an access party cannot determine proper positions and interactions by himself according to the page structures of the access party, collision with the suspension structures of the page of the access party frequently occurs, for example, each page structure of a product purchase page, each active page and the like is different, different suspension structures exist in the page, at the moment, the access party has to redesign page interactions, the original structure of the access party is transformed to be compatible with the components, 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 components. According to the embodiment of the invention, the target component to be added is added to the position to be added of the component to be added in the page, so that the requirement of an access party can be met, and the target component to be added is added according to the appointed position of the target component to be added, so that a better interaction effect is achieved.
As an optional embodiment of the present invention, adding the target component to be added to the position to be added of the component to be added in the page includes:
Analyzing the target component to be added to obtain an analyzed target component;
And adding the parsed target component to the position to be added of the component to be added in the page.
Specifically, in order to save space, the target component to be added is generally in a compressed form and needs to be decompressed, 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 location of the to-be-added component in the page includes:
acquiring a preset front-end script extraction tag;
And extracting the parsed target component through a preset front-end script tag, and loading the parsed target component to the position to be added of the component to be added in the page.
Specifically, the method comprises the steps that the analyzed target component is extracted through the preset front-end script tag, the method is more convenient, when the processor obtains the information that the analysis of the target component to be added is completed, the preset front-end script tag is started, then the analyzed target component is extracted through the preset front-end script tag, the analyzed target component is loaded to the position to be added of the component to be added in a page, and the addition of the component to be added is completed.
As shown in fig. 2, a functional block diagram of the component adding device according to an embodiment of the present invention is shown.
The component adding apparatus 200 of the present invention may be installed in an electronic device. The component adding device may include a page information obtaining module 210, a target component obtaining module 220, a target custom method obtaining module 230, a target component to be added obtaining module 240, and a component adding module 250 according to the implemented functions. The module of the present invention may also be referred to as a unit, meaning a series of computer program segments capable of being executed by the processor of the electronic device and of performing fixed functions, stored in the memory of the electronic device.
In the present embodiment, the functions concerning the respective modules/units are as follows:
The page information obtaining module 210 is configured to obtain page information of a component to be added according to a page component adding instruction; the page information of the components to be added comprises positions to be added of the components to be added in the page and the component information to be added.
Specifically, when a user opens a page of a component to be added to perform component adding operation, for example, when a button or an adding frame for adding the component is arranged on the page to be added, a page component adding instruction is generated by clicking the button or the adding frame; the method comprises the steps that a processor obtains a page component adding instruction, and obtains page information of a component to be added according to the page component adding instruction, wherein the page information of the component to be added at least comprises the position to be added of the component to be added in a page and the information of the component to be added, and subsequent operation of adding the component to be added is completed according to the page information of the component to be added.
As an optional embodiment of the present invention, according to a page component adding instruction, obtaining page information of a component to be added includes:
Acquiring a page component adding instruction; the page component adding instruction comprises a component page address 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.
Specifically, the page to be added is generally a web page, for example, by inputting a page address in a browser, so as to obtain the page, 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 the component page information to be added is obtained from the component page to be added. Therefore, when the page component to be added of the user side generates a page component adding instruction, the page component adding instruction at least comprises a page address of the component to be added, and the processor obtains page information of the component to be added according to the page address of the component to be added.
The target component obtaining module 220 is 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 components to be added are specifically needed in the pages of the components to be added, and specific indication exists in the page information of the components to be added; for example, if the component to be added is a music component, an appropriate music component is selected according to the information and loaded into a local folder of the user side, and of course, the component information may include a more specific name of the component to be added, for example, a specific music player. The component loaded into the local file is taken as a target component.
As an alternative embodiment of the present invention, loading a component corresponding to the component information to be added, as a target component, includes:
Acquiring component information corresponding to the information of the component to be added from a preset component information table, and taking the component information 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 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 searching a target component storage address corresponding to the target component information according to the query preset component information table, and loading the corresponding target component into a local folder according to the address.
The target custom method obtaining module 230 is configured to extract an attribute parameter in the target component, and load the attribute parameter into a preset custom method template to obtain a target custom method.
Specifically, each target component is actually a folder, corresponding attribute parameters are stored in the file, in the prior art, whether the corresponding custom method is loaded or not is judged from the folder of the target component, then the use (attribute parameters) of the component function is judged, if the loading of the components is completed at two points, the custom method is called to realize the component function, and a certain sequence is realized.
As an optional embodiment of the present invention, the preset custom method template is stored in the blockchain, the attribute parameters in the target component are extracted, and the attribute parameters are loaded into the preset custom method template, so as to obtain the target custom method, which comprises:
Extracting attribute parameters from the target component; the attribute parameters comprise custom configuration object information of the target component;
and taking the attribute parameters as input parts to be loaded into a preset custom method template to obtain the target custom method.
Specifically, the preset custom method template is a locally shared method stored in the client in advance, for example, a shared method in the 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 component, wherein the attribute parameters comprise self-defining configuration object information of the target component, namely the use function of the target component, and whether the defining method in the target component is loaded is not required to be judged.
The target component to be added obtaining module 240 is configured to perform custom configuration on the target component according to a target custom method, so as to obtain the target component to be added.
Specifically, the implementation of the function of the target component is realized through a target custom method and the configuration of the functionality, so that before the target component is added to the position to be added in the page of the component to be added, the configuration is performed, and the target component to be added which can be used is obtained after the configuration.
As an optional embodiment of the present invention, performing custom configuration on the target component according to a target custom method, and obtaining the target component to be added includes:
taking the target self-defining method as an entry to be loaded into a preset component configuration script to obtain a component configuration script to be added;
and carrying out custom configuration on the target component through a component configuration script to be added to obtain the target component to be added.
Specifically, automatic configuration can be realized through a preset component configuration script, when a processor acquires a target custom method, the preset component configuration script is started, the target custom method is used as an entry to be loaded into the preset component configuration script to obtain a component configuration script to be added, and then the target component is subjected to custom configuration through the component configuration script to be added to obtain the target component to be added.
The component adding module 250 is configured to add the target component to be added to a position to be added of the component to be added in the page.
Specifically, in the prior art, during the process of loading the component to be added into the page to be added, two access positions are usually provided for selection, and the two access positions are respectively suspended to the top or the bottom of the page. When the access pages are numerous, the page structures are various, the two suspension positions cannot meet all the pages, an access party cannot determine proper positions and interactions by himself according to the page structures of the access party, collision with the suspension structures of the page of the access party frequently occurs, for example, each page structure of a product purchase page, each active page and the like is different, different suspension structures exist in the page, at the moment, the access party has to redesign page interactions, the original structure of the access party is transformed to be compatible with the components, 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 components. According to the embodiment of the invention, the target component to be added is added to the position to be added of the component to be added in the page, so that the requirement of an access party can be met, and the target component to be added is added according to the appointed position of the target component to be added, so that a better interaction effect is achieved.
As an optional embodiment of the present invention, adding the target component to be added to the position to be added of the component to be added in the page includes:
Analyzing the target component to be added to obtain an analyzed target component;
And adding the parsed target component to the position to be added of the component to be added in the page.
Specifically, in order to save space, the target component to be added is generally in a compressed form and needs to be decompressed, 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 location of the to-be-added component in the page includes:
acquiring a preset front-end script extraction tag;
And extracting the parsed target component through a preset front-end script tag, and loading the parsed target component to the position to be added of the component to be added in the page.
Specifically, the method comprises the steps that the analyzed target component is extracted through the preset front-end script tag, the method is more convenient, when the processor obtains the information that the analysis of the target component to be added is completed, the preset front-end script tag is started, then the analyzed target component is extracted through the preset front-end script tag, the analyzed target component is loaded to the position to be added of the component to be added in a page, and the addition of the component 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, including flash memory, a mobile hard disk, a multimedia card, a card memory (e.g., SD or DX memory, etc.), a magnetic memory, a magnetic disk, an 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 in other embodiments also be an external storage device of the electronic device 1, such as a plug-in mobile hard disk, a smart memory card (SMART MEDIA CARD, SMC), a Secure Digital (SD) card, a flash memory card (FLASH CARD) or 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 for storing application software installed in the electronic device 1 and various types of data, such as code of a component adding program, etc., but also for temporarily storing data that has been output or is to be output.
The processor 10 may be comprised of integrated circuits in some embodiments, for example, a single packaged integrated circuit, or may be comprised of multiple integrated circuits packaged with the same or different functions, including one or more central processing units (Central Processing unit, CPU), microprocessors, digital processing chips, graphics processors, combinations of various control chips, and the like. The processor 10 is a Control Unit (Control Unit) of the electronic device, connects respective parts of the entire electronic device using various interfaces and lines, and executes various functions of the electronic device 1 and processes data by running or executing programs or modules (e.g., component addition programs, etc.) stored in the memory 11, and calling data stored in the memory 11.
The bus may be a peripheral component interconnect standard (PERIPHERAL COMPONENT INTERCONNECT, PCI) bus, or an extended industry standard architecture (extended industry standard architecture, EISA) bus, among others. The bus may be classified as an address bus, a data bus, a control bus, etc. The bus is arranged to enable a connection communication between the memory 11 and at least one processor 10 etc.
Fig. 3 shows only an electronic device with components, it being understood by a person 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 shown, or may combine certain components, or may be arranged in different components.
For example, although not shown, the electronic device 1 may further include a power source (such as a battery) for supplying power to each component, and preferably, the power source may be logically connected to the at least one processor 10 through a power management device, so that functions of charge management, discharge management, power consumption management, and the like are implemented through the power management device. The power supply may also include one or more of any of a direct current or alternating current power supply, recharging device, power failure detection circuit, power converter or inverter, power status indicator, etc. The electronic device 1 may further include various sensors, bluetooth modules, wi-Fi modules, etc., which will not be described herein.
Further, the electronic device 1 may also comprise a network interface, optionally the network interface may comprise a wired interface and/or a wireless interface (e.g. WI-FI interface, bluetooth interface, etc.), typically used for establishing a communication connection between the electronic device 1 and other electronic devices.
The electronic device 1 may optionally further comprise a user interface, which may be a Display, an input unit, such as a Keyboard (Keyboard), or 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, or the like. The display may also be referred to as a display screen or display unit, as appropriate, for displaying information processed in the electronic device 1 and for displaying a visual user interface.
It should be understood that the embodiments described are for illustrative purposes only and are not limited to this configuration in the scope of the patent application.
The component adding program 12 stored in the memory 11 in 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 components to be added comprises positions to be added of the components to be added in the page and the component information to be added;
Loading a component corresponding to the component information to be added as a target component;
Extracting attribute parameters in the target component, and loading the attribute parameters into a preset custom method template to obtain a target custom method;
Carrying out custom configuration on the target component according to a target custom 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 above instructions by the processor 10 may refer to the description of the relevant steps in the corresponding embodiment of fig. 1, which is not repeated herein. It should be emphasized that, to further ensure the privacy and security of the preset custom method template, the preset custom method template may also be stored in a node of a blockchain.
Further, the modules/units integrated in the electronic device 1 may be stored in a computer readable storage medium if implemented in the form of software functional units and sold or used as separate products. The computer readable medium may include: any entity or device capable of carrying the computer program code, a recording medium, a U disk, a removable hard disk, a magnetic disk, an optical disk, a computer Memory, a Read-Only Memory (ROM).
In the several embodiments provided in the present invention, it should be understood that the disclosed apparatus, device and method may be implemented in other manners. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the modules is merely a logical function division, and there may be other manners of division when actually implemented.
The modules described as separate components may or may not be physically separate, and components shown as modules may or may not be physical units, may be located in one place, or may be distributed over multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional module in the embodiments of the present invention may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit. The integrated units can be realized in a form of hardware or a form of hardware and a form of software functional modules.
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 characteristics 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 blockchain is a novel application mode of computer technologies such as distributed data storage, point-to-point transmission, consensus mechanism, encryption algorithm and the like. The blockchain (Blockchain), essentially a de-centralized database, is a string of data blocks that are generated in association using cryptographic methods, each of which contains information from a batch of network transactions for verifying the validity (anti-counterfeit) of its information and generating the next block. The blockchain may include a blockchain underlying platform, a platform product services layer, an application services layer, and the like.
Furthermore, it is evident that the word "comprising" does not exclude other elements or steps, and that the singular does not exclude a plurality. A plurality of units or means recited in the system claims can also be implemented by means of software or hardware by means of one unit or means. The terms second, etc. are used to denote a name, but not any particular order.
Finally, it should be noted that the above-mentioned embodiments are merely for illustrating the technical solution of the present invention and not for limiting the same, and although the present invention has been described in detail with reference to the preferred embodiments, it should be understood by those skilled in the art that modifications and equivalents may be made to the technical solution of the present invention without departing from the spirit and scope of the technical solution of the present invention.

Claims (7)

1. A method of component addition, the method comprising:
acquiring page information of a component to be added according to a page component adding instruction; the page information of the components to be added comprises positions to be added of the components to be added in the page and the information of the components to be added;
Loading a component corresponding to the component information to be added as a target component;
Extracting attribute parameters in the target component, and loading the attribute parameters into a preset custom method template to obtain a target custom method; the method for obtaining the target custom method comprises the following steps of: extracting attribute parameters from the target component; wherein the attribute parameters comprise custom configuration object information of the target component; the attribute parameters are used as input parts to be loaded into a preset custom method template to obtain a target custom method;
Carrying out custom configuration on the target component according to the target custom method to obtain a target component to be added; comprising the following steps: the target self-defining method is used as an entry to be loaded into a preset component configuration script, and a component configuration script to be added is obtained;
The target component is subjected to self-defined configuration through the component configuration script to be added, so that the target component to be added is obtained;
Adding the target component to be added to the position to be added of the component to be added in a page; 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; adding the parsed target component to the position to be added of the component to be added in a page; the step of adding the parsed target component to the to-be-added position of the to-be-added component in the page comprises the following steps: acquiring a preset front-end script extraction tag; and extracting the parsed target component through the preset front-end script tag, and loading the parsed target component to the position to be added of the component to be added in a page.
2. The component adding method according to claim 1, wherein the obtaining, according to the page component adding instruction, page information of the component to be added includes:
acquiring a page component adding instruction; the page component adding instruction comprises a component page address 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 the target component includes:
Acquiring component information corresponding to the information of the component to be added from a preset component information table, and taking the component information 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 adding method according to claim 1, wherein the predetermined custom method template is stored in a blockchain.
5. A component adding apparatus, the apparatus comprising:
The page information acquisition module is used for acquiring page information of the components to be added according to the page component adding instruction; the page information of the components to be added comprises positions to be added of the components to be added in the page and the information of the components to be added;
The target component acquisition module is used for loading a component corresponding to the component information to be added as a target component;
The target self-defining method acquisition module is used for extracting attribute parameters in the target component and loading the attribute parameters into a preset self-defining method template to obtain a target self-defining method; the method for obtaining the target custom method comprises the following steps of: extracting attribute parameters from the target component; wherein the attribute parameters comprise custom configuration object information of the target component; the attribute parameters are used as input parts to be loaded into a preset custom method template to obtain a target custom method;
the target component to be added acquisition module is used for carrying out custom configuration on the target component according to the target custom method to obtain the target component to be added; comprising the following steps: the target self-defining method is used as an entry to be loaded into a preset component configuration script, and a component configuration script to be added is obtained;
The target component is subjected to self-defined configuration through the component configuration script to be added, so that the target component to be added is obtained;
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; 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; adding the parsed target component to the position to be added of the component to be added in a page; the step of adding the parsed target component to the to-be-added position of the to-be-added component in the page comprises the following steps: acquiring a preset front-end script extraction tag; and extracting the parsed target component through the preset front-end script tag, and loading the parsed target component to the position to be added of the component to be added in a page.
6. An electronic device, the electronic device comprising:
at least one processor; and
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 adding method of any one of claims 1 to 4.
7. A computer readable storage medium storing a computer program, wherein the computer program when executed by a processor implements the steps of the component adding method according to any one of claims 1 to 4.
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 CN112631573A (en) 2021-04-09
CN112631573B true 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 (7)

* 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
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

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8291375B2 (en) * 2004-03-29 2012-10-16 Sybase, Inc. Attribute-based component programming system and methodology for object-oriented languages

Patent Citations (7)

* 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
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
CN112631573A (en) 2021-04-09

Similar Documents

Publication Publication Date Title
CN110990053A (en) Method for creating and using machine learning scheme template and device
CN111638876A (en) Dynamic form implementation method and device, electronic equipment and storage medium
CN114491646A (en) Data desensitization method and device, electronic equipment and storage medium
CN112486490B (en) Front-end code packaging method and device, electronic equipment and storage medium
CN112214256B (en) Machine learning operation control method and device, electronic equipment and storage medium
CN111985194A (en) Data storage method and device, electronic equipment and storage medium
CN112541688A (en) Service data checking method and device, electronic equipment and computer storage medium
CN112631573B (en) Component adding method, device, equipment and computer readable storage medium
CN113515265B (en) Site configuration method, device, equipment and computer readable storage medium
CN113051171B (en) Interface testing method, device, equipment and storage medium
CN114911479A (en) Interface generation method, device, equipment and storage medium based on configuration
CN115220740A (en) Database environment deployment method and device, electronic equipment and storage medium
CN115016754A (en) Method and device for synchronously displaying pages among devices, electronic device and medium
CN114185522A (en) Page theme customizing method and device, electronic equipment and storage medium
CN114461531A (en) Platform adaptability test method, device, equipment and storage medium of test case
CN113779528A (en) Multi-system front-end page integration method, device, equipment and medium
CN113010129A (en) Virtual studio full-flow multi-terminal blackboard writing extraction method and device
CN112527655A (en) Software version quality abnormity detection method and device, electronic equipment and storage medium
CN112631675A (en) Workflow configuration method, device, equipment and computer readable storage medium
CN112667244A (en) Data verification method and device, electronic equipment and computer readable storage medium
CN112669029A (en) Bank card adding method, device, equipment and computer readable storage medium
CN114564413B (en) Synchronous equipment testing method and device
CN111667411A (en) Image transmission method and device, electronic equipment and storage medium
CN112527282B (en) Front-end page verification method and device, electronic equipment and storage medium
CN112637280B (en) Data transmission method, device, electronic equipment and 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