Interface Mounting Data Propagation Method, Device, Equipment and Storage Medium
By building interface relationship chains and HTML element chains, backpropagating data snapshots is solved, and data confusion and leakage are achieved in the process of data query, and the accuracy and security of data propagation are achieved.
Patent Information
- Application Number
- CN202510429455.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-08
- Publication Date
- 2025-07-29
- Estimated Expiration
- 2045-04-08
AI Technical Summary
During the data query process, when the main object and the auxiliary object are queryed as query conditions, it is easy to cause data confusion and data leakage.
By building an initial interface relationship chain, generating an HTML element chain, updating the target interface relationship chain, determining a data snapshot of the interface component that hides the event, and backpropagating the data snapshot to the initial interface under the click event, avoiding the use of the primary and secondary objects as query conditions.
It realizes backpropagation of data under dynamic interface, avoids data confusion and leakage, and ensures the accuracy and security of data propagation.
Smart Images

Figure CN119939070B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of data processing, and particularly relates to an interface-mounted data propagation method, apparatus, device, and storage medium. Background Art
[0002] Business systems often have a data query function. The implementation of the data query function requires continuously opening multiple levels of interfaces with a sequential relationship. Exemplarily, when querying the population of a certain address, in the corresponding business system, it is necessary to successively open the administrative division query interface, and further, open the specific address query interface. After that, open the population query interface to obtain the data mounted on the population query interface as the result of the population query, and then reverse-propagate the result of the population query to the first administrative division query interface to achieve the propagation of the data mounted on the population query interface.
[0003] However, currently, in the data query process for mounted data propagation, the object to be queried often has a main object and a secondary object. When querying with the main object and the secondary object as query conditions, it is easy to cause problems of data chaos and data leakage in the subsequent process of mounted data propagation. Summary of the Invention
[0004] In order to facilitate avoiding data chaos and data leakage in the process of mounted data propagation, the present application provides an interface-mounted data propagation method, apparatus, device, and storage medium.
[0005] In a first aspect, the present application provides an interface-mounted data propagation method, including:
[0006] Responding to the initial interface being a dynamic interface, determining a corresponding interface component based on the initial interface;
[0007] Constructing an initial interface relationship chain based on the initial interface and the interface component, and responding to the non-existence of the interface component in a preset component container, constructing an HTML element chain based on the initial interface;
[0008] Updating the initial interface relationship chain based on the HTML element chain to obtain a target interface relationship chain; determining a data snapshot of the interface component with a hidden event in the target interface relationship chain based on the target interface relationship chain;
[0009] Responding to the existence of a click event in the target interface relationship chain, mounting the data snapshot under the interface component corresponding to the click event, and reverse-propagating the data snapshot to the initial interface.
[0010] In a second aspect, the present application provides an interface-mounted data propagation apparatus, including:
[0011] A component determination module, configured to determine a corresponding interface component based on the initial interface in response to the initial interface being a dynamic interface;
[0012] An element chain construction module, configured to construct an initial interface relationship chain based on the initial interface and the interface component, and in response to the absence of the interface component in a preset component container, construct an HTML element chain based on the initial interface;
[0013] A snapshot generation module, configured to update the initial interface relationship chain based on the HTML element chain to obtain a target interface relationship chain; determine a data snapshot of an interface component having a hidden event in the target interface relationship chain based on the target interface relationship chain;
[0014] A data propagation module, configured to, in response to the presence of a click event in the target interface relationship chain, mount the data snapshot under the interface component corresponding to the click event, and back-propagate the data snapshot to the initial interface.
[0015] In a third aspect, the present application provides a computer device, which includes a memory and a processor. The memory stores a computer program, and when the processor executes the computer program, the steps in the above method are implemented.
[0016] In a fourth aspect, the present application provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps in the above method are implemented.
[0017] In a fifth aspect, the present application further provides a computer program product. The computer program product includes a computer program, and when the computer program is executed by a processor, the steps in any of the above method embodiments are implemented.
[0018] The above interface-mounted data propagation method, device, equipment and storage medium respond to the initial interface being a dynamic interface, determine the corresponding interface components based on the initial interface; construct an initial interface relationship chain based on the initial interface and the interface components, and respond to the non-existence of the interface components in the preset component container, construct an HTML element chain based on the initial interface; update the initial interface relationship chain based on the HTML element chain to obtain a target interface relationship chain; determine a data snapshot of the interface components with hidden events in the target interface relationship chain based on the target interface relationship chain; respond to the existence of a click event in the target interface relationship chain, mount the data snapshot under the interface component corresponding to the click event, and back-propagate the data snapshot to the initial interface; through the above implementation, in the case where the initial interface is a dynamic interface, an initial interface relationship chain can be constructed according to the initial interface, and then the initial interface relationship chain can be updated through the generated HTML element chain to obtain a target interface relationship chain. In the case where a data snapshot exists, the data snapshot is further back-propagated to the initial interface of the target interface relationship chain, thereby realizing data back-propagation. In this process, querying with the main object and the auxiliary object as query conditions is avoided, so as to facilitate avoiding data chaos and data leakage during the process of mounting data propagation.
[0019] It should be understood that the content described in this part is not intended to identify the key or important features of the embodiments of the present application, nor is it used to limit the scope of the present application. Other features of the present application will become easily understood through the following description. Brief Description of the Drawings
[0020] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for use in the embodiments will be briefly introduced below. It should be understood that the following drawings only show some embodiments of the present invention, and therefore should not be regarded as limiting the scope. For those of ordinary skill in the art, other related drawings can be obtained based on these drawings without creative efforts.
[0021] Figure 1 It is a flowchart of an interface-mounted data propagation method provided in an embodiment of the present application;
[0022] Figure 2 It is a schematic structural diagram of an interface-mounted data propagation device provided in an embodiment of the present application;
[0023] Figure 3 It is a schematic structural diagram of a computer device provided in an embodiment of the present application;
[0024] Figure 4 It is an internal structural diagram of a computer-readable storage medium provided in an embodiment of the present application. Detailed Description of the Embodiments
[0025] In order to make the objectives, technical solutions and advantages of the present disclosure more clearly understood, the following further describes the present disclosure in detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely used to explain the present disclosure and are not used to limit the present disclosure.
[0026] It should be noted that the terms "first", "second", etc. in the description and claims of this article and the above-mentioned drawings are used to distinguish similar objects and do not necessarily need to describe a specific order or sequence. It should be understood that such used data can be interchanged under appropriate circumstances so that the embodiments described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "comprising" and "having" and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, device, product or equipment comprising a series of steps or units does not necessarily have to be limited to those steps or units clearly listed, but may include other steps or units not clearly listed or inherent to these processes, methods, products or equipment.
[0027] In this article, the term "and / or" is merely a description of the association relationship of associated objects, indicating that three relationships can exist. For example, A and / or B can represent three situations: A exists alone, A and B exist simultaneously, and B exists alone. In addition, the character " / " in this article generally represents an "or" relationship between the associated objects before and after.
[0028] Embodiment 1
[0029] Figure 1 The flowchart of an interface-mounted data dissemination method provided for Embodiment 1 of this application is shown in Figure 1 , and this method can be executed by the device that executes this method. The device can be implemented in software and / or hardware. This method includes:
[0030] S110. In response to the initial interface being a dynamic interface, determine the corresponding interface components based on the initial interface.
[0031] Among them, the main interface of the business system is the initial interface. The business system includes, but is not limited to, the case query system, the population query system, etc. The interface of the business system is displayed through a web page. Therefore, the business system has a corresponding HyperText Markup Language (HTML), and this HTML is used to describe the structure and content of the corresponding interface; there are multiple variables in the HTML that correspond to the interface. If there is no clear assignment for these multiple variables, the interface corresponding to the HTML is considered a dynamic interface; otherwise, it is a static interface. After clicking on a specific function button on the initial interface, the web page can display the secondary interface of the initial interface, and this secondary interface is recorded as an interface component; for example, in the initial interface corresponding to the case query system, clicking on the function button "Case Details" will generate an interface component corresponding to "Case Details" based on the initial interface.
[0032] S120. Construct an initial interface relationship chain based on the initial interface and the interface component. In response to the absence of the interface component in the preset component container, construct an HTML element chain based on the initial interface.
[0033] Among them, by attaching the interface component to the corresponding initial interface, the corresponding interface relationship chain can be obtained, and this interface relationship chain is recorded as the initial interface relationship chain; during the generation process of the interface component, that is, the process of rendering it to the web page, if the interface component is successfully rendered, it will be stored in the preset component container. If the rendering is not completed, the interface component will not exist in the preset component container. To achieve the rendering of the interface component, it is necessary to further generate an HTML element chain based on the initial interface. The HTML element chain includes a root element corresponding to the initial interface and an element object corresponding to the interface component; by attaching the element object to the corresponding root element, this HTML element chain can be obtained, and the rendering of the interface component can be achieved during the generation process of the HTML element chain.
[0034] S130. Update the initial interface relationship chain based on the HTML element chain to obtain a target interface relationship chain; determine a data snapshot of the interface component with a hidden event in the target interface relationship chain based on the target interface relationship chain.
[0035] Among them, the initial interface relationship chain includes two levels of interfaces, namely the initial interface and the interface components. Updating the initial interface relationship chain means adding new interface components under the interface components on the basis of the initial interface relationship chain, so as to realize the update of the initial interface relationship chain; by updating the initial interface relationship chain, the last-level interface components can be determined, and the data for data propagation is included under the last-level interface components. The hiding event is the event that the user closes or hides the interface components. When all the interfaces in the target interface relationship chain are opened, when the user determines that there is data for data propagation, the user will close or hide the interfaces in the target interface relationship chain in turn from the last-level interface components. Therefore, when all the interfaces in the target interface relationship chain are opened, if there is a hiding event for a certain interface component, it means that the interface component is the last-level interface in the target interface relationship chain. In this way, the data mounted under the last-level interface can be further obtained. In this embodiment, the mounted data is the data snapshot.
[0036] S140. In response to the existence of a click event in the target interface relationship chain, mount the data snapshot under the interface component corresponding to the click event, and back-propagate the data snapshot to the initial interface.
[0037] Among them, in the case of obtaining the data snapshot, the user will close the interfaces in the target interface relationship chain in turn starting from the last-level interface components, and click events related to the closing will be generated during the closing process; taking one level of interface components as an example, if a click event occurs for this interface component, the upper-level interface component of this interface component needs to be used as the interface component corresponding to the click event, and the data snapshot needs to be mounted under the interface component corresponding to the click event, and so on until the interface component corresponding to the click event is the initial interface, so as to realize the back-propagation of the data snapshot.
[0038] It should be noted that in this embodiment, in response to the initial interface being a dynamic interface, the corresponding interface components are determined based on the initial interface; an initial interface relationship chain is constructed based on the initial interface and the interface components. In response to the absence of the interface components in the preset component container, an HTML element chain is constructed based on the initial interface; the initial interface relationship chain is updated based on the HTML element chain to obtain a target interface relationship chain; a data snapshot of the interface components with hidden events in the target interface relationship chain is determined based on the target interface relationship chain; in response to the existence of a click event in the target interface relationship chain, the data snapshot is mounted under the interface component corresponding to the click event, and the data snapshot is propagated backward to the initial interface. Through the above implementation, in the case where the initial interface is a dynamic interface, an initial interface relationship chain can be constructed according to the initial interface, and then the initial interface relationship chain can be updated through the generated HTML element chain to obtain a target interface relationship chain. In the case of the existence of a data snapshot, the data snapshot is further propagated backward to the initial interface of the target interface relationship chain, thereby realizing the backward propagation of data. In this process, querying with the main object and the secondary object as query conditions is avoided, so as to facilitate avoiding data chaos and data leakage during the process of mounting data propagation.
[0039] Embodiment 2
[0040] A method for interface-mounted data propagation provided in Embodiment 2 of this application supplements the solution of Embodiment 1. It should be noted that for parts not described in detail in this embodiment, reference can be made to the descriptions of other embodiments. The method includes:
[0041] S210. In response to opening the initial interface, obtain the ID and code block of the HTML elements of the initial interface.
[0042] Among them, HTML elements include, but are not limited to, one or more of structural elements, text elements, list elements, and media elements. Each HTML element has its corresponding ID and code block. Among them, the ID is composed of preset numbers and letters, and the code block is specifically the js code block of the HTML element. After the initial interface is opened, the corresponding HTML elements of the initial interface can be determined. Further, the ID and js code block of each HTML element are obtained.
[0043] S220. Based on the ID, determine whether both the ID and the variables in the code block are assigned values to determine whether the initial interface is a dynamic interface.
[0044] Among them, in order to facilitate data dissemination, it is necessary to first determine the initial interface for the dynamic interface. For this purpose, when obtaining the ID corresponding to the HTML element, it is necessary to first determine whether the ID is sequence-generated. If it is sequence-generated, it is further necessary to determine whether there are clear assignments for both the ID and the variables in the code block. If so, the initial interface can be recognized as a dynamic interface; otherwise, it is recognized as a static interface. Among them, this embodiment presets a corresponding neural network algorithm, which is used to process the ID to determine whether the ID is sequence-generated. Sequence generation means that there is a corresponding sequence rule between a group of corresponding IDs. Exemplarily, one form of the sequence-generated ID is: , , , ……. Exemplarily, assume that one of the ID or the variables in the code block is b, and there is a clear assignment for this variable. For example, the assignment is 1, then it is determined that this variable has a clear assignment.
[0045] S230. In response to the initial interface being a dynamic interface, determine the corresponding interface components based on the initial interface.
[0046] S240. Build an initial interface relationship chain based on the initial interface and the interface components. In response to the absence of the interface components in the preset component container, build an HTML element chain based on the initial interface.
[0047] S250. Update the initial interface relationship chain based on the HTML element chain to obtain a target interface relationship chain; determine the data snapshot of the interface components with hidden events in the target interface relationship chain based on the target interface relationship chain.
[0048] S260. In response to the existence of a click event in the target interface relationship chain, mount the data snapshot under the interface component corresponding to the click event, and backpropagate the data snapshot to the initial interface.
[0049] Embodiment III
[0050] A method for interface-mounted data dissemination provided in Embodiment III of this application optimizes the "determine the corresponding interface components based on the initial interface" in Embodiment I; it should be noted that for parts not detailed in this embodiment, reference can be made to the descriptions of other embodiments. This method includes:
[0051] S311. In response to the initial interface being a dynamic interface, obtain the sub-object HTML elements of the query elements on the initial interface.
[0052] Among them, there are generally multiple query elements on the initial interface. The query elements are used to input data query conditions. Exemplarily, the query elements include administrators, keywords, etc. Each query element has its corresponding HTML element, and the HTML element corresponding to the query element is denoted as the sub-object HTML element. The sub-object HTML element also includes one or more of structure elements, text elements, list elements, and media elements.
[0053] S312. Split the sub-object HTML element to obtain a set of query sub-elements.
[0054] Among them, splitting the sub-object HTML element can obtain multiple query sub-elements. Exemplarily, the query sub-elements include time, name, etc. By splitting each sub-object HTML element, multiple query sub-elements can be obtained. The multiple query sub-elements obtained after splitting the set can form a corresponding set, and this set is denoted as the query sub-element set.
[0055] S313. In response to the existence of a click attribute for the query sub-elements in the query sub-element set, determine the function object corresponding to the click attribute.
[0056] Among them, when the user clicks on the query element on the initial interface, the corresponding query sub-elements may be involved. If the query sub-elements are involved, the query sub-elements will generate corresponding click attributes. If the query sub-elements have corresponding click attributes, it is necessary to further determine the function object bound to the click attribute. Exemplarily, the function object is elementonclick=“myScript”. The function object is subsequently used to determine whether to display the interface components under the initial interface.
[0057] S314. In response to the function object being a status control function, display the interface components corresponding to the initial interface.
[0058] Among them, the status control function is a type of function object. The characteristic of this function type is that there are if and else statements in the corresponding function object; when the function type of the function object is a status control function, the next-level interface of the initial interface can be displayed, that is, the interface components under the initial interface.
[0059] S320. Based on the initial interface and the interface components, construct an initial interface relationship chain. In response to the non-existence of the interface components in the preset component container, construct an HTML element chain based on the initial interface.
[0060] S330. Update the initial interface relationship chain based on the HTML element chain to obtain a target interface relationship chain; based on the target interface relationship chain, determine the data snapshot of the interface components with hidden events in the target interface relationship chain.
[0061] S340. In response to a click event existing in the target interface relationship chain, mount the data snapshot under the interface component corresponding to the click event, and back-propagate the data snapshot to the initial interface.
[0062] Embodiment IV
[0063] An interface-mounted data propagation method provided in Embodiment IV of the present application optimizes the "constructing an HTML element chain based on the initial interface" in Embodiment I. It should be noted that for parts not described in detail in this embodiment, reference can be made to the descriptions of other embodiments. This method includes:
[0064] S410. In response to the initial interface being a dynamic interface, determine the corresponding interface component based on the initial interface.
[0065] S421. Construct an initial interface relationship chain based on the initial interface and the interface component. In response to the interface component not existing in the preset component container.
[0066] S422. Reconstruct a new HTML element based on the initial interface as the root element.
[0067] Among them, when the interface component does not exist in the component container, it means that the interface component has not been rendered, that is, the interface component has not been successfully displayed on the web page interface. Therefore, it is necessary to re-render the interface component; when the initial interface is opened, a new set of HTML elements of the initial interface is reconstructed, and the reconstructed HTML element is recorded as the root element.
[0068] S423. Perform pre-rendering on the interface components under the initial interface based on the root element to obtain element objects.
[0069] Among them, the generated root element can be used to perform pre-rendering on the interface components under the initial interface. It should be noted that the interface component does not exist in the component container. By performing pre-rendering on the interface component, an element object corresponding to the interface component can be obtained. The element object is used to describe the structure and text content of the interface component.
[0070] S424. Obtain an HTML element chain based on the root element and the element object.
[0071] Among them, by attaching the element object under the root element, an HTML element chain composed of the root element and the element object can be obtained.
[0072] S430. Update the initial interface relationship chain based on the HTML element chain to obtain a target interface relationship chain; determine the data snapshot of the interface component with a hidden event existing in the target interface relationship chain based on the target interface relationship chain.
[0073] S440. In response to a click event existing in the target interface relationship chain, mount the data snapshot under the interface component corresponding to the click event, and backpropagate the data snapshot to the initial interface.
[0074] Embodiment Five
[0075] An interface mounting data propagation method provided in Embodiment Five of the present application optimizes the "updating the initial interface relationship chain based on the HTML element chain to obtain the target interface relationship chain" in the embodiment. It should be noted that for parts not detailed in this embodiment, reference can be made to the descriptions of other embodiments. The method includes:
[0076] S510. In response to the initial interface being a dynamic interface, determine the corresponding interface component based on the initial interface.
[0077] S520. Construct an initial interface relationship chain based on the initial interface and the interface component. In response to the interface component not existing in the preset component container, construct an HTML element chain based on the initial interface.
[0078] S531. In response to the root element in the HTML element chain being in a display state and the variable in the element object under the root element not having an assignment, use the interface component corresponding to the element object as the new initial interface.
[0079] Among them, if the root element in the HTML element chain is in a display state and the element variable under the root element does not have a clear assignment, it means that the interface component corresponding to the element object is also a dynamic interface at this time, that is, it means that this interface component can also open a new level of interface components. For the convenience of performing the step of opening a new level of interface components, at this time, first use the interface component corresponding to the element object as the new initial interface.
[0080] S532. Generate a new interface component based on the new initial interface until the variable in the element object corresponding to the new interface component has an assignment, obtaining the target interface relationship chain.
[0081] Among them, when the interface component corresponding to the element object is used as the new initial interface, by re-executing the above S510 - S531, new interface components can be generated under this new initial interface, that is, the above new-level interface components; if the variables in the element object of the new interface component still have no assigned values, it means that a new-level interface component can still be opened under the new interface component. If the variables in the element object of the new interface component have assigned values, it means that the new interface component is already the last-level interface component at this time. By continuously attaching new-level interface components under the new interface component in the above manner until the new interface component is the last-level interface component, a target interface relationship chain can be formed in this way. The first-level interface of this target interface relationship chain is the initial interface, and there are multiple levels of interface components connected under the initial interface.
[0082] S533. Determine the data snapshot of the interface component with a hidden event in the target interface relationship chain based on the target interface relationship chain.
[0083] S540. In response to the click event existing in the target interface relationship chain, mount the data snapshot under the interface component corresponding to the click event, and backpropagate the data snapshot to the initial interface.
[0084] Embodiment Six
[0085] An interface-mounted data propagation method provided by Embodiment Six of this application optimizes the "determine the data snapshot of the interface component with a hidden event in the target interface relationship chain" in Embodiment One; it should be noted that for parts not detailed in this embodiment, the descriptions of other embodiments can be referred to. This method includes:
[0086] S610. In response to the initial interface being a dynamic interface, determine the corresponding interface component based on the initial interface.
[0087] S620. Construct an initial interface relationship chain based on the initial interface and the interface component. In response to the interface component not existing in the preset component container, construct an HTML element chain based on the initial interface.
[0088] S631. Update the initial interface relationship chain based on the HTML element chain to obtain a target interface relationship chain.
[0089] S632. In response to the interface component in the target interface relationship chain being in a display state, obtain the root element of the interface component in the display state.
[0090] Among them, after obtaining the target interface relationship chain, it is necessary to monitor the state of the target interface relationship chain, that is, monitor whether the interface components in the target interface relationship chain are in a display state. If so, it is necessary to obtain the root element bound to this interface.
[0091] S633. In response to the presence of an interface hiding event, determine the root element of the interface component corresponding to the interface hiding event as the target root element.
[0092] Among them, it is also necessary to determine whether there is a hiding event for the interface components in the target interface relationship chain. The hiding event means that the corresponding interface component is closed or hidden. If there is a hiding event for a certain interface component, the root element of the interface component corresponding to the hiding event is used as the target root element.
[0093] S634. Determine the corresponding data snapshot based on the target root element.
[0094] Among them, after obtaining the above target root element, further establish a snapshot container in the key-value data format with this root element as the key, determine the data snapshot of the interface component with the hiding event according to the target root element, and update the data snapshot to the above snapshot container.
[0095] S640. In response to the presence of a click event in the target interface relationship chain, mount the data snapshot under the interface component corresponding to the click event and backpropagate the data snapshot to the initial interface.
[0096] It should be understood that although the steps in the flowcharts involved in the above-described embodiments are displayed in sequence according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless there is a clear description in this article, the execution of these steps has no strict order limit, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-described embodiments may include multiple steps or multiple stages. These steps or stages are not necessarily executed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be executed alternately or in turn with at least a part of other steps or steps or stages in other steps.
[0097] Embodiment Seven
[0098] Based on the same inventive concept, this embodiment also provides an interface-mounted data propagation device for implementing the above-mentioned interface-mounted data propagation method. The implementation solutions provided by this device to solve problems are similar to those recorded in the above method. Therefore, the specific limitations in one or more of the following interface-mounted data propagation device embodiments can refer to the limitations on the interface-mounted data propagation method in the above text, and will not be repeated here.
[0099] In this embodiment, as Figure 2 shown, an interface-mounted data propagation device is provided, including:
[0100] A component determination module, configured to determine a corresponding interface component based on the initial interface in response to the initial interface being a dynamic interface;
[0101] An element chain construction module, configured to construct an initial interface relationship chain based on the initial interface and the interface component, and in response to the interface component not existing in a preset component container, construct an HTML element chain based on the initial interface;
[0102] A snapshot generation module, configured to update the initial interface relationship chain based on the HTML element chain to obtain a target interface relationship chain; determine a data snapshot of an interface component with a hidden event existing in the target interface relationship chain based on the target interface relationship chain;
[0103] A data propagation module, configured to, in response to a click event existing in the target interface relationship chain, mount the data snapshot under the interface component corresponding to the click event, and propagate the data snapshot in reverse to the initial interface.
[0104] Each module in the above interface-mounted data propagation device can be implemented in whole or in part by software, hardware, and their combination. The above modules can be embedded in the processor in the computer device in the form of hardware or be independent of the processor, or can be stored in the memory in the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.
[0105] It should be noted that in this embodiment, in response to the initial interface being a dynamic interface, a corresponding interface component is determined based on the initial interface; an initial interface relationship chain is constructed based on the initial interface and the interface component, and in response to the interface component not existing in a preset component container, an HTML element chain is constructed based on the initial interface; the initial interface relationship chain is updated based on the HTML element chain to obtain a target interface relationship chain; a data snapshot of an interface component with a hidden event existing in the target interface relationship chain is determined based on the target interface relationship chain; in response to a click event existing in the target interface relationship chain, the data snapshot is mounted under the interface component corresponding to the click event, and the data snapshot is propagated in reverse to the initial interface; through the above implementation, in the case where the initial interface is a dynamic interface, an initial interface relationship chain can be constructed according to the initial interface, and then the generated HTML element chain can be used to update the initial interface relationship chain to obtain a target interface relationship chain. In the case where a data snapshot exists, the data snapshot is further propagated in reverse to the initial interface of the target interface relationship chain, so as to realize the reverse propagation of data. In this process, querying with the main object and the secondary object as query conditions is avoided, so as to facilitate avoiding data chaos and data leakage during the process of mounting data propagation.
[0106] In one embodiment, before responding to the initial interface being a dynamic interface, the interface mounting data propagation device further includes:
[0107] An element code acquisition module, configured to, in response to opening the initial interface, acquire the IDs and code blocks of the HTML elements of the initial interface;
[0108] An interface type judgment module, configured to judge whether both the ID and the variables in the code block have assignments based on the ID, so as to judge whether the initial interface is a dynamic interface.
[0109] In one embodiment, in terms of determining the corresponding interface components based on the initial interface, the component determination module specifically is configured to:
[0110] Acquire the sub-object HTML elements of the query elements on the initial interface;
[0111] Split the sub-object HTML elements to obtain a query sub-element set;
[0112] In response to the query sub-elements in the query sub-element set having a click attribute, determine the function object corresponding to the click attribute;
[0113] In response to the function object being a status control function, display the interface components corresponding to the initial interface.
[0114] In one embodiment, in terms of constructing an HTML element chain based on the initial interface, the element chain construction module specifically is configured to:
[0115] Reconstruct new HTML elements based on the initial interface as the root elements;
[0116] Pre-render the interface components under the initial interface based on the root elements to obtain element objects;
[0117] Obtain an HTML element chain based on the root elements and the element objects.
[0118] In one embodiment, in terms of updating the initial interface relationship chain based on the HTML element chain to obtain a target interface relationship chain, the snapshot generation module specifically is configured to:
[0119] In response to the root element in the HTML element chain being in a display state and the variables in the element objects under the root element having no assignments, use the interface components corresponding to the element objects as the new initial interface;
[0120] Generate new interface components based on the new initial interface until the variables in the element objects corresponding to the new interface components have assignments, so as to obtain a target interface relationship chain.
[0121] In one embodiment, in terms of determining a data snapshot of an interface component with a hidden event in the target interface relationship chain based on the target interface relationship chain, the snapshot generation module is specifically configured to:
[0122] In response to an interface component in the target interface relationship chain being in a display state, obtain the root element of the interface component in the display state;
[0123] In response to an interface hiding event, determine the root element of the interface component corresponding to the interface hiding event as the target root element;
[0124] Determine a corresponding data snapshot based on the target root element.
[0125] Embodiment Eight
[0126] In this embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as shown in Figure 3 . The computer device includes a processor, a memory, and a network interface connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store data. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, it implements an interface mounting data propagation method.
[0127] Those skilled in the art can understand that Figure 3 the structure shown in is only a block diagram of some structures related to the solution of the present disclosure, and does not constitute a limitation on the computer device to which the solution of the present disclosure is applied. A specific computer device may include more or fewer components than those shown in the figure, or combine some components, or have a different component layout.
[0128] Embodiment Nine
[0129] In this embodiment, a computer-readable storage medium is provided, as shown in Figure 4 , on which a computer program is stored. When the computer program is executed by a processor, it implements the steps in the above method embodiments.
[0130] Embodiment Ten
[0131] In this embodiment, a computer program product is provided, including a computer program. When the computer program is executed by a processor, it implements the steps in the above method embodiments.
[0132] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data for analysis, stored data, displayed data, etc.) involved in this disclosure are all information and data authorized by the user or fully authorized by all parties.
[0133] Those of ordinary skill in the art can understand that all or part of the processes in the methods of the above embodiments can be completed by instructing relevant hardware through a computer program. The computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above methods. Among them, any reference to a memory, database, or other medium used in the embodiments provided in this disclosure can include at least one of non-volatile and volatile memories. Non-volatile memories can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memories can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM), etc. The databases involved in the embodiments provided in this disclosure can include at least one of relational databases and non-relational databases. Non-relational databases can include distributed databases based on blockchain, etc., without limitation. The processors involved in the embodiments provided in this disclosure can be general-purpose processors, central processors, graphics processors, digital signal processors, programmable logic devices, data processing logics based on quantum computing, etc., without limitation.
[0134] The technical features of the above embodiments can be combined arbitrarily. For the sake of brevity of description, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, it should be considered as the scope recorded in this specification.
[0135] The above-described embodiments merely represent several implementation manners of the present disclosure. The description thereof is relatively specific and detailed, but it should not be construed as a limitation on the patent scope of the present disclosure. It should be noted that for those of ordinary skill in the art, without departing from the concept of the present disclosure, several modifications and improvements can still be made, and these all fall within the protection scope of the present disclosure. Therefore, the protection scope of the present disclosure shall be subject to the appended claims.
Claims
1. An interface-mounted data propagation method, characterized in that, including: In response to the initial interface being a dynamic interface, determining corresponding interface components based on the initial interface; Constructing an initial interface relationship chain based on the initial interface and the interface components, and in response to the interface components not existing in a preset component container, constructing an HTML element chain based on the initial interface; Updating the initial interface relationship chain based on the HTML element chain to obtain a target interface relationship chain; Determining a data snapshot of the interface components with hidden events in the target interface relationship chain based on the target interface relationship chain; In response to the target interface relationship chain having a click event, mounting the data snapshot under the interface component corresponding to the click event and backpropagating the data snapshot to the initial interface; Among them, the determining corresponding interface components based on the initial interface includes: Obtaining the sub-object HTML elements of the query elements on the initial interface; Splitting the sub-object HTML elements to obtain a set of query sub-elements; In response to a query sub-element in the set of query sub-elements having a click attribute, determining the function object corresponding to the click attribute; In response to the function object being a state control function, displaying the interface components corresponding to the initial interface.
2. The method according to claim 1, characterized in that, Before the step of in response to the initial interface being a dynamic interface, it further includes: In response to opening the initial interface, obtaining the ID and code block of the HTML elements of the initial interface; Based on the ID, determining whether both the ID and the variables in the code block have assignments to determine whether the initial interface is a dynamic interface.
3. The method according to claim 1, wherein The constructing an HTML element chain based on the initial interface includes: Reconstructing new HTML elements based on the initial interface as the root elements; Pre-rendering the interface components under the initial interface based on the root elements to obtain element objects; Obtaining an HTML element chain based on the root elements and the element objects.
4. The method according to claim 1, wherein The updating the initial interface relationship chain based on the HTML element chain to obtain a target interface relationship chain includes: In response to the root element in the HTML element chain being in a display state and the variables in the element objects under the root element not having assignments, using the interface components corresponding to the element objects as a new initial interface; Generating new interface components based on the new initial interface until the variables in the element objects corresponding to the new interface components have assignments to obtain a target interface relationship chain.
5. The method according to claim 1, wherein The determining a data snapshot of the interface components with hidden events in the target interface relationship chain based on the target interface relationship chain includes: In response to there being interface components in a display state in the target interface relationship chain, obtaining the root elements of the interface components in the display state; In response to there being an interface hiding event, determining the root element of the interface component corresponding to the interface hiding event as the target root element; Determining the corresponding data snapshot based on the target root element.
6. An interface-mounted data propagation device, characterized in that, The device includes: A component determination module, configured to, in response to the initial interface being a dynamic interface, determine corresponding interface components based on the initial interface; An element chain construction module, configured to construct an initial interface relationship chain based on the initial interface and the interface components, and in response to the non-existence of the interface components in a preset component container, construct an HTML element chain based on the initial interface; A snapshot generation module, configured to update the initial interface relationship chain based on the HTML element chain to obtain a target interface relationship chain; determine a data snapshot of an interface component with a hidden event in the target interface relationship chain based on the target interface relationship chain; A data propagation module, configured to, in response to the existence of a click event in the target interface relationship chain, mount the data snapshot under the interface component corresponding to the click event, and propagate the data snapshot backward to the initial interface; Wherein, determining the corresponding interface components based on the initial interface includes: Obtaining a sub-object HTML element of a query element on the initial interface; Splitting the sub-object HTML element to obtain a query sub-element set; In response to the existence of a click attribute in a query sub-element in the query sub-element set, determining a function object corresponding to the click attribute; In response to the function object being a state control function, displaying the interface components corresponding to the initial interface.
7. A computer device, comprising a memory and a processor, the memory storing a computer program, characterized in that, When the processor executes the computer program, the steps of the method according to any one of claims 1 to 5 are implemented.
8. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 5 are implemented.
9. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 5 are implemented.
Citation Information
Patent Citations
Application interface rendering method and apparatus
CN105354013A