A dynamic data view generation method and system based on user roles and business scenarios
By maintaining a dependency description list and event messages for data nodes, and combining this with a caching strategy, only the affected data nodes are updated. This solves the problems of poor flexibility and high resource consumption in existing technologies, achieving efficient and accurate dynamic data view updates and improving the user experience.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2026-01-06
- Publication Date
- 2026-04-07
AI Technical Summary
Existing technologies suffer from poor flexibility, high system resource consumption, low update accuracy, and poor human-computer interaction experience in generating dynamic data views based on user roles and business scenarios. This is particularly prominent in business dashboards that need to simultaneously consider data real-time performance, multi-view collaboration, and complex role-based access control.
By maintaining a list of data dependency descriptions for each data node and combining it with event messages in a unified format, the scope of the impact of data changes can be accurately determined. Only the affected nodes are updated, avoiding repeated rendering of the overall view. A data mask mechanism is used to dynamically inject role permissions, and a caching strategy is combined to optimize the update process.
It significantly improves update efficiency, ensures the accuracy and responsiveness of data views, optimizes resource utilization, and enhances the user experience.
Smart Images

Figure CN121455997B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the fields of data processing and access control technology, and in particular to a method and system for generating dynamic data views based on user roles and business scenarios. Background Technology
[0002] To meet the data needs of users with different job responsibilities, such as managers, analysts, and frontline operators, in specific business scenarios (such as real-time monitoring, data analysis, and troubleshooting), dynamic data view generation technology becomes crucial. Ideally, it should automatically filter, aggregate, and present the most relevant data based on the user's role and permissions and the current business scenario, forming a personalized and structured view to improve decision-making efficiency and user experience.
[0003] Existing technologies for generating dynamic data views based on user roles and business scenarios suffer from several drawbacks, including poor flexibility, high system resource consumption, low update accuracy, and unsatisfactory human-computer interaction. These shortcomings are particularly pronounced in business dashboards that require simultaneous consideration of data real-time performance, multi-view collaboration, and complex role-based access control. Summary of the Invention
[0004] This application provides a method and system for generating dynamic data views based on user roles and business scenarios. It maintains a list of data dependency descriptions for each data node and combines it with event messages in a unified format to accurately determine the scope of the impact of data changes, update only the affected nodes, avoid repeated rendering of the overall view, and significantly improve update efficiency.
[0005] This application proposes a method for generating dynamic data views based on user roles and business scenarios, including:
[0006] User roles and corresponding role permissions are pre-configured for different users, and under the current role permissions, a corresponding data view is presented. The data view includes input nodes, filter nodes, association nodes, and / or aggregation nodes. The data view is used to present some nodes of the data in the current scene in a structured manner.
[0007] Full monitoring of the underlying data source, and data filtering based on current role permissions;
[0008] For the filtered data, the captured data change events are encapsulated into messages in a unified format and distributed to the corresponding event channels, where different event priority channels are defined for different types of data changes;
[0009] For each data node in the data view, maintain a list of data dependency descriptions. The list of data dependency descriptions is used to record the data range, dimensions, and business scenario identifiers that the data node depends on.
[0010] According to the data dependency description list, a corresponding caching strategy is assigned to the data transmitted via the event priority channel. The caching strategy is configured with a corresponding expiration time for different event priority channels, and the higher the priority, the longer the expiration time.
[0011] Based on the set triggering strategy, the data in the current cache is rendered to update the data view.
[0012] This application proposes a dynamic data view generation system based on user roles and business scenarios, including a processor and a memory. The memory stores a computer program, which, when executed by the processor, implements the steps of the aforementioned dynamic data view generation method based on user roles and business scenarios.
[0013] This application maintains a list of data dependency descriptions for each data node and combines it with event messages in a unified format to accurately determine the scope of the impact of data changes, update only the affected nodes, avoid repeated rendering of the overall view, and significantly improve update efficiency.
[0014] The above description is merely an overview of the technical solution of this application. In order to better understand the technical means of this application and to implement it in accordance with the contents of the specification, and to make the above and other objects, features and advantages of this application more obvious and understandable, specific embodiments of the present invention are described below. Attached Figure Description
[0015] Various other advantages and benefits will become apparent to those skilled in the art upon reading the following detailed description of preferred embodiments. The accompanying drawings are for illustrative purposes only and are not intended to limit the invention. Furthermore, the same reference numerals denote the same parts throughout the drawings. In the drawings:
[0016] Figure 1 This is a basic flowchart illustrating the dynamic data view generation method based on user roles and business scenarios in this embodiment. Detailed Implementation
[0017] Exemplary embodiments of the present disclosure will now be described in more detail with reference to the accompanying drawings. While exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be implemented in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.
[0018] This application proposes a method for generating dynamic data views based on user roles and business scenarios, such as... Figure 1 As shown, it includes the following steps:
[0019] In step S101, user roles and corresponding role permissions are pre-configured for different users. Under the current role and permissions, a corresponding data view is presented. The data view includes input nodes, filter nodes, association nodes, and / or aggregation nodes. The data view is used to structurally present a portion of the data in the current scenario. In a specific example, user roles could be administrators, analysts, operators, etc. The data view includes input nodes representing the original data source entry point, such as a database table; filter nodes, which are virtual nodes used to filter input data based on conditions; different filter nodes are set for different filter conditions or rules; association nodes are used to associate different data sources; and aggregation nodes are used for statistical analysis and calculation of the data. In a specific example, the data view is used to combine nodes according to certain logic, ultimately presenting the results of some nodes in a structured manner to intuitively represent the data situation under the current permissions and monitoring scope.
[0020] In step S102, the underlying data source is fully monitored, and data is filtered according to the current role permissions. In some embodiments, filtering can be done using rule filtering or other methods.
[0021] In step S103, for the filtered data, the captured data change events are encapsulated into messages in a unified format and distributed to the corresponding event channels. Different event priority channels are defined for different types of data changes. In some embodiments, priority channels can be set according to actual needs. For example, channels can be allocated according to the transmission queue, delay, etc. of different channels, or the priority of each channel can be specified.
[0022] In step S104, for each data node in the data view, a data dependency description list is maintained. The data dependency description list is used to record the data range, dimension and business scenario identifier that the data node depends on.
[0023] In step S105, based on the data dependency description list, a corresponding caching strategy is assigned to the data transmitted via the event priority channel. The caching strategy corresponds to an expiration time for each event priority channel, with higher priority channels having longer expiration times. In a specific example, multiple event priority channels are defined. For instance, events involving changes to core metrics are defined as being transmitted via a high-priority channel, while changes to log types and description information are defined as being transmitted via a low-priority channel.
[0024] Furthermore, configuring longer expiration times for high-priority channels allows for more targeted data retention in the cache. In a specific example, the expiration time for each priority channel can be configured according to the refresh cycle of the data view; for example, low-priority channels can be configured with a refresh cycle of 0.5-1 times, while high-priority channels can be configured with a refresh cycle of multiple times.
[0025] In step S106, the data in the current cache is rendered according to the set triggering strategy to update the data view.
[0026] This application maintains a list of data dependency descriptions for each data node and combines it with event messages in a unified format to accurately determine the scope of the impact of data changes, update only the affected nodes, avoid repeated rendering of the overall view, and significantly improve update efficiency.
[0027] In some embodiments, the captured data change events are encapsulated into a message in a unified format, including: the changed data primary key, such as order_id:1001; the change type, such as INSERT, UPDATE, DELETE, etc.; the data snapshot after the change; and the timestamp of the data change.
[0028] In some embodiments, updating the data view includes: determining whether any encapsulated data change event intersects with the data dependency scope of the currently active data node, thereby determining the update scope of the data node. In some embodiments, the data dependency description list is implemented based on a directed acyclic graph. This list is a structured record, including the data source, the filtering conditions applied to the node, the list of fields that the node depends on, the list of downstream node IDs that depend on the output results of this node, and the business scenario identifier associated with the node.
[0029] In some embodiments, data filtering based on current role permissions includes:
[0030] For different role permissions, corresponding data masks are established. These data masks are used to hide data outside the permission scope and encapsulate all data within the scope of data change events into a message with a unified format. This application further designs a data masking method. In this embodiment, it is used to present data under different role permissions. Compared to data filtering and deletion, the data masking method can quickly define the visible scope of data without changing the existing encapsulation process and encapsulation format.
[0031] This application uses a data masking mechanism to dynamically inject role permissions into the data access layer, and combines masking differences when roles change with real-time cache clearing to ensure that the data view presented to the user at any time strictly follows their current role permissions.
[0032] In some embodiments, rendering a view of the currently cached data according to a set triggering strategy to update the data view includes:
[0033] When an update is triggered, all nodes associated with the data change event in the current cache are updated. For example, iterate through the data change events in the current cache, determine whether the primary key or condition range affected by each event intersects with the dependency list of any active data nodes, and only update the nodes that intersect.
[0034] Calculate the activity metric for all associated nodes. This activity metric is used to normalize and describe the frequency with which a node is triggered by data events within a specified time window, the number of times it is referenced by downstream nodes, and its scene relevance. In some examples, the corresponding weights can be pre-configured. + + ,in , , For the sub-indicator weights, The frequency of data events triggered within a specified time window, as normalized. This represents the normalized number of downstream node references. The normalized scene relevance score.
[0035] Nodes with an activity level exceeding a preset threshold are designated as active nodes and used to update the structured data view in the current scene. When updating the view, priority is given to ensuring that data areas with activity levels above the preset threshold are rendered quickly and accurately. For nodes with low activity levels, delayed loading or a simplified approach of updating without rendering can be used to optimize rendering performance. Updating low-activity nodes can be determined instantly at any refresh time.
[0036] In some embodiments, updating the data view further includes addressing changes in role, such as from manager to operator:
[0037] Update the current role permissions, regenerate the data mask based on the updated role permissions, and apply the new data mask to the underlying data source for subsequent full monitoring.
[0038] Execute on the data currently in the cache:
[0039] By comparing the data visibility differences between the old and new data masks, the differences are captured as data change events, and data in the cache that does not belong to the new role's permissions is cleared. In this application, the current role permission context is immediately updated, and a new data mask is regenerated based on the new role. The new mask takes effect immediately, and mask difference comparison and cache clearing are performed. For example, conditions representing "data no longer visible" and conditions representing "newly visible data" are generated, and the differences between these two conditions are encapsulated as high-priority data change events. At the same time, all cached items matching the old role ID and shared cached data that meet the "data no longer visible" condition are immediately cleared.
[0040] Based on data change events related to the differences, the current data view is refreshed directly. That is, upon receiving a high-priority permission change event, a non-data update is immediately performed, thereby achieving a fast UI transition.
[0041] For the refreshed data view, only the dependency list of the presented data nodes is traversed, and the data scope of their dependencies is updated based on the new role's permissions;
[0042] After the next trigger update of the data view, the dependency list of all data nodes is traversed for a range update.
[0043] In some embodiments, updating the data scope that a new role depends on based on its permissions includes:
[0044] After the data view is refreshed for the first time, only the dependency list of active nodes in the currently visible interface is traversed. The dependency list and the new data mask are then logically ANDed to partially update the dependency list. If the condition after the operation is true, the list is updated; if there is a conflict, the node is marked as needing coordination, and its condition is temporarily replaced with the closest available condition or set to empty. This stage quickly ensures the correctness of the dependencies in the currently presented data view.
[0045] In subsequent updates, the dependency lists of all nodes are traversed, and logical AND operations are performed to rebuild the dependencies of all data nodes. After the next idle period or when a scheduled task is triggered, the dependency lists of all nodes (including inactive and uncoordinated nodes) are traversed, invalid dependencies are deleted, and a complete and consistent global data dependency relationship is rebuilt. By distributing the computational pressure, the computational load during peak role switching is avoided, and resource requirements are reduced.
[0046] In some embodiments, directly refreshing the current data view based on data change events of the differing portions includes:
[0047] If a data change event in the difference section has a priority higher than a specified priority, a non-data update is performed on the data view:
[0048] For non-data updates, for data areas where permissions have been lost, the components are set to restricted, grayed out, or the corresponding areas are collapsed; for data areas where permissions have been added, placeholders are configured; this process is completed within milliseconds, providing users with immediate feedback.
[0049] Based on the data change events for the differing portions, the changed data is retrieved from the cache and used to populate the permission-changed areas. Specifically, new data can be asynchronously fetched to populate placeholders based on the conditions carried by the change events.
[0050] This application's method employs a two-stage view update strategy when roles change. First, it rapidly refreshes the UI state based on events, then asynchronously coordinates global dependencies and transitions non-data-related updates, resulting in virtually imperceptible latency during role switching and smooth, seamless interface changes. Through a differentiated caching strategy based on event priority and dynamic view presentation based on node activity metrics, resources are intelligently allocated, prioritizing the response speed of high-frequency and core data nodes, thereby improving overall performance.
[0051] This application also proposes a dynamic data view generation system based on user roles and business scenarios, including a processor and a memory. The memory stores a computer program, which, when executed by the processor, implements the steps of the aforementioned dynamic data view generation method based on user roles and business scenarios.
[0052] Furthermore, although exemplary embodiments have been described herein, their scope includes any and all embodiments based on this disclosure that have equivalent elements, modifications, omissions, combinations (e.g., schemes involving intersections of various embodiments), adaptations, or changes. They are not limited to the examples described in this specification or during the implementation of this application, and such examples are to be construed as non-exclusive.
[0053] The above description is intended to be illustrative and not restrictive. For example, the above examples (or one or more of them) can be used in combination with each other. Other embodiments can be used by those skilled in the art when reading the above description.
[0054] The above embodiments are merely exemplary embodiments of this disclosure. Those skilled in the art can make various modifications or equivalent substitutions to this invention within the scope of the disclosure, and such modifications or equivalent substitutions should also be considered to fall within the protection scope of this invention.
Claims
1. A method for generating dynamic data views based on user roles and business scenarios, characterized in that, include: User roles and corresponding role permissions are pre-configured for different users, and under the current role permissions, a corresponding data view is presented. The data view includes input nodes, filter nodes, association nodes, and / or aggregation nodes. The data view is used to present some nodes of the data in the current scene in a structured manner. Full monitoring of the underlying data source, and data filtering based on current role permissions; For the filtered data, the captured data change events are encapsulated into messages in a unified format and distributed to the corresponding event channels, where different event priority channels are defined for different types of data changes; For each data node in the data view, maintain a list of data dependency descriptions. The list of data dependency descriptions is used to record the data range, dimensions, and business scenario identifiers that the data node depends on. According to the data dependency description list, a corresponding caching strategy is assigned to the data transmitted via the event priority channel. The caching strategy is configured with a corresponding expiration time for different event priority channels, and the higher the priority, the longer the expiration time. Based on the set triggering strategy, the data in the current cache is rendered to update the data view; Based on the set triggering strategy, the data in the current cache is rendered to update the data view, including: When an update is triggered, all nodes associated with the data change event in the current cache are updated; and, Calculate the activity index of all associated nodes. The activity index is used to normalize and describe the frequency of data events that trigger the node within a specified time window, the number of times it is referenced by downstream nodes, and the scene relevance. Nodes whose activity index exceeds a preset threshold are designated as active nodes to update the structured data view in the current scenario.
2. The method for generating dynamic data views based on user roles and business scenarios as described in claim 1, characterized in that, The captured data change events are encapsulated into a message in a unified format, including: the changed primary key of the data, the change type, the data snapshot after the change, and the timestamp of the data change.
3. The method for generating dynamic data views based on user roles and business scenarios as described in claim 2, characterized in that, Updating the data view includes: Determine the update scope of a data node by identifying any overlap between the encapsulated data change event and the data dependency scope of the currently active data node.
4. The method for generating dynamic data views based on user roles and business scenarios as described in claim 2, characterized in that, Data filtering based on current role permissions includes: For different role permissions, corresponding data masks are created. The data masks are used to hide data outside the permission scope and encapsulate all data within the scope of data change events into a message of a unified format.
5. The method for generating dynamic data views based on user roles and business scenarios as described in claim 1, characterized in that, Updating the data view in the event of a change in roles also includes: Update the current role permissions, regenerate the data mask based on the updated role permissions, and apply the new data mask to the underlying data source for subsequent full monitoring; and, Execute on the data currently in the cache: Compare the data visibility differences between the old and new data masks, capture the differences as data change events, and clear the cache of data that does not belong to the new role's permissions; Based on data change events in the differing portions, the current data view is refreshed directly. For the refreshed data view, only the dependency list of the presented data nodes is traversed, and the data scope of their dependencies is updated based on the new role's permissions; After the next trigger update of the data view, the dependency list of all data nodes is traversed for a range update.
6. The method for generating dynamic data views based on user roles and business scenarios as described in claim 5, characterized in that, Based on data change events related to the differences, directly refreshing the current data view includes: If a data change event in the difference section has a priority higher than a specified priority, a non-data update is performed on the data view: For non-data updates, for data areas where permissions have been lost, the components are set to restricted, grayed out, or the corresponding areas are collapsed; for data areas where permissions have been added, placeholders are configured. Based on the data change events of the differing parts, retrieve the changed data from the cache and populate the permission change area.
7. The method for generating dynamic data views based on user roles and business scenarios as described in claim 5, characterized in that, The data dependency description list is implemented based on a directed acyclic graph, and the data scope of its dependencies is updated based on the new role's permissions, including: After the data view is refreshed for the first time, only the dependency list of active nodes in the currently visible interface is traversed, and the dependency list and the new data mask are logically ANDed to locally update the dependency list. In subsequent updates, the dependency list of all nodes is traversed, and logical AND operations are performed to rebuild the dependency relationships of all data nodes.
8. A dynamic data view generation system based on user roles and business scenarios, characterized in that, It includes a processor and a memory, wherein the memory stores a computer program, which, when executed by the processor, implements the steps of the dynamic data view generation method based on user roles and business scenarios as described in any one of claims 1 to 7.
Citation Information
Patent Citations
Page rendering method and device
CN113449228A
Navigation switching method and device of product module
CN119691294A