CN118504056A - Dynamic interface display method, device, equipment, storage medium and program product - Google Patents

Dynamic interface display method, device, equipment, storage medium and program product Download PDF

Info

Publication number
CN118504056A
CN118504056A CN202410728115.6A CN202410728115A CN118504056A CN 118504056 A CN118504056 A CN 118504056A CN 202410728115 A CN202410728115 A CN 202410728115A CN 118504056 A CN118504056 A CN 118504056A
Authority
CN
China
Prior art keywords
user
page
access
user role
authority
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
CN202410728115.6A
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.)
China Construction Bank Corp
CCB Finetech Co Ltd
Original Assignee
China Construction Bank Corp
CCB Finetech 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 China Construction Bank Corp, CCB Finetech Co Ltd filed Critical China Construction Bank Corp
Priority to CN202410728115.6A priority Critical patent/CN118504056A/en
Publication of CN118504056A publication Critical patent/CN118504056A/en
Pending legal-status Critical Current

Links

Landscapes

  • Storage Device Security (AREA)

Abstract

The application relates to the technical field of big data, and particularly discloses a dynamic interface display method, a dynamic interface display device, computer equipment, a computer readable storage medium and a computer program product. The method comprises the following steps: when a page access request is received, judging whether a user logs in; if the user is logged in, extracting user login information; acquiring user role authority data; drawing a page accessed by a user in a dynamic rendering mode according to the acquired user role authority data, wherein the drawing calculation process is carried out in a memory; and displaying the pages and/or the contents which the user has access to. By adopting the method, different pages can be drawn aiming at different users, page rendering is not required to be completed at one time, the access pressure of a server is reduced, the calculation process of page rendering is carried out in a memory, and information leakage can be effectively avoided. The access rights of different users can be accurately controlled, and the service demand change in the future can be flexibly met.

Description

Dynamic interface display method, device, equipment, storage medium and program product
Technical Field
The present application relates to the field of big data technology, and in particular, to a dynamic interface display method, a dynamic interface display device, a computer readable storage medium, and a computer program product.
Background
With the development of big data technology, a technology for access control based on user roles has emerged. This technique may enable a particular character to see or access only a particular page, thereby enabling user rights management.
Currently, when rendering a page, users are generally not differentiated, all pages are drawn at one time, and then a style sheet (CASCADING STYLE SHEETS, CSS) or other methods are used for controlling the display or hiding of a specific page, so that the purpose of authority control is achieved. Among other things, CSS describes the question of how elements on other media, such as screen, paper, audio, etc., should be rendered. However, drawing all pages at once increases the access pressure of the server. When the CSS is used for authority control, only the display or the hiding of page elements can be controlled, and when a debugging tool of a browser is used for access, a user can still see a complete page, so that information leakage is easy to occur.
Disclosure of Invention
Based on the foregoing, it is necessary to provide a dynamic interface display method, a device, a computer readable storage medium and a computer program product, which can draw different pages for different users, and the drawn calculation process is performed in a memory, so that information leakage can be effectively avoided.
In a first aspect, the present application provides a dynamic interface display method, including:
When a page access request is received, judging whether a user logs in;
if the user is logged in, extracting user login information; wherein, the user login information includes: user identification, or device identification;
Acquiring user role authority data; wherein the user role authority data includes: the access authority comprises a user role and access authority corresponding to the user role, wherein the access authority comprises: page rights, and/or content rights;
drawing a page accessed by a user in a dynamic rendering mode according to the acquired user role authority data, wherein the drawing calculation process is carried out in a memory;
And displaying the pages and/or the contents which the user has access to.
In one embodiment, the drawing the page accessed by the user by adopting a dynamic rendering mode according to the acquired user role authority data includes:
Dividing a page of an access system into a static routing page and a dynamic routing page, wherein the static routing page is a page which is accessed to all roles and tourists in an open mode, and the dynamic routing page is a page related to role customization;
And adding the corresponding dynamic route into a route instance according to the authority data of the user role, wherein the route instance is used for recording route information and limiting the user to access the corresponding page only according to the authority list.
In one embodiment, when receiving the page access request, the determining whether the user logs in includes:
judging whether a user currently accessing the website logs in or not according to the token or the temporary data cookie;
if the user does not log in, dynamically rendering a login page to remind the user of logging in;
If the login is already registered, a token or a cookie is acquired from the server and stored locally.
In one embodiment, the acquiring the user role permission data includes:
After the user finishes logging in, a first request is sent to the server side to acquire user role authority data corresponding to the user logging in information.
In one embodiment, the drawing the page accessed by the user by adopting a dynamic rendering mode according to the acquired user role authority data further includes:
configuring a custom instruction for page content needing permission setting;
determining page elements to be hidden and displayed in the page content according to the acquired user role authority data;
and carrying out bottom operation on the page element through the custom instruction, wherein the bottom operation comprises the following steps: the focusing is out of focus and the display is hidden.
In one embodiment, the method further comprises:
sending a second request to the server to request the server to change the user role authority data, wherein the changing the user role authority data comprises:
Modifying the user role and/or modifying the access right corresponding to the user role.
In a second aspect, the present application further provides a dynamic interface display device, including:
The login judging module is used for judging whether a user logs in or not when receiving a page access request;
The extraction module is used for extracting user login information when the user is logged in; wherein, the user login information includes: user identification, or device identification;
The acquisition module is used for acquiring user role authority data; wherein the user role authority data includes: the access authority comprises a user role and access authority corresponding to the user role, wherein the access authority comprises: page rights, and/or content rights;
the rendering module is used for drawing the page accessed by the user in a dynamic rendering mode according to the acquired user role authority data, wherein the drawing calculation process is carried out in the memory;
And the display module is used for displaying the pages and/or the contents which the user has access to.
In a third aspect, the present application also provides a computer device comprising a memory and a processor, the memory storing a computer program, the processor implementing the following steps when executing the computer program:
Acquiring user role authority data; wherein the user role authority data includes: the access authority comprises a user role and access authority corresponding to the user role, wherein the access authority comprises: page rights, and/or content rights;
drawing a page accessed by a user in a dynamic rendering mode according to the acquired user role authority data, wherein the drawing calculation process is carried out in a memory;
And displaying the pages and/or the contents which the user has access to.
In a fourth aspect, the present application also provides a computer readable storage medium having stored thereon a computer program which when executed by a processor performs the steps of:
Acquiring user role authority data; wherein the user role authority data includes: the access authority comprises a user role and access authority corresponding to the user role, wherein the access authority comprises: page rights, and/or content rights;
drawing a page accessed by a user in a dynamic rendering mode according to the acquired user role authority data, wherein the drawing calculation process is carried out in a memory;
And displaying the pages and/or the contents which the user has access to.
In a fifth aspect, the application also provides a computer program product comprising a computer program which, when executed by a processor, performs the steps of:
Acquiring user role authority data; wherein the user role authority data includes: the access authority comprises a user role and access authority corresponding to the user role, wherein the access authority comprises: page rights, and/or content rights;
drawing a page accessed by a user in a dynamic rendering mode according to the acquired user role authority data, wherein the drawing calculation process is carried out in a memory;
And displaying the pages and/or the contents which the user has access to.
The dynamic interface display method, the dynamic interface display device, the computer equipment, the computer readable storage medium and the computer program product judge whether a user logs in or not when receiving a page access request; if the user is logged in, extracting user login information; wherein, the user login information includes: user identification, or device identification; therefore, the user login information can be extracted based on the login behavior standard of the user, so that the user role authority data corresponding to the user login information can be acquired later. Then, user role authority data is acquired, wherein the user role authority data comprises: the access authority comprises a user role and access authority corresponding to the user role, wherein the access authority comprises: page rights, and/or content rights; therefore, the corresponding relation between the roles of the user and the corresponding access rights can be determined, and rights management for the user is realized. Drawing a page accessed by a user in a dynamic rendering mode according to the acquired user role authority data, wherein the drawing calculation process is carried out in a memory; therefore, a dynamic rendering technology can be used for drawing different pages for different users, page rendering is not required to be completed at one time, the access pressure of a server is reduced, and the calculation process of page drawing is carried out in a memory, so that information leakage can be effectively avoided. The page and/or the content which the user has access to are displayed in a dynamic rendering mode, so that the flexibility of page drawing can be improved well, and the method is suitable for the conditions of business change or frequent change of user roles. In conclusion, the method of the application not only can accurately control the authority of different users, but also can flexibly meet the service demand change in future, and simultaneously has the advantages of high safety and reduced server pressure.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the related art, the drawings that are needed in the description of the embodiments of the present application or the related technologies will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and other related drawings may be obtained according to these drawings without inventive effort to those of ordinary skill in the art.
FIG. 1 is an application environment diagram of a dynamic interface presentation method in one embodiment;
FIG. 2 is a flow chart of a dynamic interface display method in one embodiment;
FIG. 3 is a flow chart of a dynamic interface display method according to another embodiment;
FIG. 4 is a flow chart of a method for displaying a dynamic interface according to another embodiment;
FIG. 5 is a flow diagram of a dynamic presentation method of website access in one embodiment;
FIG. 6 is a block diagram of a dynamic interface display device in one embodiment;
FIG. 7 is a block diagram of a dynamic interface display device in another embodiment;
fig. 8 is an internal structural diagram of a computer device in one embodiment.
Detailed Description
The present application will be described in further detail with reference to the drawings and examples, in order to make the objects, technical solutions and advantages of the present application more apparent. It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the application. It should be noted that, in the embodiments of the present application, some existing solutions in the industry such as software, group, model, etc. may be mentioned, and they should be regarded as exemplary only for illustrating the feasibility of implementing the technical solution of the present application, but it does not mean that the applicant has or must not use the solution.
It should be noted that, the user information (including but not limited to user equipment information, user personal information, etc.) and the data (including but not limited to data for analysis, stored data, presented data, etc.) related to the present application are both information and data authorized by the user or sufficiently authorized by each party, and the collection, use and processing of the related data are required to meet the related regulations. The technical scheme of the application obtains, stores, uses, processes and the like the data, which all meet the relevant regulations of national laws and regulations.
The dynamic interface display method provided by the embodiment of the application can be applied to an application environment shown in figure 1. Wherein the terminal 102 communicates with the server 104 via a network. The data storage system may store data that the server 104 needs to process. The data storage system may be integrated on the server 104 or may be located on a cloud or other network server. The terminal 102 acquires user role authority data from the server 104; when receiving a page access request, an application (or a page system) installed in the terminal 102 judges whether a user logs in; if the user is logged in, extracting user login information; wherein, the user login information includes: user identification, or device identification; then, drawing a page accessed by a user in a dynamic rendering mode according to the acquired user role authority data, wherein the drawing calculation process is carried out in a memory; finally, pages and/or content that the user has access to are presented on an interface of the terminal 102 (e.g., an interface accessed by a browser). The terminal 102 may be, but not limited to, various personal computers, notebook computers, smart phones, tablet computers, internet of things devices and portable wearable devices, where the internet of things devices may be smart speakers, smart televisions, smart air conditioners, smart vehicle devices, projection devices, and the like. The portable wearable device may be a smart watch, smart bracelet, headset, or the like. The head-mounted device may be a Virtual Reality (VR) device, an augmented Reality (Augmented Reality, AR) device, smart glasses, or the like. The server 104 may be an independent physical server, a server cluster or a distributed system formed by a plurality of physical servers, or a cloud server providing cloud computing services.
In an exemplary embodiment, as shown in fig. 2, a dynamic interface display method is provided, and the method is applied to the terminal in fig. 1 for illustration, and includes the following steps 201 to 205. Wherein:
Step 201, when receiving a page access request, it is determined whether the user logs in.
In this embodiment, when an access request for a website or an application page is received, whether the current user completes login is determined according to the history access data obtained by the local cache or the server. Or whether the user login information is out of date (a certain time can be set), and if so, the user is considered to be incomplete to login.
Step 202, if the user is logged in, extracting user login information.
In this embodiment, if the user has completed logging in, the user logging information is extracted from the local cache or the historical access data acquired by the server. Wherein, the user login information includes: user identification, or device identification.
It should be noted that, the embodiment is not limited to specific content of the user login information, and generally, information capable of identifying the user identity or the device identity may be used as the user login information. For example: user name, account name, device ID, etc.
And 203, acquiring user role authority data.
In this embodiment, the user role authority data is the most important part in a background management system, and by means of authority control, a user with a specific role can only see and access a specific page. Wherein the user role authority data includes: the access authority comprises a user role and access authority corresponding to the user role, wherein the access authority comprises: page permissions, and/or content permissions.
The user role authority data is typically stored in a server (server), and the access authority may include access authority to a page or access authority to page content. The page authority may refer to a specific web page, for example, a page accessed by a website. Content rights refer to page elements on a web page, such as various controls, buttons, or display bars, etc.
And 204, drawing the page accessed by the user in a dynamic rendering mode according to the acquired user role authority data.
In this embodiment, dynamic rendering refers to a process of generating an image in real time at runtime. Unlike static rendering, which completes making images once, dynamic rendering is often used in game development and virtual reality applications, when a web page is not refreshed in a browser, a new page structure can be returned to the browser according to user behavior or server-side data change, wherein all drawn calculation processes are performed in a memory. Compared with the static rendering technology, the dynamic rendering allows the application program to display real-time or frequently updated data, and when the access right of the user is set, personalized content (such as an intelligent report tool Dashboard or a user configuration file) can be provided for the specific user, and the data is updated according to the user interaction.
Illustratively, according to the acquired user role authority data, the authority which can be accessed by the user is determined, and the page to be rendered or the page content is further determined according to the accessed authority. The rendering mode can increase the interactivity of the page, reduce the load of the server, lighten the access pressure of the server, improve the performance and the response speed of the page and save the bandwidth of the network and the resources of the server.
In an alternative implementation mode, the page of the access system is divided into a static routing page and a dynamic routing page, wherein the static routing page is a page which is accessed to all roles and tourists in an open mode, and the dynamic routing page is a page related to role customization; and adding the corresponding dynamic route into a route instance according to the authority data of the user role, wherein the route instance is used for recording route information and limiting the user to access the corresponding page only according to the authority list.
In this embodiment, the so-called routing is the correspondence between the uniform resource locator (Uniform Resource Locator, URL) address and the page view. The URL is a compact representation of the location and access method of a resource available on the internet, and is the address of a standard resource on the internet. Each file on the internet has a unique URL that contains information indicating the location of the file and how the browser should handle it. The system access page is divided into a static route and a dynamic route, the page in the static route is set to be opened to all roles and tourists, and the dynamic route page is only opened to specific roles. After the role authority data is acquired, adding the dynamic routes into a route instance, so that the user can only access the corresponding page according to the authority list; and the user does not have access to the page, the routing instance does not add corresponding routing information, so that the access cannot be overridden even if the path is forcedly input in the browser.
In another alternative embodiment, a custom instruction is configured for the page content for which the authority needs to be set; determining page elements to be hidden and displayed in the page content according to the acquired user role authority data; and carrying out bottom operation on the page element through the custom instruction, wherein the bottom operation comprises the following steps: the focusing is out of focus and the display is hidden.
In this embodiment, if different users see different contents when accessing the same page, access rights to the page contents may be set. For example, content rights control is implemented using custom instructions. When a user enters a page, performing bottom-layer operation on page elements according to user permission through a preset user-defined instruction, such as focusing out of focus, display hiding and the like; therefore, the page content is displayed or hidden based on different user rights, and the purpose of controlling the content rights is achieved.
Step 205, the pages, and/or content, to which the user has access are presented.
In this embodiment, a page that the user has access to, and/or content may be displayed on a browser page. For example, user A's role rights are all elements that can access the first page, some elements of the second page, and none of the third page; the role authority of the user B is that part of elements of the first page and all elements of the second page and the third page can be accessed. At this time, the user A can enter the first page and the second page through dynamic routing, and when entering the second page, elements without access are hidden by the custom instruction (for example, focusing is out of focus, direct no display, etc.). Similarly, the user B may enter the first page, the second page, and the third page through dynamic routing, and when entering the first page, elements that are not authorized to be accessed may be hidden by the custom instruction. Since the user a is restricted from accessing the third page, the route instance does not have the route information of accessing the third page, and even if the user a obtains the access path of the third page from the user B, the third page cannot be accessed.
In this embodiment, by acquiring user role authority data, a correspondence between a user role and its corresponding access authority is determined. Drawing a page accessed by a user in a dynamic rendering mode according to the acquired user role authority data, wherein the drawing calculation process is carried out in a memory; therefore, a dynamic rendering technology can be used for drawing different pages for different users, page rendering is not required to be completed at one time, the access pressure of a server is reduced, and the calculation process of page drawing is carried out in a memory, so that information leakage can be effectively avoided. The page and/or the content which the user has access to are displayed in a dynamic rendering mode, so that the flexibility of page drawing can be improved well, and the method is suitable for the conditions of business change or frequent change of user roles. Therefore, the authority of different users can be accurately controlled, the service demand change in the future can be flexibly met, and the method has the advantages of high safety and reduced server pressure.
In another exemplary embodiment, as shown in FIG. 3, steps 301 through 306 may be included. Wherein:
step 301, judging whether the user currently accessing the website logs in or not according to the token or the temporary data cookie.
In this embodiment, token is a common way of verifying user identity, for example, the simplest token composition may include: user unique identity, timestamp, signature, etc. A Cookie is a type of temporal data that is generated by a server and sent to a user agent (typically a browser). The browser stores the key/value of the Cookie into a text file under a certain directory, and sends the Cookie to the server when the same website is requested next time, so that the server knows whether the user is a legal user or not and whether the user needs to log in again or not.
And 302, dynamically rendering a login page to remind a user to login if the user does not login.
In this embodiment, if the user does not log in, the identity of the user cannot be confirmed, that is, the role authority of the user cannot be determined, and at this time, a log-in page is rendered first by a dynamic rendering technology to remind the user to perform log-in first. The user can enter a subsequent page for access only after completing the login operation.
Step 303, if the login is already performed, a token or a cookie is obtained from the server and stored locally.
In this embodiment, if the user has logged in, the identity information of the user is determined according to the token or the cookie acquired by the server, and stored locally, so as to avoid the user logging in again during the subsequent operation.
Step 304, obtaining user role authority data.
For example, after the user completes login, a first request is sent to the server to obtain user role authority data corresponding to the user login information. Therefore, the user role and the access right corresponding to the user role can be determined according to the identity of the user when logging in.
And 305, drawing the page accessed by the user in a dynamic rendering mode according to the acquired user role authority data.
Step 306, the pages, and/or content, to which the user has access are presented.
In this embodiment, the specific implementation process and the achieved technical effect of step 304 to step 306 are described in the related description of step 203 to step 205 in the method shown in fig. 2, which is not repeated here.
In the embodiment, whether the user currently accessing the website logs in or not is judged through a token or a temporary data cookie; if the user does not log in, dynamically rendering a login page to remind the user of logging in; if the login is already registered, a token or a cookie is acquired from the server and stored locally. Therefore, the identity of the user can be identified, so that the user role authority data corresponding to the identity of the user can be conveniently obtained from the server. After the user role authority data is acquired, drawing a page accessed by a user in a dynamic rendering mode, wherein the drawing calculation process is performed in a memory; and displaying the pages and/or the contents which the user has access to. Therefore, different pages can be drawn aiming at different users, page information leakage is avoided while access control of authority is realized, flexibility of page drawing is improved, and access pressure of a server is reduced.
In yet another exemplary embodiment, as shown in FIG. 4, steps 401 through 406 may be included. Wherein:
Step 401, when receiving a page access request, determining whether a user logs in.
Step 402, if the user is logged in, the user login information is extracted.
Step 403, obtaining user role authority data.
And step 404, drawing the page accessed by the user in a dynamic rendering mode according to the acquired user role authority data.
Step 405, shows pages, and/or content, to which the user has access.
In this embodiment, the specific implementation process and the achieved technical effect of step 401 to step 405 are described in the related description of step 201 to step 205 in the method shown in fig. 2, and are not repeated here.
Step 406, a second request is sent to the server to request the server to change the user role permission data.
In this embodiment, when the service changes or the authority corresponding to the user role changes, the authority data of the user role may be changed through the server. For example, the user role is directly modified, and/or the access right corresponding to the user role is modified.
In this embodiment, the user role permission data may be changed by sending a second request to the server, which is applicable to the case of user permission change and page access permission change. Particularly, in an application scene with frequent service change, the access authority corresponding to the user role can be changed very flexibly. When a new user role is added, a new page does not need to be drawn again, and the new user role can be adapted only by changing the authority data of the user role, so that a specific page is customized for the new user role.
For example, as shown in fig. 5, a dynamic display method for website access is shown, which may include steps 501 to 505:
Step 501, a user accesses a website.
In this embodiment, when the user accesses the website, it is first determined whether the user has completed login.
It should be noted that, in this embodiment, the website access is taken as an example for illustration, and in addition, the method can also be applied to page access of APP (application), or some scenes where access authority setting is required, for example, management software pages inside an enterprise, etc.
Step 502, if yes, step 504 is executed, and if no, step 503 is executed.
In this embodiment, whether the user logs in or not can be judged through a token or a cookie; if not, dynamically rendering a login page to require the user to login first; if the client logs in, a token or a cookie is acquired from the server and stored locally.
It should be noted that, the present embodiment is not limited to the distinguishing manner of the user login, and the manner of conventionally obtaining the user identity information may be applied to the present embodiment.
Step 503, rendering and displaying the login page.
In this embodiment, a dynamic rendering technique or a static rendering technique may be used to display a login page on a current page of the browser, so as to remind the user of completing login first.
Step 504, obtaining user role rights data.
In this embodiment, the user role permission data is obtained by sending a request to the server. The user role authority data can be stored in a server, a cloud or a local. When stored locally, some authentication thresholds need to be set, or encrypted, to avoid tampering with the user rights data.
Step 505, a dynamic rendering technique is adopted to render and display the page to which the user has access.
In this embodiment, pages and contents that the user has permission to access are dynamically rendered and displayed according to the acquired role permission data. With respect to the control of page permissions, the pages of a system can be divided into two parts: static routing pages and dynamic routing pages. The pages in the static route are pages which can be accessed by all roles and tourists, and the dynamic route pages are pages relevant to role customization. After the user logs in successfully, adding the dynamic routes into the route instance according to the role authority data acquired from the server, so that the user can only access the corresponding page according to the authority list; and the user does not have access to the page, the routing instance does not add corresponding routing information, so that the access cannot be overridden even if the path is forcedly input in the browser. Regarding control of content rights, content rights control may be implemented using custom instructions. The custom instruction can perform bottom layer operation on page elements, such as focusing out of focus, display hiding and the like; and configuring a custom instruction for the page content requiring the authority, and determining the display hiding of the content according to the authority of the user after the user enters the page, so as to realize the control of the authority of the content.
According to the embodiment, different pages are drawn for different users according to the acquired user role authority data by using a dynamic rendering technology, and the drawn calculation process is performed in a memory, so that information leakage is effectively avoided, and server resources are saved. In addition, when the page is drawn, the condition of service variation can be considered in advance, the page can be drawn according to the requirement, and the performance and the flexibility of the page are improved.
It should be understood that, although the steps in the flowcharts related to the embodiments described above are sequentially shown as indicated by arrows, these steps are not necessarily sequentially performed in the order indicated by the arrows. The steps are not strictly limited to the order of execution unless explicitly recited herein, and the steps may be executed in other orders. Moreover, at least some of the steps in the flowcharts described in the above embodiments may include a plurality of steps or a plurality of stages, which are not necessarily performed at the same time, but may be performed at different times, and the order of the steps or stages is not necessarily performed sequentially, but may be performed alternately or alternately with at least some of the other steps or stages.
Based on the same inventive concept, the embodiment of the application also provides a dynamic interface display device for realizing the above related dynamic interface display method. The implementation of the solution provided by the device is similar to the implementation described in the above method, so the specific limitation of one or more embodiments of the dynamic interface display device provided below may refer to the limitation of the dynamic interface display method described above, and will not be repeated herein.
In one exemplary embodiment, as shown in fig. 6, there is provided a dynamic interface presentation apparatus, comprising: a login discrimination module 610, an extraction module 620, an acquisition module 630, a rendering module 640, and a presentation module 650, wherein:
the login judging module 610 is configured to judge whether a user logs in when receiving a page access request;
The extracting module 620 is configured to extract user login information when the user has logged in; wherein, the user login information includes: user identification, or device identification;
An obtaining module 630, configured to obtain user role permission data; wherein the user role authority data includes: the access authority comprises a user role and access authority corresponding to the user role, wherein the access authority comprises: page rights, and/or content rights;
The rendering module 640 is configured to draw a page accessed by a user in a dynamic rendering manner according to the acquired user role permission data, where a calculation process of drawing is performed in a memory;
a display module 650 for displaying pages, and/or content, to which the user has access.
Illustratively, the rendering module 640 is specifically configured to:
Dividing a page of an access system into a static routing page and a dynamic routing page, wherein the static routing page is a page which is accessed to all roles and tourists in an open mode, and the dynamic routing page is a page related to role customization;
And adding the corresponding dynamic route into a route instance according to the authority data of the user role, wherein the route instance is used for recording route information and limiting the user to access the corresponding page only according to the authority list.
Illustratively, the acquiring module 630 is specifically configured to:
After the user finishes logging in, a first request is sent to the server side to acquire user role authority data corresponding to the user logging in information.
Illustratively, the rendering module 640 is further configured to:
configuring a custom instruction for page content needing permission setting;
determining page elements to be hidden and displayed in the page content according to the acquired user role authority data;
and carrying out bottom operation on the page element through the custom instruction, wherein the bottom operation comprises the following steps: the focusing is out of focus and the display is hidden.
Illustratively, the login identification module 610 is specifically configured to: before acquiring user role authority data, judging whether a user currently accessing a website logs in or not according to a token or a temporary data cookie;
if the user does not log in, dynamically rendering a login page to remind the user of logging in;
If the login is already registered, a token or a cookie is acquired from the server and stored locally.
In the embodiment, the identity of the user is verified in a token or cookie mode and the like, and whether the user currently accessing the website logs in or not is judged; if the user does not log in, dynamically rendering a login page to remind the user of logging in; if the login is already registered, a token or a cookie is acquired from the server and stored locally. Therefore, the identity of the user can be identified, so that the user role authority data corresponding to the identity of the user can be conveniently obtained from the server.
In the embodiment, whether the user currently accessing the website logs in or not is judged through a token or a temporary data cookie; if the user does not log in, dynamically rendering a login page to remind the user of logging in; if the login is already registered, a token or a cookie is acquired from the server and stored locally. Therefore, the identity of the user can be identified, so that the user role authority data corresponding to the identity of the user can be conveniently obtained from the server. After the user role authority data is acquired, drawing a page accessed by a user in a dynamic rendering mode, wherein the drawing calculation process is performed in a memory; and displaying the pages and/or the contents which the user has access to. Therefore, different pages can be drawn aiming at different users, page information leakage is avoided while access control of authority is realized, flexibility of page drawing is improved, and access pressure of a server is reduced.
In another exemplary embodiment, as shown in fig. 7, a dynamic interface display device is provided, and may further include, on the basis of the device shown in fig. 6:
A modification module 660, the modification module 660 being configured to:
sending a second request to the server to request the server to change the user role authority data, wherein the changing the user role authority data comprises:
Modifying the user role and/or modifying the access right corresponding to the user role.
In this embodiment, the user role permission data may be changed by sending a second request to the server, which is applicable to the case of user permission change and page access permission change. Particularly, in an application scene with frequent service change, the access authority corresponding to the user role can be changed very flexibly. When a new user role is added, a new page does not need to be drawn again, and the new user role can be adapted only by changing the authority data of the user role, so that a specific page is customized for the new user role.
The modules in the dynamic interface display device may be implemented in whole or in part by software, hardware, or a combination thereof. The above modules may be embedded in hardware or may be independent of a processor in the computer device, or may be stored in software in a memory in the computer device, so that the processor may call and execute operations corresponding to the above modules.
In an exemplary embodiment, a computer device, which may be a terminal, is provided, and an internal structure thereof may be as shown in fig. 8. The computer device includes a processor, a memory, an input/output interface, a communication interface, a display unit, and an input means. The processor, the memory and the input/output interface are connected through a system bus, and the communication interface, the display unit and the input device are connected to the system bus through the input/output interface. Wherein the processor of the computer device is configured 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 and a computer program. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The input/output interface of the computer device is used to exchange information between the processor and the external device. The Communication interface of the computer device is used for conducting wired or wireless Communication with an external terminal, and the wireless Communication can be realized through WIFI, a mobile cellular network, near field Communication (NEAR FIELD Communication) or other technologies. The computer program is executed by a processor to implement a dynamic interface presentation method. The display unit of the computer device is used for forming a visual picture, and can be a display screen, a projection device or a virtual reality imaging device. The display screen can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer equipment can be a touch layer covered on the display screen, can also be a key, a track ball or a touch pad arranged on the shell of the computer equipment, and can also be an external keyboard, a touch pad or a mouse and the like.
It will be appreciated by those skilled in the art that the structure shown in FIG. 8 is merely a block diagram of some of the structures associated with the present inventive arrangements and is not limiting of the computer device to which the present inventive arrangements may be applied, and that a particular computer device may include more or fewer components than shown, or may combine some of the components, or have a different arrangement of components.
In one exemplary embodiment, a computer device is provided comprising a memory and a processor, the memory having stored therein a computer program which when executed by the processor performs the steps of:
When a page access request is received, judging whether a user logs in;
if the user is logged in, extracting user login information; wherein, the user login information includes: user identification, or device identification;
Acquiring user role authority data; wherein the user role authority data includes: the access authority comprises a user role and access authority corresponding to the user role, wherein the access authority comprises: page rights, and/or content rights;
drawing a page accessed by a user in a dynamic rendering mode according to the acquired user role authority data, wherein the drawing calculation process is carried out in a memory;
And displaying the pages and/or the contents which the user has access to.
In one embodiment, the drawing the page accessed by the user by adopting a dynamic rendering mode according to the acquired user role authority data includes: dividing a page of an access system into a static routing page and a dynamic routing page, wherein the static routing page is a page which is accessed to all roles and tourists in an open mode, and the dynamic routing page is a page related to role customization; and adding the corresponding dynamic route into a route instance according to the authority data of the user role, wherein the route instance is used for recording route information and limiting the user to access the corresponding page only according to the authority list.
In one embodiment, when receiving the page access request, the determining whether the user logs in includes: judging whether a user currently accessing the website logs in or not according to the token or the temporary data cookie; if the user does not log in, dynamically rendering a login page to remind the user of logging in; if the login is already registered, a token or a cookie is acquired from the server and stored locally.
In one embodiment, the acquiring the user role permission data includes: after the user finishes logging in, a first request is sent to the server side to acquire user role authority data corresponding to the user logging in information.
In one embodiment, the drawing the page accessed by the user by adopting a dynamic rendering mode according to the acquired user role authority data further includes: configuring a custom instruction for page content needing permission setting; determining page elements to be hidden and displayed in the page content according to the acquired user role authority data; and carrying out bottom operation on the page element through the custom instruction, wherein the bottom operation comprises the following steps: the focusing is out of focus and the display is hidden.
In one embodiment, the method further comprises: sending a second request to the server to request the server to change the user role authority data, wherein the changing the user role authority data comprises: modifying the user role and/or modifying the access right corresponding to the user role.
In one exemplary embodiment, a computer readable storage medium is provided, on which a computer program is stored which, when executed by a processor, carries out the steps of the various embodiments of the method described above.
In an exemplary embodiment, a computer program product is provided, comprising a computer program which, when executed by a processor, implements the steps of the various embodiments of the method described above.
Those skilled in the art will appreciate that implementing all or part of the above described methods may be accomplished by way of a computer program stored on a non-transitory computer readable storage medium, which when executed, may comprise the steps of the embodiments of the methods described above. Any reference to memory, database, or other medium used in embodiments provided herein may include at least one of non-volatile memory and volatile memory. The nonvolatile Memory may include Read-Only Memory (ROM), magnetic tape, floppy disk, flash Memory, optical Memory, high density embedded nonvolatile Memory, resistive random access Memory (RESISTIVE RANDOM ACCESS MEMORY, reRAM), magneto-resistive Memory (Magnetoresistive Random Access Memory, MRAM), ferroelectric Memory (Ferroelectric Random Access Memory, FRAM), phase change Memory (PHASE CHANGE Memory, PCM), graphene Memory, and the like. Volatile memory can include random access memory (Random Access Memory, RAM) or external cache memory, and the like. By way of illustration, and not limitation, RAM can be in various forms such as static random access memory (Static Random Access Memory, SRAM) or dynamic random access memory (Dynamic Random Access Memory, DRAM), etc. The databases referred to in the embodiments provided herein may include at least one of a relational database and a non-relational database. The non-relational database may include, but is not limited to, a blockchain-based distributed database, and the like. The processor referred to in the embodiments provided in the present application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic unit, a data processing logic unit based on quantum computation, an artificial intelligence (ARTIFICIAL INTELLIGENCE, AI) processor, or the like, but is not limited thereto.
The technical features of the above embodiments may be arbitrarily combined, and all possible combinations of the technical features in the above embodiments are not described for brevity of description, however, as long as there is no contradiction between the combinations of the technical features, they should be considered as the scope of the present application.
The foregoing examples illustrate only a few embodiments of the application and are described in detail herein without thereby limiting the scope of the application. It should be noted that it will be apparent to those skilled in the art that several variations and modifications can be made without departing from the spirit of the application, which are all within the scope of the application. Accordingly, the scope of the application should be assessed as that of the appended claims.

Claims (15)

1. A dynamic interface presentation method, the method comprising:
When a page access request is received, judging whether a user logs in;
if the user is logged in, extracting user login information; wherein, the user login information includes: user identification, or device identification;
Acquiring user role authority data; wherein the user role authority data includes: the access authority comprises a user role and access authority corresponding to the user role, wherein the access authority comprises: page rights, and/or content rights;
drawing a page accessed by a user in a dynamic rendering mode according to the acquired user role authority data, wherein the drawing calculation process is carried out in a memory;
And displaying the pages and/or the contents which the user has access to.
2. The method of claim 1, wherein the drawing the page accessed by the user by using a dynamic rendering mode according to the acquired user role authority data comprises:
Dividing a page of an access system into a static routing page and a dynamic routing page, wherein the static routing page is a page which is accessed to all roles and tourists in an open mode, and the dynamic routing page is a page related to role customization;
And adding the corresponding dynamic route into a route instance according to the authority data of the user role, wherein the route instance is used for recording route information and limiting the user to access the corresponding page only according to the authority list.
3. The method according to claim 1, wherein the determining whether the user is logged in when the page access request is received comprises:
judging whether a user currently accessing the website logs in or not according to the token or the temporary data cookie;
if the user does not log in, dynamically rendering a login page to remind the user of logging in;
If the login is already registered, a token or a cookie is acquired from the server and stored locally.
4. A method according to claim 3, wherein said obtaining user role rights data comprises:
After the user finishes logging in, a first request is sent to the server side to acquire user role authority data corresponding to the user logging in information.
5. The method according to any one of claims 1 to 4, wherein the drawing the page accessed by the user by using a dynamic rendering method according to the obtained user role permission data, further comprises:
configuring a custom instruction for page content needing permission setting;
determining page elements to be hidden and displayed in the page content according to the acquired user role authority data;
and carrying out bottom operation on the page element through the custom instruction, wherein the bottom operation comprises the following steps: the focusing is out of focus and the display is hidden.
6. The method according to any one of claims 1 to 4, further comprising:
sending a second request to the server to request the server to change the user role authority data, wherein the changing the user role authority data comprises:
Modifying the user role and/or modifying the access right corresponding to the user role.
7. A dynamic interface display device, the device comprising:
The login judging module is used for judging whether a user logs in or not when receiving a page access request;
The extraction module is used for extracting user login information when the user is logged in; wherein, the user login information includes: user identification, or device identification;
The acquisition module is used for acquiring user role authority data; wherein the user role authority data includes: the access authority comprises a user role and access authority corresponding to the user role, wherein the access authority comprises: page rights, and/or content rights;
the rendering module is used for drawing the page accessed by the user in a dynamic rendering mode according to the acquired user role authority data, wherein the drawing calculation process is carried out in the memory;
And the display module is used for displaying the pages and/or the contents which the user has access to.
8. The apparatus of claim 7, wherein the rendering module is specifically configured to:
Dividing a page of an access system into a static routing page and a dynamic routing page, wherein the static routing page is a page which is accessed to all roles and tourists in an open mode, and the dynamic routing page is a page related to role customization;
And adding the corresponding dynamic route into a route instance according to the authority data of the user role, wherein the route instance is used for recording route information and limiting the user to access the corresponding page only according to the authority list.
9. The device according to claim 7, wherein the login determination module is specifically configured to:
before acquiring user role authority data, judging whether a user currently accessing a website logs in or not according to a token or a temporary data cookie;
if the user does not log in, dynamically rendering a login page to remind the user of logging in;
If the login is already registered, a token or a cookie is acquired from the server and stored locally.
10. The apparatus of claim 9, wherein the obtaining module is specifically configured to:
After the user finishes logging in, a first request is sent to a server side to acquire user role authority data corresponding to user logging in information, wherein the user role authority data comprises: a user role, and access rights corresponding to the user role.
11. The apparatus according to any one of claims 7 to 10, wherein the rendering module is further configured to:
configuring a custom instruction for page content needing permission setting;
determining page elements to be hidden and displayed in the page content according to the acquired user role authority data;
and carrying out bottom operation on the page element through the custom instruction, wherein the bottom operation comprises the following steps: the focusing is out of focus and the display is hidden.
12. The apparatus according to any one of claims 7 to 10, further comprising: a modification module, configured to:
sending a second request to the server to request the server to change the user role authority data, wherein the changing the user role authority data comprises:
Modifying the user role and/or modifying the access right corresponding to the user role.
13. A computer device comprising a memory and a processor, the memory storing a computer program, characterized in that the processor implements the steps of the method of any of claims 1 to 6 when the computer program is executed.
14. A computer readable storage medium, on which a computer program is stored, characterized in that the computer program, when being executed by a processor, implements the steps of the method of any of claims 1 to 6.
15. A computer program product comprising a computer program, characterized in that the computer program, when being executed by a processor, implements the steps of the method of any of claims 1 to 6.
CN202410728115.6A 2024-06-06 2024-06-06 Dynamic interface display method, device, equipment, storage medium and program product Pending CN118504056A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202410728115.6A CN118504056A (en) 2024-06-06 2024-06-06 Dynamic interface display method, device, equipment, storage medium and program product

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202410728115.6A CN118504056A (en) 2024-06-06 2024-06-06 Dynamic interface display method, device, equipment, storage medium and program product

Publications (1)

Publication Number Publication Date
CN118504056A true CN118504056A (en) 2024-08-16

Family

ID=92240913

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202410728115.6A Pending CN118504056A (en) 2024-06-06 2024-06-06 Dynamic interface display method, device, equipment, storage medium and program product

Country Status (1)

Country Link
CN (1) CN118504056A (en)

Similar Documents

Publication Publication Date Title
CN110663040B (en) Method and system for securely embedding dashboard into content management system
KR102230558B1 (en) Access control for digital events
CN111259545B (en) Intelligent driving virtual simulation cloud platform
CN107979632B (en) Processing method, device and system for push information
WO2018053620A1 (en) Digital communications platform for webpage overlay
US9330198B1 (en) Mapping stored client data to requested data using metadata
US11882154B2 (en) Template representation of security resources
US9560110B1 (en) Synchronizing shared content served to a third-party service
CN109710866A (en) Image display method and device in online document
CN113742601A (en) Content sharing method and device, computer equipment and storage medium
US10664538B1 (en) Data security and data access auditing for network accessible content
CN113630612B (en) Data processing and data displaying method and device, electronic equipment and medium
CN118504056A (en) Dynamic interface display method, device, equipment, storage medium and program product
CN114297552A (en) Form expansion method and device, computer equipment and storage medium
US11757848B1 (en) Content protection for device rendering
US11520932B2 (en) Dynamic trigger of web beacons
CN118228313A (en) Platform page display method and device, computer equipment and storage medium
CN118467873A (en) Page data processing method, device, computer equipment and readable storage medium
CN118245699A (en) Page acquisition method, device, equipment, storage medium and computer program product
CN117197288A (en) Electronic signature using method, device and computer equipment
CN117216425A (en) Financial business page display method, device, computer equipment and storage medium
CN118569853A (en) Resource transfer method, apparatus, computer device, storage medium and computer program product
CN118312178A (en) Form page generation method and device, computer equipment and readable storage medium
CN115718597A (en) Data processing method and device based on small program
IE20190191A1 (en) Digital user consent preferences and control

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