CN112528189A - Data-based component packaging method and device, computer equipment and storage medium - Google Patents

Data-based component packaging method and device, computer equipment and storage medium Download PDF

Info

Publication number
CN112528189A
CN112528189A CN202011540157.5A CN202011540157A CN112528189A CN 112528189 A CN112528189 A CN 112528189A CN 202011540157 A CN202011540157 A CN 202011540157A CN 112528189 A CN112528189 A CN 112528189A
Authority
CN
China
Prior art keywords
data
page
determining
target
component packaging
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202011540157.5A
Other languages
Chinese (zh)
Inventor
冯麒麟
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Ping An Puhui Enterprise Management Co Ltd
Original Assignee
Ping An Puhui Enterprise Management Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Ping An Puhui Enterprise Management Co Ltd filed Critical Ping An Puhui Enterprise Management Co Ltd
Priority to CN202011540157.5A priority Critical patent/CN112528189A/en
Publication of CN112528189A publication Critical patent/CN112528189A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • 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
    • G06F16/9574Browsing optimisation, e.g. caching or content distillation of access to content, e.g. by caching
    • 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
    • G06F16/9577Optimising the visualization of content, e.g. distillation of HTML documents
    • 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/958Organisation or management of web site content, e.g. publishing, maintaining pages or automatic linking

Abstract

The invention relates to the technical field of data processing, and discloses a data-based component packaging method, a data-based component packaging device, computer equipment and a storage medium, wherein the data-based component packaging method comprises the following steps: acquiring data, and determining a data loading mode according to the attribute of the data; determining page nodes in a display page according to the data loading mode, and rendering the display page according to the page nodes, wherein the display page is used for displaying the data; determining target data in the rendered display page; generating a data mapping process corresponding to the target data according to a preset data mapping rule; and performing component packaging on the target data and the data mapping process corresponding to the target data. The invention can encapsulate corresponding components based on the data, thereby improving the processing efficiency of the data.

Description

Data-based component packaging method and device, computer equipment and storage medium
Technical Field
The present invention relates to the field of data processing technologies, and in particular, to a method and an apparatus for packaging a component based on data, a computer device, and a storage medium.
Background
Currently, pull-down components are mainly used in the market to select data, and a user can select the data required by the user by clicking the pull-down box to slide for a few times, but the user has no lack of use scenarios, such as: when a certain employee is wanted to be found in a company, the user is obviously not friendly enough by continuously sliding the pull-down selection box due to the huge data volume, so that the data processing efficiency is low; in addition, from the perspective of component development, when the number of pull-down selections is too large, the pressure of node rendering is also caused, which may cause the page rendering to be too long and the page rendering efficiency to be low.
Therefore, how to generate components based on data to improve data processing efficiency becomes an urgent problem to be solved.
Disclosure of Invention
In view of the foregoing, there is a need for a data-based component packaging method, apparatus, computer device and storage medium, which can package corresponding components based on data so as to improve data processing efficiency.
A first aspect of the present invention provides a data-based component packaging method, including:
acquiring data, and determining a data loading mode according to the attribute of the data;
determining page nodes in a display page according to the data loading mode, and rendering the display page according to the page nodes, wherein the display page is used for displaying the data;
determining target data in the rendered display page;
generating a data mapping process corresponding to the target data according to a preset data mapping rule;
and performing component packaging on the target data and the data mapping process corresponding to the target data.
According to an optional embodiment of the present invention, the determining a data loading manner according to the attribute of the data includes:
judging whether the data volume of the data exceeds a preset data threshold value or not;
when the data volume of the data exceeds a preset data threshold value, determining a plurality of key fields corresponding to the data;
determining field types corresponding to the plurality of key fields;
and when the field types corresponding to the key fields are not consistent, determining that the data loading mode is paging loading according to the field types.
According to an optional embodiment of the present invention, the rendering the presentation page according to the page node comprises:
constructing a laminated tree corresponding to the display page according to the page nodes;
obtaining a descriptive text corresponding to the display page, and analyzing the descriptive text to generate a tree structure corresponding to the display page;
traversing the tree structure from a root node of the tree structure to obtain a plurality of visible nodes, and determining node rules corresponding to the visible nodes on the stacked tree; combining the plurality of visible nodes according to node rules corresponding to the plurality of visible nodes to generate a rendering tree;
and traversing each node in the rendering tree layer by layer to render the display page.
According to an alternative embodiment of the present invention, the determining the target data in the rendered page includes:
performing paging display on the rendered page according to a preset paging rule;
and responding to the selection operation of the user in each page, and determining the data corresponding to the selection operation as target data.
According to an optional embodiment of the present invention, the performing paging display on the rendered page according to the preset paging rule includes:
determining a tree structure of the data;
and determining the paging sequence of the data in the tree structure according to the hierarchical relationship of the tree structure, and performing paging display on the rendered page by the data according to the paging sequence.
According to an alternative embodiment of the invention, the method further comprises:
determining address information pointed by the selection operation of the user as the address information of the selection operation sent by the user;
inquiring authority information matched with the address information in a preset address authority database;
and when the authority information is target authority information, determining that the user has the authority for carrying out selection operation, and determining data corresponding to the selection operation as target data.
According to an optional embodiment of the present invention, the determining, in response to a selection operation of a user in each page, data corresponding to the selection operation as target data includes:
extracting data corresponding to the selection operation of the user in each page;
determining a data hierarchy corresponding to the data;
and determining the data matched with the data hierarchy in the display page as target data.
A second aspect of the invention provides a data-based component packaging apparatus, the apparatus comprising:
the data acquisition module is used for acquiring data and determining a data loading mode according to the attribute of the data;
the page rendering module is used for determining page nodes in a display page according to the data loading mode and rendering the display page according to the page nodes, wherein the display page is used for displaying the data;
the target determining module is used for determining target data in the rendered display page;
the data mapping module is used for generating a data mapping process corresponding to the target data according to a preset data mapping rule;
and the component packaging module is used for performing component packaging on the target data and the data mapping process corresponding to the target data.
A third aspect of the invention provides a computer device comprising a memory and a processor; the memory is used for storing a computer program; the processor is configured to execute the computer program and to implement the data-based component packaging method as described above when executing the computer program.
A fourth aspect of the present invention provides a computer-readable storage medium storing a computer program which, when executed by a processor, causes the processor to implement the data-based component packaging method as described above.
The embodiment of the invention discloses a data-based component packaging method, a data-based component packaging device, computer equipment and a storage medium, wherein a data loading mode is determined according to the attribute of data by acquiring the data, and the data loading mode is determined according to the attribute of the data, so that the condition that the rendering rate is too slow due to too large page rendering pressure when all data are loaded for one time due to too much data is avoided; determining page nodes in a display page according to the data loading mode, rendering the display page according to the page nodes, wherein the display page is used for displaying the data, rendering the display page according to the page nodes, and when rendering interruption occurs in the rendering process, the page nodes with interruption can be quickly found and can be continuously rendered, so that the rendering rate is increased; determining target data in the rendered display page; generating a data mapping flow corresponding to the target data according to a preset data mapping rule, and mapping the target data to avoid the target data from being lost and ensure the integrity of the target data so as to improve the processing efficiency of the data; and performing component packaging on the target data and the data mapping process corresponding to the target data, so that the use management and the subsequent maintenance and expansion of a user are facilitated.
Drawings
FIG. 1 is a flow chart of a data-based component packaging method according to an embodiment of the present invention;
FIG. 2 is a schematic block diagram of a data-based component packaging apparatus provided by an embodiment of the present invention;
fig. 3 is a schematic block diagram of a structure of a computer device according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The flow diagrams depicted in the figures are merely illustrative and do not necessarily include all of the elements and operations/steps, nor do they necessarily have to be performed in the order depicted. For example, some operations/steps may be decomposed, combined or partially combined, so that the actual execution sequence may be changed according to the actual situation.
The embodiment of the invention provides a data-based component packaging method and device, computer equipment and a computer-readable storage medium. The data-based component packaging method can be applied to terminal equipment or a server, the terminal equipment can be electronic equipment such as a mobile phone, a tablet computer, a notebook computer, a desktop computer, a personal digital assistant and wearable equipment, and the server can be a single server or a server cluster consisting of a plurality of servers. The following explanation takes the application of the data-based component encapsulation method to a server as an example.
Some embodiments of the invention are described in detail below with reference to the accompanying drawings. The embodiments described below and the features of the embodiments can be combined with each other without conflict.
Referring to fig. 1, fig. 1 is a schematic flow chart of a data-based component packaging method according to an embodiment of the present invention.
As shown in fig. 1, the data-based component packaging method specifically includes steps S11 to S15, and the order of the steps in the flowchart may be changed or some of the steps may be omitted according to different requirements.
And S11, acquiring data, and determining a data loading mode according to the attributes of the data.
The method comprises the steps of obtaining data to be loaded, determining a data loading mode according to the attribute of the data, wherein the attribute of the data can comprise the calculation attribute and the category attribute of the data, and the data loading mode comprises rolling loading and paging loading.
In some embodiments, the determining a data loading manner according to the attribute of the data includes:
judging whether the data volume of the data exceeds a preset data threshold value or not;
when the data volume of the data exceeds a preset data threshold value, determining a plurality of key fields corresponding to the data;
determining field types corresponding to the plurality of key fields; and when the field types corresponding to the key fields are not consistent, determining that the data loading mode is paging loading according to the field types.
For example, a paging data threshold may be preset, when the data amount of the data to be loaded is greater than a preset data threshold, it is described that the data to be loaded reaches a preliminary condition for paging, then a plurality of key fields corresponding to the data are determined, and whether paging is performed is determined according to the field types of the key fields. For example, when the field types of the key fields corresponding to the data are consistent, it is determined not to perform paging, and when the field types of the key fields corresponding to the data are inconsistent, it is determined to perform paging according to the field types.
The data loading mode is determined according to the data attribute, and the situation that when too much data is loaded at one time, the rendering rate is too slow due to too high page rendering pressure is avoided.
S12, determining a page node in a display page according to the data loading mode, and rendering the display page according to the page node, wherein the display page is used for displaying the data.
And acquiring a display page to be displayed, wherein the display page comprises an application display page and a webpage display page, and determining a page node in the display page according to the data loading mode, and the page node is used for representing the page circulation condition of the display page. For example, when the determined data loading manner is paging loading, page nodes in the display page are determined according to the order of paging loading, for example, page nodes corresponding to a page with a paging loading order before are also before.
The display page is rendered according to the page nodes, and when rendering interruption occurs in the rendering process, the page nodes with interruption can be quickly found and rendered continuously, so that the rendering rate is increased.
In some embodiments, said rendering said presentation page according to said page node comprises:
constructing a laminated tree corresponding to the display page according to the page nodes;
obtaining a descriptive text corresponding to the display page, and analyzing the descriptive text to generate a tree structure corresponding to the display page;
traversing the tree structure from a root node of the tree structure to obtain a plurality of visible nodes, and determining node rules corresponding to the visible nodes on the stacked tree; combining the plurality of visible nodes according to node rules corresponding to the plurality of visible nodes to generate a rendering tree;
and traversing each node in the rendering tree layer by layer to render the display page.
Illustratively, the cascading tree includes a CSS tree, the tree structure includes a Document Object Model (DOM), and rendering the presentation page by constructing a rendering tree can improve efficiency of traversing the presentation page, thereby accelerating rendering efficiency of the presentation page.
And S13, determining target data in the rendered display page.
And displaying the data in the rendered display page, and determining target data in the data in response to the operation of a user, wherein the target data can be the data displayed in the pull-down component. Target data is determined in the data as pull-down data according to requirements, the situation that page rendering pressure is too large due to too much pull-down data can be avoided, and therefore the use efficiency of the pull-down assembly is improved.
When the data displayed is excessive, paging can be applied, that is, the data displayed is loaded in each paging according to a certain proportion.
In some embodiments, the determining target data in the rendered page comprises:
performing paging display on the rendered page according to a preset paging rule;
and responding to the selection operation of the user in each page, and determining the data corresponding to the selection operation as target data.
For example, the preset paging rule may include paging according to a data level corresponding to the data, where data with a high data level is displayed first, and data with a low data level is displayed later. For example, the data hierarchy includes primary data, secondary data, and tertiary data, and the content corresponding to the primary data may be displayed in a first page, the content corresponding to the secondary data may be displayed in a second page, and the content corresponding to the tertiary data may be displayed in a third page.
In some embodiments, the performing paging display on the rendered page according to the preset paging rule includes:
determining a tree structure of the data;
and determining the paging sequence of the data in the tree structure according to the hierarchical relationship of the tree structure, and performing paging display on the rendered page by the data according to the paging sequence.
For example, the tree structure of the data includes a root node, a parent node below the root node, and multiple layers of child nodes below the parent node, and the determining of the paging order of the data in the tree structure according to the hierarchical relationship of the tree structure may be that a first paging is started to be loaded from the root node to multiple parent nodes below the root node, a second paging is started to be loaded from the root node to the first layer of child nodes below the multiple parent nodes, and a third paging is started to be loaded from the root node to the second layer of child nodes below the multiple parent nodes.
And loading the data according to the tree structure of the data, so that the ordering of data loading can be improved, and the condition that the data loading is incomplete due to the interruption of the data loading is avoided.
In some embodiments, the method further comprises:
determining address information pointed by the selection operation of the user as the address information of the selection operation sent by the user;
inquiring authority information matched with the address information in a preset address authority database;
and when the authority information is target authority information, determining that the user has the authority for carrying out selection operation, and determining data corresponding to the selection operation as target data.
Illustratively, when the authority information matched with the address information is inquired in a preset address authority database, whether the authority information of the user is the target authority information is determined. And when the authority information is not the target authority information, determining that the user does not have the authority for the authority configuration, and refusing to respond to the selection operation of the user in each page. In some embodiments, when it is determined that the user does not have the authority to configure the authority, a security prompt is sent to the designated server. By determining whether the user has the selection operation authority for the data, the safety of the data can be ensured, and the data is prevented from being easily tampered, so that the processing efficiency of the data is influenced.
In some embodiments, the determining, in response to a selection operation of a user in each page, data corresponding to the selection operation as target data includes:
extracting data corresponding to the selection operation of the user in each page;
determining a data hierarchy corresponding to the data;
and determining the data matched with the data hierarchy in the display page as target data.
Illustratively, the data hierarchy includes a node hierarchy of the data in a tree structure corresponding to the data, all data from a root node in the tree structure to the node hierarchy is determined as target data, the data hierarchy further includes a data level corresponding to the data, and data matched with the data level is taken as target data.
And S14, generating a data mapping flow corresponding to the target data according to a preset data mapping rule.
Illustratively, a data mapping rule is preset according to the service requirement of the pull-down component, and data mapping is performed on the target data according to the rule to generate a data mapping process, where the data mapping process is used to display the target data.
By mapping the target data, the target data can be prevented from being lost, the integrity of the target data is ensured, and the data processing efficiency is improved.
S15, performing component packaging on the target data and the data mapping process corresponding to the target data.
And the target data and the data mapping process corresponding to the target data are subjected to component packaging, so that the use management and the subsequent maintenance and expansion of a user can be facilitated.
In some embodiments, the target data after component encapsulation and the data mapping flow corresponding to the target data are stored in a block chain, so that the privacy and the security of the target data are ensured, and the security of the data-based component encapsulation method is improved.
According to the data-based component packaging method provided by the embodiment, the data loading mode is determined according to the attributes of the data by acquiring the data, and the data loading mode is determined according to the attributes of the data, so that the situation that the rendering rate is too slow due to too large page rendering pressure when all data are loaded for one time due to too much data is avoided; determining page nodes in a display page according to the data loading mode, rendering the display page according to the page nodes, wherein the display page is used for displaying the data, rendering the display page according to the page nodes, and when rendering interruption occurs in the rendering process, the page nodes with interruption can be quickly found and can be continuously rendered, so that the rendering rate is increased; determining target data in the rendered display page; generating a data mapping flow corresponding to the target data according to a preset data mapping rule, and mapping the target data to avoid the target data from being lost and ensure the integrity of the target data so as to improve the processing efficiency of the data; and performing component packaging on the target data and the data mapping process corresponding to the target data, so that the use management and the subsequent maintenance and expansion of a user are facilitated.
Referring to fig. 2, fig. 2 is a schematic block diagram of a data-based component packaging apparatus according to an embodiment of the present invention.
In some embodiments, the data-based component packaging apparatus 20 may include a plurality of functional modules consisting of computer program segments, and the computer program of each program segment in the data-based component packaging apparatus 20 may be stored in a memory of the electronic device and executed by at least one processor to perform (described in detail in fig. 1) the function of page content scrolling processing, and the data-based component packaging apparatus may be configured in a server or a terminal.
The server may be an independent server or a server cluster. The terminal can be an electronic device such as a mobile phone, a tablet computer, a notebook computer, a desktop computer, a personal digital assistant and a wearable device.
In this embodiment, the data-based component packaging apparatus 20 may be divided into a plurality of functional modules according to the functions it performs. As shown in fig. 2, the functional module may include: a data acquisition module 201, a page rendering module 202, a targeting module 203, a data mapping module 204, and a component encapsulation module 205. The module referred to herein is a series of computer program segments capable of being executed by at least one processor and capable of performing a fixed function and is stored in memory. In the present embodiment, the functions of the modules will be described in detail in the following embodiments.
The data obtaining module 201 is configured to obtain data, and determine a data loading manner according to an attribute of the data.
The method comprises the steps of obtaining data to be loaded, determining a data loading mode according to the attribute of the data, wherein the attribute of the data can comprise the calculation attribute and the category attribute of the data, and the data loading mode comprises rolling loading and paging loading.
In some embodiments, the determining, by the data obtaining module 201, a data loading manner according to the attribute of the data includes:
judging whether the data volume of the data exceeds a preset data threshold value or not;
when the data volume of the data exceeds a preset data threshold value, determining a plurality of key fields corresponding to the data;
determining field types corresponding to the plurality of key fields; and when the field types corresponding to the key fields are not consistent, determining that the data loading mode is paging loading according to the field types.
For example, a paging data threshold may be preset, when the data amount of the data to be loaded is greater than a preset data threshold, it is described that the data to be loaded reaches a preliminary condition for paging, then a plurality of key fields corresponding to the data are determined, and whether paging is performed is determined according to the field types of the key fields. And when the field types of the key fields corresponding to the data are not consistent, determining to perform paging according to the field types.
The data loading mode is determined according to the data attribute, and the situation that when too much data is loaded at one time, the rendering rate is too slow due to too high page rendering pressure is avoided.
And a page rendering module 202, configured to determine a page node in a display page according to the data loading manner, and render the display page according to the page node, where the display page is used to display the data.
And acquiring a display page to be displayed, wherein the display page comprises an application display page and a webpage display page, and determining a page node in the display page according to the data loading mode, and the page node is used for representing the page circulation condition of the display page. For example, when the determined data loading manner is paging loading, page nodes in the display page are determined according to the order of paging loading, for example, page nodes corresponding to a page with a paging loading order before are also before.
The display page is rendered according to the page nodes, and when rendering interruption occurs in the rendering process, the page nodes with interruption can be quickly found and rendered continuously, so that the rendering rate is increased.
In some embodiments, rendering the display page according to the page node by the page rendering module 202 comprises:
constructing a laminated tree corresponding to the display page according to the page nodes;
obtaining a descriptive text corresponding to the display page, and analyzing the descriptive text to generate a tree structure corresponding to the display page;
traversing the tree structure from a root node of the tree structure to obtain a plurality of visible nodes, and determining node rules corresponding to the visible nodes on the stacked tree; combining the plurality of visible nodes according to node rules corresponding to the plurality of visible nodes to generate a rendering tree;
and traversing each node in the rendering tree layer by layer to render the display page.
Illustratively, the cascading tree includes a CSS tree, the tree structure includes a Document Object Model (DOM), and rendering the presentation page by constructing a rendering tree can improve efficiency of traversing the presentation page, thereby accelerating rendering efficiency of the presentation page.
And the target determining module 203 is used for determining target data in the rendered display page.
And displaying the data in the rendered display page, and determining target data in the data in response to the operation of a user, wherein the target data can be the data displayed in the pull-down component. Target data is determined in the data as pull-down data according to requirements, the situation that page rendering pressure is too large due to too much pull-down data can be avoided, and therefore the use efficiency of the pull-down assembly is improved.
When the data displayed is excessive, paging can be applied, that is, the data displayed is loaded in each paging according to a certain proportion.
In some embodiments, the targeting module 203 determines the target data in the rendered page comprises:
performing paging display on the rendered page according to a preset paging rule;
and responding to the selection operation of the user in each page, and determining the data corresponding to the selection operation as target data.
For example, the preset paging rule may include paging according to a data level corresponding to the data, where data with a high data level is displayed first, and data with a low data level is displayed later. For example, the data hierarchy includes primary data, secondary data, and tertiary data, and the content corresponding to the primary data may be displayed in a first page, the content corresponding to the secondary data may be displayed in a second page, and the content corresponding to the tertiary data may be displayed in a third page.
In some embodiments, the performing, by the targeting module 203, a paging display of the data on the rendered page according to a preset paging rule includes:
determining a tree structure of the data;
and determining the paging sequence of the data in the tree structure according to the hierarchical relationship of the tree structure, and performing paging display on the rendered page by the data according to the paging sequence.
For example, the tree structure of the data includes a root node, a parent node below the root node, and multiple layers of child nodes below the parent node, and the determining of the paging order of the data in the tree structure according to the hierarchical relationship of the tree structure may be that a first paging is started to be loaded from the root node to multiple parent nodes below the root node, a second paging is started to be loaded from the root node to the first layer of child nodes below the multiple parent nodes, and a third paging is started to be loaded from the root node to the second layer of child nodes below the multiple parent nodes.
And loading the data according to the tree structure of the data, so that the ordering of data loading can be improved, and the condition that the data loading is incomplete due to the interruption of the data loading is avoided.
In some embodiments, the goal determination module 203 is further configured to:
determining address information pointed by the selection operation of the user as the address information of the selection operation sent by the user;
inquiring authority information matched with the address information in a preset address authority database;
and when the authority information is target authority information, determining that the user has the authority for carrying out selection operation, and determining data corresponding to the selection operation as target data.
Illustratively, when the authority information matched with the address information is inquired in a preset address authority database, whether the authority information of the user is the target authority information is determined. And when the authority information is not the target authority information, determining that the user does not have the authority for the authority configuration, and refusing to respond to the selection operation of the user in each page. In some embodiments, when it is determined that the user does not have the authority to configure the authority, a security prompt is sent to the designated server. By determining whether the user has the selection operation authority for the data, the safety of the data can be ensured, and the data is prevented from being easily tampered, so that the processing efficiency of the data is influenced.
In some embodiments, the target determining module 203, in response to a selection operation of a user in each page, determining data corresponding to the selection operation as target data includes:
extracting data corresponding to the selection operation of the user in each page;
determining a data hierarchy corresponding to the data;
and determining the data matched with the data hierarchy in the display page as target data.
Illustratively, the data hierarchy includes a node hierarchy of the data in a tree structure corresponding to the data, all data from a root node in the tree structure to the node hierarchy is determined as target data, the data hierarchy further includes a data level corresponding to the data, and data matched with the data level is taken as target data.
And the data mapping module 204 is configured to generate a data mapping process corresponding to the target data according to a preset data mapping rule.
Illustratively, a data mapping rule is preset according to the service requirement of the pull-down component, and data mapping is performed on the target data according to the rule to generate a data mapping process, where the data mapping process is used to display the target data.
By mapping the target data, the target data can be prevented from being lost, the integrity of the target data is ensured, and the data processing efficiency is improved.
A component packaging module 205, configured to perform component packaging on the target data and the data mapping process corresponding to the target data.
And the target data and the data mapping process corresponding to the target data are subjected to component packaging, so that the use management and the subsequent maintenance and expansion of a user can be facilitated.
In some embodiments, the target data after component encapsulation and the data mapping flow corresponding to the target data are stored in a block chain, so that the privacy and the security of the target data are ensured, and the security of the data-based component encapsulation method is improved.
The data-based component packaging apparatus provided by the above embodiments may be implemented in the form of a computer program that can be run on a computer device as shown in fig. 3.
Referring to fig. 3, fig. 3 is a schematic block diagram of a computer device according to an embodiment of the present invention. The computer device may be a server or a terminal device.
As shown in fig. 3, the computer device 30 includes a processor 301 and a memory 302 connected by a system bus, wherein the memory 302 may include a nonvolatile storage medium and a volatile storage medium.
The memory 302 may store an operating system and computer programs. The computer program comprises computer readable instructions that, when executed, cause the processor 301 to perform the data-based component packaging method.
The processor 301 is used to provide computing and control capabilities, supporting the operation of the overall computer device.
In a possible embodiment, the computer device further comprises a network interface for performing network communication, such as sending assigned tasks, etc. Those skilled in the art will appreciate that the configuration shown in fig. 3 is a block diagram of only a portion of the configuration associated with aspects of the present invention and is not intended to limit the computing devices to which aspects of the present invention may be applied, and that a particular computing device may include more or less components than those shown, or may combine certain components, or have a different arrangement of components.
It should be understood that Processor 301 is a Central Processing Unit (CPU), and may be other general purpose processors, Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field Programmable Gate Arrays (FPGAs) or other Programmable logic devices, discrete Gate or transistor logic devices, discrete hardware components, etc. Wherein a general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
Wherein, in one embodiment, the processor executes a computer program stored in the memory to implement the steps of:
acquiring data, and determining a data loading mode according to the attribute of the data;
determining page nodes in a display page according to the data loading mode, and rendering the display page according to the page nodes, wherein the display page is used for displaying the data;
determining target data in the rendered display page;
generating a data mapping process corresponding to the target data according to a preset data mapping rule;
and performing component packaging on the target data and the data mapping process corresponding to the target data.
Specifically, the processor may refer to the description of the relevant steps in the foregoing data-based component packaging method embodiment, which is not repeated herein.
Embodiments of the present invention further provide a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, where the computer program includes computer-readable instructions, and when the instructions are executed, a method implemented by the instructions may refer to various embodiments of the data-based component packaging method of the present invention.
The computer-readable storage medium may be an internal storage unit of the computer device described in the foregoing embodiment, for example, a hard disk or a memory of the computer device. The computer readable storage medium may also be an external storage device of the computer device, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), and the like provided on the computer device.
Further, the computer-readable storage medium may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function, and the like; the storage data area may store data created according to the use of the blockchain node, and the like.
The block chain is a novel application mode of computer technologies such as distributed data storage, point-to-point transmission, a consensus mechanism, an encryption algorithm and the like. A block chain (Blockchain), which is essentially a decentralized database, is a series of data blocks associated by using a cryptographic method, and each data block contains information of a batch of network transactions, so as to verify the validity (anti-counterfeiting) of the information and generate a next block. The blockchain may include a blockchain underlying platform, a platform product service layer, an application service layer, and the like.
According to the data-based component packaging device, the computer equipment and the computer-readable storage medium provided by the embodiment, the data loading mode is determined according to the attribute of the data by acquiring the data, and the data loading mode is determined according to the attribute of the data, so that the situation that the rendering rate is too slow due to too high page rendering pressure when all data are loaded for too much time is avoided; determining page nodes in a display page according to the data loading mode, rendering the display page according to the page nodes, wherein the display page is used for displaying the data, rendering the display page according to the page nodes, and when rendering interruption occurs in the rendering process, the page nodes with interruption can be quickly found and can be continuously rendered, so that the rendering rate is increased; determining target data in the rendered display page; generating a data mapping flow corresponding to the target data according to a preset data mapping rule, and mapping the target data to avoid the target data from being lost and ensure the integrity of the target data so as to improve the processing efficiency of the data; and performing component packaging on the target data and the data mapping process corresponding to the target data, so that the use management and the subsequent maintenance and expansion of a user are facilitated.
It is to be understood that the terminology used in the description of the invention herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. As used in the specification of the present invention and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise.
It should also be understood that the term "and/or" as used in this specification and the appended claims refers to and includes any and all possible combinations of one or more of the associated listed items. It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or system that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or system. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or system that comprises the element.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments. While the invention has been described with reference to specific embodiments, the invention is not limited thereto, and various equivalent modifications and substitutions can be easily made by those skilled in the art within the technical scope of the invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

Claims (10)

1. A method for data-based component encapsulation, the data-based component encapsulation comprising:
acquiring data, and determining a data loading mode according to the attribute of the data;
determining page nodes in a display page according to the data loading mode, and rendering the display page according to the page nodes, wherein the display page is used for displaying the data;
determining target data in the rendered display page;
generating a data mapping process corresponding to the target data according to a preset data mapping rule;
and performing component packaging on the target data and the data mapping process corresponding to the target data.
2. The data-based component encapsulation method according to claim 1, wherein the determining a data loading manner according to the attribute of the data comprises:
judging whether the data volume of the data exceeds a preset data threshold value or not;
when the data volume of the data exceeds a preset data threshold value, determining a plurality of key fields corresponding to the data;
determining field types corresponding to the plurality of key fields;
and when the field types corresponding to the key fields are not consistent, determining that the data loading mode is paging loading according to the field types.
3. The data-based component packaging method of claim 1, wherein the rendering the presentation page according to the page node comprises:
constructing a laminated tree corresponding to the display page according to the page nodes;
obtaining a descriptive text corresponding to the display page, and analyzing the descriptive text to generate a tree structure corresponding to the display page;
traversing the tree structure from a root node of the tree structure to obtain a plurality of visible nodes, and determining node rules corresponding to the visible nodes on the stacked tree; combining the plurality of visible nodes according to node rules corresponding to the plurality of visible nodes to generate a rendering tree;
and traversing each node in the rendering tree layer by layer to render the display page.
4. The data-based component packaging method of claim 3, wherein determining target data in the rendered page comprises:
performing paging display on the rendered page according to a preset paging rule;
and responding to the selection operation of the user in each page, and determining the data corresponding to the selection operation as target data.
5. The data-based component packaging method according to claim 4, wherein performing paging display on the data on the rendered page according to a preset paging rule comprises:
determining a tree structure of the data;
and determining the paging sequence of the data in the tree structure according to the hierarchical relationship of the tree structure, and performing paging display on the rendered page by the data according to the paging sequence.
6. The data-based component packaging method of claim 4, further comprising:
determining address information pointed by the selection operation of the user as the address information of the selection operation sent by the user;
inquiring authority information matched with the address information in a preset address authority database;
and when the authority information is target authority information, determining that the user has the authority for carrying out selection operation, and determining data corresponding to the selection operation as target data.
7. The data-based component packaging method according to any one of claims 4 to 6, wherein the determining, in response to a selection operation by a user in each page, data corresponding to the selection operation as target data comprises:
extracting data corresponding to the selection operation of the user in each page;
determining a data hierarchy corresponding to the data;
and determining the data matched with the data hierarchy in the display page as target data.
8. A data-based component packaging apparatus, comprising:
the data acquisition module is used for acquiring data and determining a data loading mode according to the attribute of the data;
the page rendering module is used for determining page nodes in a display page according to the data loading mode and rendering the display page according to the page nodes, wherein the display page is used for displaying the data;
the target determining module is used for determining target data in the rendered display page;
the data mapping module is used for generating a data mapping process corresponding to the target data according to a preset data mapping rule;
and the component packaging module is used for performing component packaging on the target data and the data mapping process corresponding to the target data.
9. A computer device, wherein the computer device comprises a memory and a processor;
the memory for storing a computer program;
the processor, when executing the computer program, implementing the data-based component packaging method of any of claims 1 to 7.
10. A computer-readable storage medium, characterized in that the computer-readable storage medium stores a computer program which, when executed by a processor, implements the data-based component packaging method according to any one of claims 1 to 7.
CN202011540157.5A 2020-12-23 2020-12-23 Data-based component packaging method and device, computer equipment and storage medium Pending CN112528189A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011540157.5A CN112528189A (en) 2020-12-23 2020-12-23 Data-based component packaging method and device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011540157.5A CN112528189A (en) 2020-12-23 2020-12-23 Data-based component packaging method and device, computer equipment and storage medium

Publications (1)

Publication Number Publication Date
CN112528189A true CN112528189A (en) 2021-03-19

Family

ID=74975922

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011540157.5A Pending CN112528189A (en) 2020-12-23 2020-12-23 Data-based component packaging method and device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN112528189A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112905603A (en) * 2021-03-29 2021-06-04 苏州科达科技股份有限公司 Page node display method, system, equipment and storage medium

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120047185A1 (en) * 2010-08-17 2012-02-23 Sap Ag Component load procedure for setting up systems
CN102915375A (en) * 2012-11-08 2013-02-06 山东大学 Webpage loading method based on layout zoning
US8413046B1 (en) * 2011-10-12 2013-04-02 Google Inc. System and method for optimizing rich web applications
CN105160004A (en) * 2015-09-17 2015-12-16 西安未来国际信息股份有限公司 B/S framework based data mapping method for heterogeneous system
US20170293593A1 (en) * 2016-04-12 2017-10-12 International Business Machines Corporation Managing node pagination for a graph data set
CN110377851A (en) * 2019-06-18 2019-10-25 平安科技(深圳)有限公司 Implementation method, device and the computer equipment of multistage linking combobox
CN111124212A (en) * 2018-10-31 2020-05-08 北京国双科技有限公司 Data display method and device, storage medium and processor
CN111580810A (en) * 2020-03-30 2020-08-25 深圳市麦谷科技有限公司 Method, device, mobile terminal and storage medium for realizing active paging

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120047185A1 (en) * 2010-08-17 2012-02-23 Sap Ag Component load procedure for setting up systems
US8413046B1 (en) * 2011-10-12 2013-04-02 Google Inc. System and method for optimizing rich web applications
CN102915375A (en) * 2012-11-08 2013-02-06 山东大学 Webpage loading method based on layout zoning
CN105160004A (en) * 2015-09-17 2015-12-16 西安未来国际信息股份有限公司 B/S framework based data mapping method for heterogeneous system
US20170293593A1 (en) * 2016-04-12 2017-10-12 International Business Machines Corporation Managing node pagination for a graph data set
CN111124212A (en) * 2018-10-31 2020-05-08 北京国双科技有限公司 Data display method and device, storage medium and processor
CN110377851A (en) * 2019-06-18 2019-10-25 平安科技(深圳)有限公司 Implementation method, device and the computer equipment of multistage linking combobox
CN111580810A (en) * 2020-03-30 2020-08-25 深圳市麦谷科技有限公司 Method, device, mobile terminal and storage medium for realizing active paging

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112905603A (en) * 2021-03-29 2021-06-04 苏州科达科技股份有限公司 Page node display method, system, equipment and storage medium

Similar Documents

Publication Publication Date Title
CN110377851B (en) Method and device for realizing multi-stage linkage drop-down frame and computer equipment
CN110532799B (en) Data desensitization control method, electronic device and computer readable storage medium
CN111339559A (en) Data processing method and device for desensitizing log
CN112527433A (en) Page popup control method and device, computer equipment and storage medium
CN111625567A (en) Data model matching method, device, computer system and readable storage medium
CN112528189A (en) Data-based component packaging method and device, computer equipment and storage medium
CN111444368B (en) Method and device for constructing user portrait, computer equipment and storage medium
CN113010542A (en) Service data processing method and device, computer equipment and storage medium
CN116663505A (en) Comment area management method and system based on Internet
CN116185545A (en) Page rendering method and device
US9230022B1 (en) Customizable result sets for application program interfaces
CN115712422A (en) Form page generation method and device, computer equipment and storage medium
CN112182107B (en) List data acquisition method, device, computer equipment and storage medium
CN115471582A (en) Map generation method and device, computer equipment and storage medium
CN114491453A (en) Task authority management method, device, equipment and storage medium
CN114417226A (en) Page generation method, display method, device, electronic equipment and storage medium
CN110851446B (en) Data table generation method and device, computer equipment and storage medium
CN113722225A (en) Page testing method and device, computer equipment and storage medium
CN113051333A (en) Data processing method and device, electronic equipment and storage medium
CN111782208A (en) Index early warning method and device, computer equipment and storage medium
CN113438221B (en) Local end file loading method and device, electronic equipment and medium
CN114650252B (en) Routing method and device based on enterprise service bus and computer equipment
CN112402955B (en) Game log recording method and system
CN110719260B (en) Intelligent network security analysis method and device and computer readable storage medium
CN116431149A (en) Page typesetting method, device, computer 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