HK1193190B - Method and apparatus for loading interface component in custom interface system - Google Patents
Method and apparatus for loading interface component in custom interface system Download PDFInfo
- Publication number
- HK1193190B HK1193190B HK14106575.4A HK14106575A HK1193190B HK 1193190 B HK1193190 B HK 1193190B HK 14106575 A HK14106575 A HK 14106575A HK 1193190 B HK1193190 B HK 1193190B
- Authority
- HK
- Hong Kong
- Prior art keywords
- loading
- plug
- interface
- ins
- interface component
- Prior art date
Links
Description
Technical Field
The application relates to the technical field of computers, in particular to a method and a device for loading an interface component in a user-defined interface system.
Background
In a network transaction platform, a large amount of seller data generally exists, and accordingly, a targeted management platform and a large amount of management personnel are also required to manage the large amount of seller data.
The seller archive system is a platform for managing the seller data in a network transaction platform, the system can display comprehensive seller data for a user, and provides a freely-set interface for the user, the seller archive system is a user-defined interface system, the display interface of the seller data is modularized, the interface presented for the user is composed of a plurality of interface components, such as a business class data component, a seller data query component, a seller comparison component and the like, the user can freely use the interface components, the position and the display mode of the interface components can be freely changed, and the system has strong flexibility and universality. The loading of each interface component in the system interface is completed by performing interface rendering and interactive event binding according to the component template.
In the process of implementing the present application, the inventor finds that the prior art has at least the following problems: in the prior art, when an interface component is loaded, the whole interface component is subjected to integral interface rendering and interactive event binding, two different component templates need to be established even if the component templates have small difference, and the number of the component templates in the system is very large, which inevitably causes huge waste of storage and computing resources.
Disclosure of Invention
An object of the present application is to provide a method and an apparatus for loading an interface component in a custom interface system, so as to improve the utilization rate of storage and computing resources of the custom interface system, and to this end, the following technical solutions are adopted in the embodiments of the present application:
a loading method for interface components in a user-defined interface system is disclosed, wherein a plurality of plug-ins bound to each interface component are stored in advance, and the plug-ins are basic loading units forming corresponding interface components, and the method comprises the following steps:
receiving a loading instruction, wherein the loading instruction carries an identifier of a preloaded interface component and a target interface space for loading each preloaded interface component;
for each preloaded interface component in the load instruction, performing the following processing:
acquiring plug-ins bound by the preloaded interface components and loading positions of the plug-ins in a target interface space;
and respectively loading the acquired plug-ins to the loading positions of the plug-ins in the target interface space.
A loading device for interface components in a custom interface system comprises:
the storage module is used for pre-storing a plurality of plug-ins bound to each interface component, and the plug-ins are basic loading units forming the corresponding interface components;
the receiving module is used for receiving a loading instruction, wherein the loading instruction carries an identifier of each preloaded interface component and a target interface space for loading each preloaded interface component;
the acquisition module is used for acquiring the plug-ins bound by the preloading interface component and the loading positions of the plug-ins in the target interface space;
and the loading module is used for respectively loading the acquired plug-ins to the loading positions of the plug-ins in the target interface space.
In the embodiment of the application, a plurality of plug-ins bound to each interface component are stored in advance, the plug-ins are basic loading units forming corresponding interface components, and when the interface components are loaded, a loading instruction is received, the loading instruction carries an identifier of a preloaded interface component and a target interface space for loading each preloaded interface component, and each preloaded interface component in the loading instruction is processed as follows: and acquiring the plug-ins bound by the preloaded interface component and the loading positions of the plug-ins in the target interface space, and respectively loading the acquired plug-ins to the loading positions of the plug-ins in the target interface space. Therefore, the utilization rate of storage and calculation resources of the user-defined interface system can be improved. Moreover, the interface component is formed by loading a plurality of plug-ins, so that a user can construct a personalized interface component through simple interface operation, and the operation of the user is simplified to a great extent. Of course, it is not necessary for any product that implements an embodiment of the application to achieve all of the above-described advantages simultaneously.
Drawings
Fig. 1 is a schematic flowchart of a method for loading an interface component in a custom interface system according to an embodiment of the present application;
fig. 2 is a schematic view of an interface component in a method for loading an interface component in a custom interface system according to an embodiment of the present application;
fig. 3 is a second flowchart illustrating a method for loading an interface component in a custom interface system according to an embodiment of the present application;
fig. 4 is a schematic structural diagram of a loading device of an interface component in a custom interface system according to an embodiment of the present application.
Detailed Description
The technical solutions in the present application will be described clearly and completely with reference to the accompanying drawings in the present application, and it is obvious that the described embodiments are some, not all embodiments of the present application. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
Example one
The embodiment of the application provides a method for loading an interface component in a user-defined interface system, and the method is explained by combining a seller archive system in a network transaction platform. In the method, a system stores a plurality of plug-ins bound by interface components in advance. Each interface component in the system can be formed by loading a plurality of plug-ins, wherein the plug-ins are basic loading units forming the corresponding interface component, and each plug-in is used for completing one or more basic functions, such as a seller selecting function, a page selecting function, a copyright statement function and the like. The same plug-in may be included in different interface components, for example, many interface components are provided with vendor selection functionality for making selections by different vendor users. How to perform interface rendering on a corresponding loading position in an interface space and how to perform binding of an interaction event on the loading position are defined in the plug-ins, and the system can correspondingly store the identification of the interface component and a plurality of plug-ins forming the interface component. The definition of the interaction event may be described with reference to an example, for example, the interaction event defined by the page number selection plug-in is that, when a click instruction is received, a corresponding page turning operation is performed according to a clicked page number.
As shown in fig. 1, a flow of a method for loading an interface component in a custom interface system provided in the embodiment of the present application may include the following steps:
step 101, a system receives a load instruction, where the load instruction carries an identifier of a preloaded interface component and a target interface space for loading each preloaded interface component. The target interface space is a space of a certain range in the screen display interface.
The method provided by the embodiment of the application can be applied to a user-defined interface system on a terminal used by a user of a network transaction platform. When the user-defined interface system is started, the system loads each interface component in the whole display interface of the system according to the received loading instruction. In addition, in the process of using the user-defined interface system, if a new interface component is to be loaded in a certain interface space or a certain number of interface spaces, the option of 'adding an interface component' can be clicked, and the interface component to be loaded is selected from the list of the interface components, so that a loading instruction is sent to the system. The load instruction may carry an identifier of the preloaded interface component and information of a corresponding target interface space to which each preloaded interface component is loaded. The whole interface of the system can be divided into a plurality of interface spaces, and each interface space can be loaded with one interface component.
For each preloaded interface component in the load instruction, the following steps 102 and 103 are performed:
step 102, the system obtains each plug-in bound by the preloaded interface component and the loading position of each plug-in the target interface space.
Each interface component may be composed of several plug-ins, such as the interface component of business class data shown in fig. 2, which includes a vendor selection plug-in, a page selection plug-in, a copyright notice plug-in, etc.
Specifically, the system may store a template of each interface component in advance, record, in the template of the interface component, each plug-in bound in the interface component and information (such as a location identifier) of a loading location of each plug-in the target interface space, and may further include some other parameters. After the system receives the loading instruction, a template of the preloaded interface component can be called according to the identifier of the preloaded interface component in the loading instruction, then each plug-in unit of the corresponding interface component is determined to be loaded according to the template, and the loading position of each plug-in unit is determined.
And 103, respectively loading the acquired plug-ins to the loading positions of the plug-ins in the target interface space by the system.
Before loading each plug-in, a target interface space for loading the preloaded interface components may be initialized, and the target interface space is cleared. When loading a certain plug-in, the interface rendering may be performed on the corresponding loading position in the target interface space according to the plug-in, and then the interactive event binding may be performed on the loading position according to the plug-in.
The plug-ins can be loaded according to a preset sequence, the interface component can be divided into a plurality of areas, and the plug-ins with loading positions in different areas are loaded respectively.
Specifically, the system may store the area division information of each interface component in advance (may be stored in a template of the interface component), and after receiving the load instruction, the system acquires the stored area division information of the preloaded interface components. The specific process of the system for loading the interface component according to the plug-in can include: firstly, dividing a preloaded interface component into a plurality of areas according to the area division information of the preloaded interface component; and then, loading each acquired plug-in into a target interface space according to the area to which the loading position of the plug-in belongs. In addition, the loading order between the regions may be set, for example, as shown in fig. 2, the interface component is divided into a header region, a data region, and a trailer region, the loading order between the regions may be in the order from the header region, the data region, and the trailer region from top to bottom, and when the interface component is loaded, the plug-in the header region may be loaded first, then the plug-in the data region may be loaded, and finally the plug-in the trailer region may be loaded.
In the area, interface rendering can be performed on the loading positions of all the plug-ins according to a preset plug-in sequence, and then interactive event binding is performed on all the loading positions according to the sequence. For example, a certain area includes two plug-ins, i.e., a plug-in 1 and a plug-in 2, the system may call the plug-in 1 to perform interface rendering on a corresponding loading position, then call the plug-in 2 to perform interface rendering on a corresponding loading position, then call the plug-in 1 to perform interaction event binding, and then call the plug-in 2 to perform interaction event binding.
Preferably, if the display data of the preloaded interface component includes data acquired from a background server (which may also be referred to as asynchronous data and needs a user to initiate a request to acquire the data from the background server after the system is started), the divided multiple areas at least include a data area for displaying the data acquired from the background server; and when the plug-in the data area is loaded, loading the plug-in the data area according to the data acquired from the background server.
The method comprises the steps that the area for displaying asynchronous data is independently divided into data areas in a preloading interface component, when plug-ins in the data areas are loaded, the system can firstly acquire the asynchronous data needing to be displayed in the data areas from a background server, then interface rendering is carried out on corresponding loading positions according to the plug-ins and the acquired asynchronous data, and interactive event binding is carried out on the corresponding loading positions according to the plug-ins.
When the data in the data area is updated, the system can reload the plug-ins in the data area according to the updated data. That is, after the asynchronous data is updated, the data area may be reloaded according to the updated asynchronous data, and at this time, the reloading may not be performed on other areas.
In an embodiment of the application, a system stores a plurality of plug-ins bound to each interface component in advance, the plurality of plug-ins are basic loading units forming corresponding interface components, when the interface components are loaded, the system receives a loading instruction, the loading instruction carries an identifier of a preloaded interface component and a target interface space for loading each preloaded interface component, and the system performs the following processing on each preloaded interface component in the loading instruction: and acquiring the plug-ins bound by the preloaded interface component and the loading positions of the plug-ins in the target interface space, and respectively loading the acquired plug-ins to the loading positions of the plug-ins in the target interface space. Therefore, the utilization rate of storage and calculation resources of the user-defined interface system can be improved. Moreover, the interface component is formed by loading a plurality of plug-ins, so that a user can construct a personalized interface component through simple interface operation, and the operation of the user is simplified to a great extent.
Example two
As shown in fig. 3, it is a processing flow of the loading method of the interface component in the custom interface system provided by the embodiment of the present application in a specific application scenario (a loading process of the interface component shown in fig. 2, the interface component is divided into three areas, namely, a head area, a data area, and a tail area), and may include the following steps:
step 301, a system receives a load instruction, where the load instruction carries an identifier of a preloaded interface component and may also carry an identifier of a target interface space for loading the preloaded interface component.
For each preloaded interface component in the load instruction, the following steps 302 and 310 are performed:
step 302, the system acquires the plug-ins bound by the preloaded interface components and the loading positions of the plug-ins in the target interface space.
Step 303, the system initializes the target interface space and empties the contents in the interface space.
In step 304, the system performs interface rendering on the head region of the interface component. Specifically, the system renders an interface of the corresponding loading position according to the seller selecting plug-in.
Step 305, the system performs an interaction event binding to the header region of the interface component. Specifically, the system performs interaction event binding on the corresponding loading position according to the seller selecting plug-in.
Step 306, the system obtains asynchronous data from the background server.
Step 307, the system performs interface rendering on the data area of the interface component. Specifically, the system performs interface rendering on the corresponding loading position according to the data display plug-in and the obtained asynchronous data.
In step 308, the system performs an interaction event binding to the data area of the interface component. Specifically, the system performs interactive event binding on the corresponding loading position according to the data display plug-in.
Step 309, the system renders the interface to the tail region of the interface component. Specifically, the plug-in may be selected according to the page number to perform interface rendering on the corresponding loading position, and then the corresponding loading position may be performed interface rendering according to the copyright notice plug-in.
In step 310, the system performs an interactive event binding to the tail region of the interface component. Specifically, the plug-in may be selected to perform the interactive event binding on the corresponding loading position according to the page number, and then perform the interactive event binding on the corresponding loading position according to the copyright notice plug-in.
As shown below, an example of a program of a method for loading an interface component in a custom interface system provided in the embodiment of the present application is provided.
In the above example, a udcruderer (a Base Renderer) is defined, and the method and attribute to be implemented by the Base Renderer are specified in the Base Renderer. Some parameters are briefly described below:
dataSource: a data source is defined, and the system obtains an entry of asynchronous data, generally in json format. The definition is made when the asynchronous data is initially loaded. The following parameters may be specifically included: url: a requested URL (Uniform resource locator), an entry of a background server for asynchronous data acquisition; type: a method of data request, having a value of "get" or "post"; dataType: the type of the request data return supports a 'json' or 'xml' format; data: data in json format is sent as post to the parameter domain of the backend server.
before render: and (3) an interface rendering (which can be called rendering for short) method of the head area.
dataRender: according to the rendering method of the data area, if the display data of the data area needs to be updated, the method is called again to render the data area, and the head area and the tail area are not affected.
afferRender: and a non-data area tail rendering method.
bindeventbeform: a head region interaction event binding method.
bindEventData: and (3) a data area interaction event binding method.
bindEventAfter: and a tail area interaction event binding method.
In the above program example, a plug-in is called in the basic renderer, and is instantiated as follows:
calling corresponding plug-ins to respectively perform interactive event binding on corresponding loading positions in the region, wherein the specific steps are as follows:
in an embodiment of the application, a system stores a plurality of plug-ins bound to each interface component in advance, the plurality of plug-ins are basic loading units forming corresponding interface components, when the interface components are loaded, the system receives a loading instruction, the loading instruction carries an identifier of a preloaded interface component and a target interface space for loading each preloaded interface component, and the system performs the following processing on each preloaded interface component in the loading instruction: and acquiring the plug-ins bound by the preloaded interface component and the loading positions of the plug-ins in the target interface space, and respectively loading the acquired plug-ins to the loading positions of the plug-ins in the target interface space. Therefore, the utilization rate of storage and calculation resources of the user-defined interface system can be improved. Moreover, the interface component is formed by loading a plurality of plug-ins, so that a user can construct a personalized interface component through simple interface operation, and the operation of the user is simplified to a great extent.
EXAMPLE III
Based on the same technical concept, an embodiment of the present application further provides a loading device for an interface component in a custom interface system, as shown in fig. 4, including:
a storage module 410, configured to pre-store a plurality of plug-ins bound to each interface component, where the plug-ins are basic loading units that constitute corresponding interface components;
a receiving module 420, configured to receive a load instruction, where the load instruction carries an identifier of a preloaded interface component and a target interface space for loading each preloaded interface component;
an obtaining module 430, configured to obtain each plugin bound to the preloaded interface component and a loading position of each plugin in a target interface space;
and a loading module 440, configured to load the acquired plug-ins to their loading positions in the target interface space, respectively.
Preferably, the storage module 410 is further configured to store area division information of each interface component in advance;
the loading module 440 is specifically configured to divide the preloaded interface component into a plurality of regions according to the region division information of the preloaded interface component; and respectively loading the acquired plug-ins into a target interface space according to the areas to which the loading positions of the plug-ins belong.
Preferably, if the display data of the preloaded interface component includes data acquired from a backend server, the plurality of divided areas at least include a data area for displaying the data acquired from the backend server;
the loading module 440 is specifically configured to, when loading a plug-in a data area, load the plug-in the data area according to the data acquired from the background server.
Preferably, the loading module 440 is further configured to: and when the data in the data area is updated, reloading the plug-in the data area according to the updated data.
Preferably, the system further comprises an initialization module, configured to initialize the target interface space for loading the preloaded interface component.
Preferably, the loading module 440 is specifically configured to:
according to the plug-in, performing interface rendering on a corresponding loading position in a target interface space;
and according to the plug-in, performing interactive event binding on the loading position.
In the embodiment of the application, a plurality of plug-ins bound to each interface component are stored in advance, the plug-ins are basic loading units forming corresponding interface components, and when the interface components are loaded, a loading instruction is received, the loading instruction carries an identifier of a preloaded interface component and a target interface space for loading each preloaded interface component, and each preloaded interface component in the loading instruction is processed as follows: and acquiring the plug-ins bound by the preloaded interface component and the loading positions of the plug-ins in the target interface space, and respectively loading the acquired plug-ins to the loading positions of the plug-ins in the target interface space. Therefore, the utilization rate of storage and calculation resources of the user-defined interface system can be improved. Moreover, the interface component is formed by loading a plurality of plug-ins, so that a user can construct a personalized interface component through simple interface operation, and the operation of the user is simplified to a great extent.
Those skilled in the art will appreciate that the modules in the devices in the embodiments may be distributed in the devices in the embodiments according to the description of the embodiments, and may be correspondingly changed in one or more devices different from the embodiments. The modules of the above embodiments may be combined into one module, or further split into multiple sub-modules.
The above-mentioned serial numbers of the embodiments of the present application are merely for description and do not represent the merits of the embodiments.
Through the above description of the embodiments, those skilled in the art will clearly understand that the present application can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better embodiment. Based on such understanding, the technical solutions of the present application may be substantially or partially embodied in the form of a software product stored in a storage medium, and including instructions for causing a terminal device (which may be a mobile phone, a personal computer, a server, or a network device) to execute the method according to the embodiments of the present application.
The foregoing is only a preferred embodiment of the present application, and it should be noted that, for those skilled in the art, various modifications and decorations can be made without departing from the principle of the present application, and these modifications and decorations should also be considered to be within the protection scope of the present application.
Claims (10)
1. A loading method of interface components in a user-defined interface system is characterized in that a plurality of plug-ins bound to each interface component are stored in advance, and the plug-ins are basic loading units forming corresponding interface components, and the method comprises the following steps:
receiving a loading instruction, wherein the loading instruction carries an identifier of a preloaded interface component and a target interface space for loading each preloaded interface component;
for each preloaded interface component in the load instruction, performing the following processing:
acquiring plug-ins bound by the preloaded interface components and loading positions of the plug-ins in a target interface space;
loading the acquired plug-ins to loading positions of the plug-ins in a target interface space respectively;
wherein the plug-in is used to perform one or more functions.
2. The method of claim 1, further comprising: pre-storing the area division information of each interface component;
loading the acquired plug-ins to loading positions of the plug-ins in a target interface space respectively, specifically:
dividing the preloading interface assembly into a plurality of areas according to the area division information of the preloading interface assembly;
and respectively loading the acquired plug-ins into a target interface space according to the areas to which the loading positions of the plug-ins belong.
3. The method of claim 2, wherein if the display data of the preloaded interface component includes data acquired from a background server, the divided areas at least include a data area for displaying the data acquired from the background server; and when the plug-in the data area is loaded, loading the plug-in the data area according to the data acquired from the background server.
4. The method of claim 3, when updating data in the data area, further comprising:
and reloading the plug-in the data area according to the updated data.
5. The method of claim 1, wherein before loading each of the acquired plugins to its loading position in the target interface space, respectively, further comprising: initializing a target interface space for loading the preloaded interface components.
6. The method of claim 1, wherein loading the plug-in to its loading location in the target interface space comprises:
according to the plug-in, performing interface rendering on a corresponding loading position in a target interface space;
and according to the plug-in, performing interactive event binding on the loading position.
7. A loading device for interface components in a user-defined interface system is characterized by comprising:
the storage module is used for pre-storing a plurality of plug-ins bound by each interface component, and the plug-ins are basic loading units forming the corresponding interface components;
the system comprises a receiving module, a processing module and a processing module, wherein the receiving module is used for receiving a loading instruction, and the loading instruction carries an identifier of a preloaded interface component and a target interface space for loading each preloaded interface component;
the acquisition module is used for acquiring the plug-ins bound by the preloading interface component and the loading positions of the plug-ins in the target interface space;
the loading module is used for respectively loading the acquired plug-ins to the loading positions of the plug-ins in the target interface space;
wherein the plug-in is used to perform one or more functions.
8. The apparatus of claim 7,
the storage module is also used for pre-storing the area division information of each interface component;
the loading module is specifically configured to divide the preloaded interface component into a plurality of regions according to the region division information of the preloaded interface component; and respectively loading the acquired plug-ins into a target interface space according to the areas to which the loading positions of the plug-ins belong.
9. The apparatus of claim 8, wherein if the display data of the preloaded interface component includes data obtained from a background server, at least a data area is included in the divided areas for displaying the data obtained from the background server;
the loading module is specifically configured to load the plug-in the data area according to the data acquired from the background server when the plug-in the data area is loaded.
10. The apparatus of claim 9, wherein the loading module is further to: and when the data in the data area is updated, reloading the plug-in the data area according to the updated data.
Publications (2)
| Publication Number | Publication Date |
|---|---|
| HK1193190A HK1193190A (en) | 2014-09-12 |
| HK1193190B true HK1193190B (en) | 2018-05-25 |
Family
ID=
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US8499250B2 (en) | Apparatus and methods for interacting with multiple information forms across multiple types of computing devices | |
| US11295035B2 (en) | Application freezing management method, device and terminal | |
| EP3657358A1 (en) | Method, device and system for persistent data processing, and readable storage medium | |
| US11474842B2 (en) | Integration application creator design | |
| US9460407B2 (en) | Generating graphical representations of data | |
| CN112000746B (en) | Data management method and device and server | |
| CN110941779A (en) | Page loading method and device, storage medium and electronic equipment | |
| US20160196008A1 (en) | Implementing desktops on a mobile terminal | |
| US20170277526A1 (en) | Software categorization method and electronic device | |
| CN102457579B (en) | A kind of method and system realizing Business Processing in cloud terminal | |
| EP4377789B1 (en) | Techniques for distributed interface component generation | |
| US9658933B2 (en) | Automatically modifying a test for a program on multiple electronic devices | |
| CN106022010A (en) | File display method and device | |
| US10223463B2 (en) | Node controllers for hierarchical data structures | |
| US20170169792A1 (en) | Electronic device and method for releasing content to multiple terminals | |
| CN112583694A (en) | Message pushing method and device, storage medium and control terminal | |
| HK1193190A (en) | Method and apparatus for loading interface component in custom interface system | |
| HK1193190B (en) | Method and apparatus for loading interface component in custom interface system | |
| CN110908745A (en) | Data analysis display method and system, storage medium, server and client | |
| CN114157665A (en) | Method and device for controlling multi-screen display, electronic equipment and storage medium | |
| CN112365320A (en) | Product information processing method and device, electronic equipment and storage medium | |
| CN114637567A (en) | Interface processing method and device based on business data and computer equipment | |
| CN113781178A (en) | Decoration data integration application method, device and readable storage medium | |
| CN116566813B (en) | A method, apparatus, electronic device, and storage medium for deploying proprietary cloud applications. | |
| CN114064774B (en) | Table view loading method, device, equipment and storage medium of application program |