A data processing method and device of a management system and an electronic device
By setting up a data warehouse cache for menu data in the browser and updating it when the database changes, the problem of slow menu display on large management system pages was solved, achieving fast response and resource conservation.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- CHINA CONSTRUCTION BANK
- Filing Date
- 2024-10-31
- Publication Date
- 2026-04-14
Smart Images

Figure CN119420743B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer technology, and in particular to a data processing method, apparatus, and electronic device for a management system. Background Technology
[0002] Management systems typically have system menu data, which is used to display pages for multiple business nodes within the system.
[0003] Some large management systems often experience slow menu display, severely impacting the user experience. Currently, there is no effective solution to this problem. Summary of the Invention
[0004] This specification provides a data processing method, apparatus, and electronic device for a management system to solve the problem of slow page menu display in large management systems.
[0005] To address the aforementioned technical problems, this specification provides a data processing method for a management system, comprising: a browser reading target state information from a data warehouse; if the target state information is not in a predetermined state, the browser calling a backend interface in the data warehouse to send an HTTP menu request to a server; the HTTP menu request is used to enable the server to retrieve menu data from a database and to use the menu data as feedback data for the HTTP menu request; the browser calling the backend interface in the data warehouse to store the menu data returned by the server in the browser's cache, and calling the backend interface in the data warehouse to modify the target state information in the data warehouse to a predetermined state; if the target state information is in a predetermined state, the browser calling a frontend interface in the data warehouse in real time to retrieve the cached menu data, and rendering a real-time display page of the management system based on the menu data; receiving a change notification sent by the server; the change notification is sent to the browser in response to changes in the menu data in the database; in response to the change notification, calling the backend interface in the data warehouse to send an HTTP menu request to the server to request menu data; and, based on the feedback data of the HTTP menu request, calling the backend interface in the data warehouse to modify the menu data stored in the browser's cache.
[0006] In some embodiments, the method further includes: after logging into the management system, the browser calls the backend interface in the data warehouse to send an HTTP menu request to the server for the first time to request menu data; receiving the menu data fed back by the server in response to the HTTP menu request; the browser calls the backend interface in the data warehouse to store the menu data fed back by the server in the browser cache, and calls the backend interface in the data warehouse to modify the target state information in the data warehouse to a predetermined state.
[0007] In some embodiments, the menu data sent by the server in response to the HTTP menu request sent by the browser is the full menu data or partial menu data; when the menu data sent by the server in response to the HTTP menu request sent by the browser is partial menu data, the method further includes: the browser concatenating the partial menu data with the cached partial menu data; accordingly, the browser renders the real-time display page of the management system based on the concatenated menu data.
[0008] In some embodiments, the HTTP menu request includes the size of the available cache space; the size of the available cache space is used by the server to determine the width and / or depth of the menu sent to the browser.
[0009] In some embodiments, the method further includes: deleting menu data branches with low access popularity values from the cached menu data when there is insufficient cache space; the menu data sent by the server in response to the HTTP menu request sent by the browser consists of menu data branches and access popularity values corresponding to each menu data.
[0010] In some embodiments, the data warehouse is Vuex; the Vuex data warehouse is created by the following methods: creating a state object (state), action objects (actions), and mutation objects (mutations); setting a data storage variable in the state object (state), which is used to store menu data and represent target state information; setting a first backend interface in the action objects (actions), which is used to send an HTTP menu request to the server to request menu data and receive feedback data from the server; setting a second backend interface in the mutation objects (mutations), which is used to change the data stored in the data storage variable; and setting data retrieval interfaces (getters) for the data warehouse, which are used by the frontend to retrieve data stored in the browser cache. The browser retrieves menu data; correspondingly, it reads target state information from the data warehouse, including: the browser calls the data retrieval interface getters to obtain the values of data storage variables in the state object state; the browser calls the backend interface in the data warehouse to send an HTTP menu request to the server, including: the browser calls the first backend interface to request menu data from the server, and calls the second backend interface to modify the values of data storage variables in the behavior object based on the returned data from the first backend interface; the browser calls the frontend interface in the data warehouse in real time to retrieve cached menu data, and renders the real-time display page of the management system based on the menu data, including: the browser calls the data retrieval interface getters in real time to obtain the values of data storage variables in the behavior object state, and renders the real-time display page of the management system based on the values.
[0011] In some embodiments, the method further includes: when a user logs out of the management system, the browser calls a second backend interface in the update object mutations to set the data storage variable to null.
[0012] A second aspect of this specification provides a data processing method for a management system, comprising: receiving an HTTP menu request sent by a user client, the HTTP menu request being used to obtain menu data; responding to the HTTP menu request, obtaining menu data from a database, and using the menu data as feedback data for the HTTP menu request; monitoring data changes in the database; in the event of data changes in the database, determining the target user identifier involved in the data changes; sending a change notification to the browser logged in by the target user identifier who is currently logged in; the change notification being used to cause the target user client to send an HTTP menu request requesting menu data.
[0013] In some embodiments, in response to the HTTP menu request, retrieving menu data from the database and using the menu data as feedback data for the HTTP menu request includes: in response to an HTTP menu request sent by a browser, retrieving full menu data or partial menu data from the database and using it as feedback data for the HTTP menu request.
[0014] In some embodiments, in response to the HTTP menu request, menu data is retrieved from the database, and the menu data is used as feedback data for the HTTP menu request. This includes: in response to the first HTTP menu request sent after the browser logs into the management system, retrieving menu data and the user's access popularity value for each menu page in the full menu data from the database; determining a target menu data branch whose access popularity value reaches a first preset condition based on the access popularity value of each menu page; and using the data of the target menu data branch as feedback data for the HTTP menu request.
[0015] In some embodiments, using the data of the target menu data branch as feedback data for the HTTP menu request includes: determining whether each menu page on the target menu data branch meets a second preset condition based on the access popularity value of each menu page; using the menu page with the longest access path that meets the second preset condition as the access depth of the target menu data branch; and using the menu data on the access path of the access depth on the target menu data branch as feedback data for the HTTP menu request.
[0016] In some embodiments, in response to the HTTP menu request, retrieving menu data from a database and using the menu data as feedback data for the HTTP menu request includes: in response to the HTTP menu request, determining the width and depth of the menu accessed by the user, wherein the width is each menu data branch whose access popularity value reaches a first preset condition, and the depth is the furthest menu page on a menu data branch whose access popularity value reaches a second preset condition; determining the width and depth of a menu that matches the cache space size based on the cache space size carried in the HTTP menu request; and using the width and depth of the matching menu as feedback data for the HTTP menu request.
[0017] In some embodiments, in response to the HTTP menu request, menu data is retrieved from the database and the menu data is used as feedback data for the HTTP menu request, including: in response to the first HTTP menu request sent by the browser after not logging into the management system, the first HTTP menu request sent after not logging into the management system includes an identifier of the menu data branch; and the data of the menu data branch corresponding to the identifier is used as feedback data for the HTTP menu request.
[0018] A third aspect of this specification provides a data processing apparatus for a management system, comprising: a reading unit for a browser to read target state information from a data warehouse; and a first processing unit for, when the target state information is not in a predetermined state, for the browser to call a backend interface in the data warehouse to send an HTTP menu request to a server; the HTTP menu request is used to enable the server to retrieve menu data from a database and to use the menu data as feedback data for the HTTP menu request; the browser calls the backend interface in the data warehouse to store the menu data fed back by the server in the browser's cache, and calls the backend interface in the data warehouse to modify the target state information in the data warehouse to a predetermined state. The second processing unit is configured to, when the target state information is in a predetermined state, have the browser call the front-end interface in the data warehouse in real time to obtain the cached menu data, and render the real-time display page of the management system based on the menu data; the first receiving unit is configured to receive a change notification sent by the server; the change notification is sent to the browser in response to a change in the menu data in the database; the sending unit is configured to, in response to the change notification, call the back-end interface in the data warehouse to send an HTTP menu request to the server to request menu data; and the modification unit is configured to, based on the feedback data of the HTTP menu request, call the back-end interface in the data warehouse to modify the menu data stored in the browser cache.
[0019] In some embodiments, the apparatus further includes: a first calling unit, configured to, after logging into the management system, call the backend interface in the data warehouse to send an HTTP menu request to the server for the first time to request menu data; a second receiving unit, configured to receive the menu data fed back by the server in response to the HTTP menu request; and a third processing unit, configured to, after the browser calls the backend interface in the data warehouse to store the menu data fed back by the server in the browser cache, and call the backend interface in the data warehouse to modify the target state information in the data warehouse to a predetermined state.
[0020] In some embodiments, the menu data sent by the server in response to an HTTP menu request from the browser is either full menu data or partial menu data; when the menu data sent by the server in response to an HTTP menu request from the browser is partial menu data, the apparatus further includes: a splicing unit, used by the browser to splice the partial menu data with cached partial menu data; correspondingly, the browser renders the real-time display page of the management system based on the spliced menu data.
[0021] In some embodiments, the HTTP menu request includes the size of the available cache space; the size of the available cache space is used by the server to determine the width and / or depth of the menu sent to the browser.
[0022] In some embodiments, the apparatus further includes: a deletion unit, configured to delete menu data branches with low access popularity values from cached menu data when there is insufficient cache space; the menu data sent by the server in response to the HTTP menu request sent by the browser consists of menu data branches and access popularity values corresponding to each menu data.
[0023] In some embodiments, the data warehouse is Vuex; the Vuex data warehouse is created as follows: a state object (state), action objects (actions), and mutation objects (mutations) are created; a data storage variable is set in the state object (state), which is used to store menu data and represent target state information; a first backend interface is set in the action objects (actions), which is used to send an HTTP menu request to the server to request menu data and receive feedback data from the server; a second backend interface is set in the mutation objects (mutations), which is used to change the data stored in the data storage variable; and data retrieval interfaces (getters) are set in the data warehouse, which are used by the frontend to retrieve data stored in the browser cache. The browser retrieves menu data; correspondingly, it reads target state information from the data warehouse, including: the browser calls the data retrieval interface getters to obtain the values of data storage variables in the state object state; the browser calls the backend interface in the data warehouse to send an HTTP menu request to the server, including: the browser calls the first backend interface to request menu data from the server, and calls the second backend interface to modify the values of data storage variables in the behavior object based on the returned data from the first backend interface; the browser calls the frontend interface in the data warehouse in real time to retrieve cached menu data, and renders the real-time display page of the management system based on the menu data, including: the browser calls the data retrieval interface getters in real time to obtain the values of data storage variables in the behavior object state, and renders the real-time display page of the management system based on the values.
[0024] In some embodiments, the apparatus further includes: a second invocation unit, configured to, when a user logs out of the management system, have the browser invoke a second backend interface in the update object mutations to set the data storage variable to null.
[0025] A fourth aspect of this specification provides a data processing apparatus for a management system, comprising: a third receiving unit for receiving an HTTP menu request sent by a user client, the HTTP menu request being used to obtain menu data; a feedback unit for responding to the HTTP menu request, obtaining menu data from a database, and using the menu data as feedback data for the HTTP menu request; a monitoring unit for monitoring data changes in the database; a determining unit for determining the target user identifier involved in the data change when a data change occurs in the database; and a notification unit for sending a change notification to the browser logged in by the target user identifier, the change notification being used to cause the target user client to send an HTTP menu request requesting menu data.
[0026] In some embodiments, the feedback unit includes: a first feedback subunit, configured to, in response to an HTTP menu request sent by a browser, retrieve full menu data or partial menu data from a database and use it as feedback data for the HTTP menu request.
[0027] In some embodiments, the feedback unit includes: an acquisition subunit, configured to acquire menu data and user access popularity values for each menu page in the full menu data from the database in response to the first HTTP menu request sent after the browser logs into the management system; a first determination subunit, configured to determine a target menu data branch whose access popularity value reaches a first preset condition based on the access popularity value of each menu page; and a second determination subunit, configured to use the data of the target menu data branch as feedback data for the HTTP menu request.
[0028] In some embodiments, the second determining subunit includes: a third determining subunit, configured to determine whether each menu page on the target menu data branch meets a second preset condition based on the access popularity value of each menu page, and to take the menu page with the longest access path that meets the second preset condition as the access depth of the target menu data branch; and a fourth determining subunit, configured to take each menu data on the access path of the access depth on the target menu data branch as the feedback data of the HTTP menu request.
[0029] In some embodiments, the feedback unit includes: a fifth determining subunit, configured to, in response to the HTTP menu request, determine the width and depth of the menu accessed by the user, wherein the width is each menu data branch whose access popularity value reaches a first preset condition, and the depth is the furthest menu page on a menu data branch whose access popularity value reaches a second preset condition; a sixth determining subunit, configured to, based on the cache space size carried in the HTTP menu request, determine the width and depth of the menu that match the cache space size; and a seventh determining subunit, configured to, use the width and depth of the matching menu as feedback data for the HTTP menu request.
[0030] In some embodiments, the feedback unit includes: a second feedback subunit, configured to respond to the first HTTP menu request sent by the browser after not logging into the management system, and to use the data of the menu data branch corresponding to the identifier as feedback data of the HTTP menu request; wherein the first HTTP menu request sent after not logging into the management system includes the identifier of the menu data branch.
[0031] This specification provides a fifth aspect of an electronic device, comprising: a memory and a processor, wherein the processor and the memory are communicatively connected to each other, the memory stores computer instructions, and the processor executes the computer instructions to implement the data processing method of the management system described in any of the first or second aspects.
[0032] A sixth aspect of this specification provides a computer storage medium storing computer program instructions, which, when executed, implement the steps of the data processing method of the management system described in any of the first or second aspects.
[0033] The seventh aspect of this specification provides a computer program product comprising a computer program that, when executed by a processor, implements the steps of the data processing method of the management system described in any of the first or second aspects.
[0034] The data processing method, apparatus, and electronic equipment of the management system provided in this manual involve setting up a data warehouse on the browser and storing menu data in the browser cache through the data warehouse. When the browser needs to access the menu page, it does not immediately generate an HTTP menu request to request menu data from the server. Instead, it reads the target status information in the data warehouse and determines whether to generate an HTTP menu request to request menu data from the server based on the target status information. When the menu data stored in the database changes, the server sends a notification to the browser, and the browser responds to the notification by sending an HTTP menu request to the server to request the latest menu data. This solution can directly retrieve menu data from the browser cache, quickly respond to menu data retrieval requests, and thus make the browser's page menu display faster. This solution can also reduce the number of HTTP menu requests sent by the browser to the server, reduce the occupation of server resources, and allow the server to have more resources to respond to the browser's HTTP menu requests. This allows the server to respond quickly to the browser's HTTP menu requests, and the browser to obtain menu data instantly, thus making the browser's page menu display faster. This solution can promptly update the menu data cached on the browser when the menu data stored in the database changes, preventing users from experiencing a poor experience due to outdated menu data. Attached Figure Description
[0035] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in this application. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.
[0036] Figure 1 This is a schematic diagram of a data processing method for the management system provided in this specification.
[0037] Figure 2 This is another schematic diagram illustrating the data processing method of the management system provided in this specification;
[0038] Figure 3 A schematic diagram of the menu data;
[0039] Figure 4 A diagram illustrating the methods for creating a data warehouse;
[0040] Figure 5 This is a schematic diagram of a data warehouse;
[0041] Figure 6 This is yet another schematic diagram of the data processing method of the management system provided in this specification;
[0042] Figure 7 This is a schematic diagram illustrating the interaction between the two ends of the data processing method of the management system provided in this specification.
[0043] Figure 8 This is yet another schematic diagram of the data processing method of the management system provided in this specification;
[0044] Figure 9 This is yet another schematic diagram of the data processing method of the management system provided in this specification;
[0045] Figure 10 This is yet another schematic diagram of the data processing method of the management system provided in this specification;
[0046] Figure 11 This is yet another schematic diagram of the data processing method of the management system provided in this specification;
[0047] Figure 12 A schematic diagram of a data processing device for the management system provided in this specification;
[0048] Figure 13 Another schematic diagram of the data processing device for the management system provided in this specification;
[0049] Figure 14 This is a schematic diagram of the electronic device provided in this specification. Detailed Implementation
[0050] To enable those skilled in the art to better understand the technical solutions in this application, the technical solutions in the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of this application.
[0051] It should be noted that the information and data related to users involved in the embodiments of this specification are all information and data authorized by the user or fully authorized by the relevant parties. Furthermore, the collection, storage, use, processing, transmission, provision, disclosure, and application of the relevant data all comply with relevant laws, regulations, and standards, and necessary confidentiality measures have been taken. They do not violate public order and good morals, and corresponding operation entry points are provided for users or relevant parties to choose to authorize or refuse.
[0052] It should also be noted that in the embodiments of this specification, certain software, components, models and other existing solutions in the industry may be mentioned. These should be regarded as exemplary and are only intended to illustrate the feasibility of implementing the technical solution of this application. However, it does not mean that the applicant has used or necessarily used the solution.
[0053] Large-scale management systems typically have a large amount of system menu data, which is used to display the pages of multiple business nodes within the management system.
[0054] The typical process for displaying a business node's page involves the client sending an HTTP menu request to the management system's server to retrieve the management system's menu data. In response to this request, the server sends the management system's menu data back to the client via HTTP over the network.
[0055] The inventors discovered that the implementation of these business node display pages all call backend interfaces to retrieve menu data. Typically, large management systems are developed and maintained collaboratively by multiple developers. The development work for multiple business nodes may be assigned to multiple developers for parallel development or maintenance, and each developer usually writes their own independent backend interface code to call menu data. After multiple developers and maintainers, the management system will have multiple backend interfaces retrieving menu data. However, the menu data volume of large management systems is substantial, and retrieving menu data via HTTP menu requests consumes excessive network resources. Multiple backend interfaces continuously retrieving menu data via HTTP menu requests continuously consume network resources and also consume significant server resources. These factors contribute to the slow display of page menus in large management systems during use.
[0056] Based on the above analysis, this specification provides a data processing method for a management system. After the management system obtains menu data for the first time through an HTTP menu request, the method stores the menu data in the front end. In subsequent responses to HTTP menu requests from various business nodes to obtain menu data, the method directly retrieves the pre-stored menu data from the front end.
[0057] Management systems typically display numerous page menus. Page menus are options or links provided to users within a management system for navigation and operation. Users can use these options or links to quickly access different parts of the management system or perform specific actions. Information for each page menu is stored in a database. When a browser requests menu data from the server, the server retrieves information about all page menus accessible to the user based on their permissions from the database and sends this information back to the browser as menu data. The browser then uses this menu data to determine what content to display after a user performs an action.
[0058] The front-end consists of browser components related to user interaction. These components capture user actions and store display resources on the server based on those actions, so that the browser can then present these resources to the user. The menu data retrieval request mentioned above refers to the display resources stored on the server by user-interaction-related components based on the user's actions.
[0059] like Figure 1 As shown, the data processing method of this management system includes S11 to S13 as follows. This method can be used on a user client, which can be a physical device such as a computer, tablet, or mobile terminal. A browser runs on these physical devices, and the user uses the management system through the browser.
[0060] S11: The browser reads the target state information from the data warehouse.
[0061] This step can be performed in response to options or links displayed on a user operation management system page, or it can be performed in response to the arrival of the rendering time.
[0062] The data warehouse includes the definitions of data variables, front-end interfaces, and back-end interfaces. The data variables are defined as menu data. The front-end interface is used to retrieve menu data, and the back-end interface is used to retrieve menu data from the server and assign it to the data variables. The front-end interface cannot modify the menu data, while the back-end interface can modify it.
[0063] By setting up a data warehouse, developers and maintenance personnel can easily configure the transfer of data from the backend to the frontend. Besides menu data transfer, data warehouses can also be used for other types of data transfer. When there are many types of data that need to be transferred between the backend and frontend, setting up a data warehouse can greatly simplify the logic, coding complexity, and workload of these data transfers.
[0064] The HTML files used to render web pages are typically editable by users in their browsers. For example, after opening a webpage, a user can right-click the page and select "View Page Source" to open the source code view. In this view, the user can directly edit the HTML code and then refresh the page to see the effect. The aforementioned front-end interfaces can be directly called by the browser's HTML file, while back-end interfaces cannot. Therefore, even if a user modifies the HTML file, they cannot modify the menu data stored in the data warehouse. This ensures that the page content accessible to the user will not be reduced, and users cannot add webpages they cannot access. In other words, by setting front-end and back-end interfaces, the accuracy and reliability of user access permissions can be guaranteed.
[0065] The target status information includes a scheduled status and a non-scheduled status. A scheduled status means that the browser has cached the menu data, while a non-scheduled status means that the browser has not cached the menu data.
[0066] S12: If the target state information is not in a predetermined state, the browser calls the backend interface in the data warehouse to send an HTTP menu request to the server; the HTTP menu request is used to enable the server to retrieve menu data from the database and use the menu data as feedback data of the HTTP menu request; the browser calls the backend interface in the data warehouse to store the menu data fed back by the server in the browser's cache, and calls the backend interface in the data warehouse to modify the target state information in the data warehouse to the predetermined state.
[0067] A diagram illustrating the relationship between browsers, servers, and databases is shown below. Figure 2 As shown.
[0068] Storing menu data in the browser's cache can improve the efficiency of the front end in retrieving menu data.
[0069] In response to an HTTP menu request from the browser, the server can send back the full menu data at once. The browser caches this full menu data and clears the cache when the browser logs out. Sending back the full menu data at once can significantly reduce the number of menu requests.
[0070] The full menu data described in this specification refers to all menu data that the user has access to; the partial menu data described in this specification refers to a portion of the full menu data. The partial menu data is less than the full menu data.
[0071] In response to an HTTP menu request sent by the browser, the server can also send back a portion of the menu data at once. The browser caches this portion of the menu data, and when it requests menu page information that is not in the cached menu, it sends an HTTP menu request to the server to request the new menu data.
[0072] S13: When the target state information is in a predetermined state, the browser calls the front-end interface in the data warehouse to obtain the menu data in the cache, and renders the display page of the management system in real time based on the menu data.
[0073] The steps S11 to S13 mentioned above can be steps executed in the background of the browser. In other words, users cannot modify the steps S11 to S13 by modifying the HTML file of the webpage.
[0074] When using a data warehouse to cache menu data in the browser cache, if changes in the data stored in the database cause changes to the page menus accessible to the user, the browser cannot update the menu data in a timely manner. To address this, this solution further specifies the following steps S14, S15, and S16.
[0075] S14: Receive a change notification sent by the server; the change notification is sent to the browser in response to changes in the menu data in the database.
[0076] The server can monitor changes in the database. When menu data or user permission data in the database changes, the server can identify the set of users whose access to the page menu has changed and proactively send the latest menu data to these users.
[0077] S15: In response to the change notification, call the backend interface in the data warehouse to send an HTTP menu request to the server to request menu data.
[0078] In response to the HTTP menu request, the server retrieves menu data from the database and uses the menu data as feedback data for the HTTP menu request.
[0079] S16: Based on the feedback data of the HTTP menu request, call the backend interface in the data warehouse to modify the menu data stored in the browser cache.
[0080] If the server's feedback data is the changed data in the database, then S16 can only call the backend interface to modify a portion of the data in the browser cache. The server only responding with the changed data from the database reduces the amount of data transferred between the server and the browser, thus reducing the consumption of server resources.
[0081] If the server's feedback data is the full menu data from the database, then S16 can call the backend interface to overwrite the data in the browser cache with the server's feedback data. In this case, only one backend interface needs to be set up in the data warehouse to send HTTP menu requests to the server, reducing the coding complexity of the management system.
[0082] Through the steps S14, S15, and S16 described above, changes in the database can drive the browser to resend the HTTP menu request to the server to request menu data, thus enabling the browser to obtain the latest menu data in a timely manner and present it to the user.
[0083] The data processing method of the aforementioned management system involves setting up a data warehouse on the browser and storing menu data in the browser cache. When the browser needs to access the menu page, it does not immediately generate an HTTP menu request to request menu data from the server. Instead, it reads the target state information from the data warehouse and determines whether to generate an HTTP menu request to request menu data from the server based on the target state information. If the menu data stored in the database changes, the server sends a notification to the browser, and the browser responds by sending an HTTP menu request to the server to request the latest menu data. This solution can directly retrieve menu data from the browser cache, quickly responding to menu data retrieval requests, thus making the browser's page menu display faster. This solution also reduces the number of HTTP menu requests sent by the browser to the server, reducing the consumption of server resources, allowing the server to have more resources to respond to the browser's HTTP menu requests. This enables the server to respond quickly to the browser's HTTP menu requests, and the browser to obtain menu data instantly, thus making the browser's page menu display faster. This solution can promptly update the menu data cached on the browser when the menu data stored in the database changes, preventing a poor user experience due to outdated menu data.
[0084] Existing technologies already include embodiments for caching menu data in the browser. However, the typical implementation involves the browser sending an HTTP menu request to the server to request menu data. The server then retrieves the menu data from the database, sends it back to the browser, and sets a validity period for the menu data. The browser stores the menu data locally, and after the validity period expires, the browser resends an HTTP menu request to the server to request the menu data.
[0085] Existing technologies already include implementations of data caching using data warehouses; however, these technologies typically store data on a server. According to existing technologies, when a user interacts with a browser page and generates a menu data retrieval request, the browser sends an HTTP menu request to the server. The server retrieves the menu data from the database and sends it back to the browser as feedback data for the HTTP menu request. The browser then determines the page resources to display based on the menu data. In this approach, the browser still needs to frequently send HTTP menu requests to the server, consuming significant server resources, thus still exhibiting the technical problem that this solution aims to address.
[0086] Due to factors such as system function expansion, optimization, and permission changes, the data stored in the database may change during user access to the system, thus affecting the page menus accessible to users. To address menu changes caused by system function expansion or optimization, current technology typically involves updating the database and restarting the server at a certain time, resulting in a period of system unavailability. However, if the menu changes are due to changes in user permissions, current technology allows browsers to frequently or periodically send HTTP menu requests to the server to obtain menu data. Therefore, existing technology can ensure that the browser updates the displayed menu information promptly after the database updates the menu.
[0087] In some embodiments, the data processing method of the management system further includes the following steps S14, S15, and S16.
[0088] S14: After logging into the management system, the browser calls the backend interface in the data warehouse to send an HTTP menu request to the server for the first time to request menu data.
[0089] In response to the HTTP menu request, the server retrieves menu data from the database and uses the menu data as feedback data for the HTTP menu request.
[0090] S15: Receive menu data from the server in response to the HTTP menu request.
[0091] S16: The browser calls the backend interface in the data warehouse to store the menu data fed back by the server in the browser cache, and calls the backend interface in the data warehouse to modify the target state information in the data warehouse to the predetermined state.
[0092] S14 to S16 above stipulate that the menu data initially cached in the browser cache can be obtained in response to the first request to the server after logging into the management system.
[0093] In addition to the methods described in S14 to S16 above, the menu data initially cached in the browser cache can also be obtained through other means.
[0094] In some embodiments, the menu data sent by the server in response to an HTTP menu request from the browser is partial menu data, and the browser concatenates this partial menu data with already cached partial menu data. For example, Figure 3This is a diagram illustrating menu data. Each identifier in this tree structure represents a menu item, and each menu item corresponds to a link (i.e., a page) in the management system. A, B, C, and D are the four menu pages accessible immediately after login. Clicking the link under page A leads to pages A1, A2, and A3; clicking the link under page A1 leads to pages A11, A12, and A13, and so on. Figure 3 The menu data is shown below. After the browser logs into the management system, the server can first return the menu data for menu data branch A (i.e., the content in the dotted box above). If the user visits page B while using the management system, they can resend an HTTP menu request to the server to request menu data, and the server can return the menu data for menu data branch B (i.e., the content in the dotted box below). The browser can then combine the contents of the two dotted boxes to obtain a larger menu data. Accordingly, the browser renders the real-time display page of the management system based on the combined menu data.
[0095] In some embodiments, the HTTP menu request includes the size of available cache space; the size of the available cache space is used by the server to determine the width and / or depth of the menu sent to the browser. The width of the menu sent to the browser can be determined based on the number of links under the menu page the browser is currently accessing. For example, if the currently accessed menu page is the homepage, then based on... Figure 3 The menu shown can send a width of 3 to the browser. The depth of the menu sent to the browser can be determined based on the number of clickable links on the currently accessed page, for example, according to... Figure 3 The menu shown has a depth of 3 for menu data branch A, a depth of 2 for menu data branch C, a depth of 2 for menu data A3, and a depth of 3 for menu data A31.
[0096] The server can pre-configure the correspondence between the available cache space size and the width and depth of the menu. Based on the available cache space size and the page the browser is currently accessing (the HTTP menu request also includes the identifier of the page the browser is currently accessing), the server determines which menu data branches or segments to send. Alternatively, it can calculate menu data branches or segments that match the available cache space size using a preset algorithm. For example, after logging into the management system, if the available cache space is large, the entire menu data can be sent to the browser; if the available cache space is small, only a portion of the menu data branches can be sent, for example, only the menu data branches within the dotted box above. If a menu data branch is deep, only a portion of the menu data segments on that branch can be sent. For example, if the currently accessed page is A3, only menu data A3 and its branches A31 and A32 can be sent; if the currently accessed page is A, only menu data A and its branches A1, A2, and A3 can be sent, or menu data A1 can be omitted.
[0097] In some embodiments, the menu data sent by the server in response to an HTTP menu request from the browser consists of menu data branches and a corresponding access popularity value for each menu data segment. If cache space is insufficient, the browser may delete menu data branches with lower access popularity values from the cached menu data. The access popularity value can specifically be the user's historical access frequency or the access frequency within a recently predetermined time period.
[0098] In some embodiments, such as Figure 4 As shown, the data warehouse is Vuex, and the Vuex data warehouse can be created by the methods described in S01 to S05 below.
[0099] S01: Create state objects (state), actions objects (actions), and mutation objects (mutations).
[0100] S02: Set a data storage variable in the state object state. The data storage variable is used to store menu data and represent target state information.
[0101] S03: Set a first backend interface in the action object actions. The first backend interface is used to send an HTTP menu request to the server to request menu data and receive feedback data from the server.
[0102] S04: Set a second backend interface in the update object mutations, the second backend interface being used to change the data stored in the data storage variable.
[0103] S05: Set the data acquisition interface getters for the data warehouse. The data acquisition interface getters are used by the front end to obtain menu data stored in the browser cache.
[0104] like Figure 5 As shown, a `menuData` variable is created within the `state` object to represent the target state information and store the menu data. This `menuData` variable is the data storage variable. The data in the `menuData` variable is stored in the browser's cache. The initial value of the `menuData` variable is null. After the browser requests the menu data, it stores the menu data in the `menuData` variable, thus storing it in the browser cache. A `menuData` variable value of null corresponds to a non-predetermined target state, while a non-null value corresponds to a predetermined target state.
[0105] In the `actions` object, an asynchronous method `actMenuData` is set to send an HTTP menu request to the server to retrieve menu data and receive feedback data from the server. This asynchronous method `actMenuData` is the first backend interface mentioned above.
[0106] In the mutations object, a method muMenuData is set to change the value of the menuData variable in the state object, that is, to modify the menu data.
[0107] You can set the time interval for page rendering. Whenever the time interval is reached, the system's page will be rendered based on the value of the data storage variable menuData in the state object. This process can be used for real-time calling and real-time rendering.
[0108] When the browser logs into the management system, the first rendering occurs. The browser calls the data retrieval interface getters to obtain the value of the data storage variable menuData in the state object state, and the result is null. In this case, the browser calls the first backend interface actMenuData in the actions object to send an HTTP menu request to the server to request menu data and receives the server's response data. Then, based on the returned data obtained from the first backend interface actMenuData, the browser calls the second backend interface muMenuData in the mutations update object to change the value of the data storage variable menuData in the state object state.
[0109] When the next rendering time arrives, if the value of the data storage variable menuData in the state object is not null, the browser will directly call the data retrieval interface getters to obtain the value of the data storage variable in the behavior object state, and render the real-time display page of the management system based on these values.
[0110] When a user logs out of the management system, the browser calls the second backend interface in the `mutations` update object to set the data storage variable to null. Therefore, the browser will no longer display the management system page, and it will be impossible to make the browser display the management system page by modifying the page's HTML file.
[0111] This specification also provides a data processing method for a management system, which can be used to manage the system's server. The server communicates with the aforementioned user client, and the user accesses the management system through a browser running on the user client. Figure 6 and Figure 7 As shown, the method includes the following steps S21 to S25.
[0112] S21: Receive an HTTP menu request sent by the user client, the HTTP menu request being used to obtain menu data.
[0113] S22: In response to the HTTP menu request, retrieve menu data from the database and use the menu data as feedback data for the HTTP menu request.
[0114] In response to an HTTP menu request sent by the browser, S22 can retrieve the full menu data or a portion of the menu data from the database and use it as feedback data for the HTTP menu request.
[0115] S23: Monitor data changes in the database.
[0116] S24: In the event of data changes in the database, identify the target user involved in the data changes.
[0117] Because management systems typically have a large number of users and complex user permissions, their databases usually contain three tables: a menu table, a permissions table, and a permissions-menu mapping table. The menu table records the identifiers of all menu data within the management system; the permissions table records the permission identifiers corresponding to user identifiers; and the permissions-menu mapping table records the correspondence between permission identifiers and menu data identifiers. Modification or deletion of data in these three tables may change user permissions, requiring the server to determine the identifier of the target user corresponding to the modified or deleted data.
[0118] S25: Send a change notification to the browser of the target user who is logged in; the change notification is used to enable the target user client to send an HTTP menu request for menu data.
[0119] If the target user whose data is modified or deleted is logged in, the menu data may already be cached on the user's browser. If the cached data is not updated, it will lead to inconsistencies between the menu data and the database. Therefore, the server can proactively send a change notification to the browser used by the logged-in target user to access the management system.
[0120] After receiving the change notification, the user's browser responds by calling the backend interface in the data warehouse to send an HTTP menu request to the server to request menu data. Then, based on the feedback data from the HTTP menu request, the browser calls the backend interface in the data warehouse to modify the menu data stored in the browser cache.
[0121] In response to an HTTP menu request sent by the browser, the system retrieves full or partial menu data from the database and uses it as feedback data for the HTTP menu request.
[0122] In some embodiments, such as Figure 8 As shown, S22 may include the following S221 to S223.
[0123] S221: In response to the first HTTP menu request sent after the browser logs into the management system, retrieve menu data from the database and the user's access popularity value for each menu page in the full menu data.
[0124] The access popularity value can be the user's historical access frequency or the access frequency within the most recent scheduled time period.
[0125] S222: Determine the target menu data branch whose access popularity reaches the first preset condition based on the access popularity value of each menu page.
[0126] Menu data branches refer to the access paths corresponding to the various menu pages accessible after logging into the management system. For example, Figure 3 The menu shown has four menu data branches: A, B, C, and D. The target menu data branch is one of these branches.
[0127] The target menu data branch whose access popularity reaches the first preset condition can be the menu data branch where the access popularity value reaches the preset threshold; it can also be the menu data branch where the top N (N is a positive integer) menu data with the highest access popularity value are located; it can also be the menu data branch where the total access volume of multiple menu data on the menu data branch reaches the preset popularity value; or it can be a menu data branch composed of menu data in other situations, which will not be listed one by one in this manual.
[0128] S223: Use the data of the target menu data branch as feedback data for the HTTP menu request.
[0129] Through steps S221 to S223 described above, after the browser sends its first HTTP menu request after logging into the management system, the server can send the browser menu data branches with high user access frequency, instead of sending the full menu data. When the management system has a large amount of menu data, this approach reduces the amount of menu data the server sends to the browser, thus reducing the browser's caching pressure.
[0130] For example, when user M uses a bank's management system, they typically only use the "loan" function. Therefore, after logging into the bank's management system, the server can send only the menu data related to the loan function to the browser. If the server sends menu data for other functions (such as fund or precious metal purchases), these functions are rarely used, and caching this menu data on the browser side would be wasteful of cache space.
[0131] In some embodiments, such as Figure 9 As shown, S223 may include S2231 and S2232 as follows.
[0132] S2231: Determine whether each menu page on the target menu data branch meets the second preset condition based on the access popularity value of each menu page, and take the menu page with the longest access path that meets the second preset condition as the access depth of the target menu data branch.
[0133] The target menu data branch can be any of the selectable menu data branches after logging into the management system, or it can be the menu data branch of the page the user is currently visiting.
[0134] S2232: Use the menu data on the access path of the access depth on the target menu data branch as the feedback data of the HTTP menu request.
[0135] The second preset condition for a menu page to meet the following conditions can be: the access popularity value of the menu page reaches a preset threshold; the menu page is among the top N (N is a positive integer) in terms of access popularity value; or it can be a menu data branch composed of other types of menu data, which will not be listed in this manual.
[0136] by Figure 3 Taking the menu shown as an example, if menu data B, B1, and B11 all meet the second preset condition, then the access depth is B11, and menu data B, B1, and B11 can be returned; if only menu data B and B1 meet the second preset condition, while B11 does not meet the second preset condition, then menu data B and B1 can be returned.
[0137] Through steps S2231 to S2232 above, after the browser sends its first HTTP menu request after logging into the management system, the server can send the browser a "segment" of menu data consisting of some menu items with high user engagement, instead of sending the full menu data or the entire menu data branch. For management systems with large amounts of menu data, especially long menu data branches, this approach reduces the amount of menu data the server sends to the browser, thus lowering the browser's cache load.
[0138] In some embodiments, such as Figure 10 As shown, S22 may include the following S224 to S226.
[0139] S224: In response to the HTTP menu request, determine the width and depth of the menu accessed by the user, wherein the width is the menu data branches whose access popularity value reaches the first preset condition, and the depth is the menu page with the longest access path among the menu pages whose access popularity value reaches the second preset condition on a menu data branch.
[0140] The menu data branches whose access popularity reaches the first preset condition can be: menu data branches containing menu data whose access popularity value reaches the preset threshold; menu data branches containing the top N (N is a positive integer) menu data with the highest access popularity value; menu data branches where the total access volume of multiple menu data on a menu data branch reaches the preset popularity value; or menu data branches composed of menu data in other situations, which will not be listed in this manual.
[0141] The second preset condition for a menu page to meet the following conditions can be: the access popularity value of the menu page reaches a preset threshold; the menu page is among the top N (N is a positive integer) in terms of access popularity value; or it can be a menu data branch composed of other types of menu data, which will not be listed in this manual.
[0142] S225: Determine the width and depth of the menu that match the cache space size based on the cache space size carried in the HTTP menu request.
[0143] S226: Use the width and depth of the matching menu as feedback data for the HTTP menu request.
[0144] The server can pre-configure the correspondence between the available cache space size and the width and depth of the menu. Based on the available cache space size and the page the browser is currently accessing (the HTTP menu request also includes the identifier of the page the browser is currently accessing), the server determines which menu data branches or segments to send. Alternatively, it can calculate menu data branches or segments that match the available cache space size using a preset algorithm. For example, after logging into the management system, if the available cache space is large, the entire menu data can be sent to the browser; if the available cache space is small, only a portion of the menu data branches can be sent, for example, only the menu data branches within the dotted box above. If a menu data branch is deep, only a portion of the menu data segments on that branch can be sent. For example, if the currently accessed page is A3, only menu data A3 and its branches A31 and A32 can be sent; if the currently accessed page is A, only menu data A and its branches A1, A2, and A3 can be sent, or menu data A1 can be omitted.
[0145] Through the above steps S224 to S226, it is possible to flexibly configure which menu data branches to be fed back. For each menu data branch, only a portion of it can be fed back. This allows for flexible feedback of multiple menu data branches to meet the diverse access needs of users, while also reducing the amount of menu data sent from the server to the browser and lowering the browser's cache pressure.
[0146] In some embodiments, such as Figure 11 As shown, S22 may include the following S227 and S228.
[0147] S227: In response to the first HTTP menu request sent by the browser after logging into the system without logging in, the first HTTP menu request sent after logging into the system without logging in includes the identifier of the menu data branch.
[0148] The identifier of a menu data branch can be used to indicate that a specific menu data branch includes the menu page that the user wants to access.
[0149] S228: Use the data of the menu data branch corresponding to the identifier as the feedback data of the HTTP menu request.
[0150] The server can directly send menu data from a specific menu data branch to the browser, or it can use the corresponding menu data branch as the target menu branch, employing either method to determine the menu data to be sent to the user. Figure 8 , Figure 9 , Figure 10 The method shown determines the menu data to be sent back to the browser.
[0151] For example, such as Figure 3 As shown, if the user is currently accessing page A3, the server can send the menu data branch corresponding to A3 to the browser, i.e., send menu data A31 and A32. Alternatively, the server can use A3 as the target menu branch and determine the menu data to be sent to the user using either of the methods described above.
[0152] The browser can combine the menu data branch returned by the server with the cached menu data. For a detailed description of the combination process, please refer to other parts of this manual.
[0153] This specification provides a data processing device for a management system, which can be used to implement... Figure 1 The data processing method of the management system shown. For example... Figure 12 As shown, the device includes a reading unit 11, a first processing unit 12, a second processing unit 13, a first receiving unit 14, a sending unit 15, and a modification unit 16.
[0154] The reading unit 11 is used by the browser to read target status information from the data warehouse.
[0155] The first processing unit 12 is used to, when the target state information is not in a predetermined state, have the browser call the backend interface in the data warehouse to send an HTTP menu request to the server; the HTTP menu request is used to enable the server to retrieve menu data from the database and use the menu data as feedback data of the HTTP menu request; the browser calls the backend interface in the data warehouse to store the menu data fed back by the server in the browser's cache, and calls the backend interface in the data warehouse to modify the target state information in the data warehouse to the predetermined state.
[0156] The second processing unit 13 is used to, when the target state information is in a predetermined state, call the front-end interface in the data warehouse in real time to obtain the menu data in the cache, and render the real-time display page of the management system based on the menu data.
[0157] The first receiving unit 14 is used to receive a change notification sent by the server; the change notification is sent to the browser in response to changes in the menu data in the database.
[0158] The sending unit 15 is used to respond to the change notification by calling the backend interface in the data warehouse to send an HTTP menu request to the server to request menu data.
[0159] The modification unit 16 is used to modify the menu data stored in the browser cache by calling the backend interface in the data warehouse based on the feedback data of the HTTP menu request.
[0160] In some embodiments, the apparatus further includes: a first calling unit, configured to, after logging into the management system, call the backend interface in the data warehouse to send an HTTP menu request to the server for the first time to request menu data; a second receiving unit, configured to receive the menu data fed back by the server in response to the HTTP menu request; and a third processing unit, configured to, after the browser calls the backend interface in the data warehouse to store the menu data fed back by the server in the browser cache, and call the backend interface in the data warehouse to modify the target state information in the data warehouse to a predetermined state.
[0161] In some embodiments, the menu data sent by the server in response to an HTTP menu request from the browser is either full menu data or partial menu data; when the menu data sent by the server in response to an HTTP menu request from the browser is partial menu data, the apparatus further includes: a splicing unit, used by the browser to splice the partial menu data with cached partial menu data; correspondingly, the browser renders the real-time display page of the management system based on the spliced menu data.
[0162] In some embodiments, the HTTP menu request includes the size of the available cache space; the size of the available cache space is used by the server to determine the width and / or depth of the menu sent to the browser.
[0163] In some embodiments, the apparatus further includes: a deletion unit, configured to delete menu data branches with low access popularity values from cached menu data when there is insufficient cache space; the menu data sent by the server in response to the HTTP menu request sent by the browser consists of menu data branches and access popularity values corresponding to each menu data.
[0164] In some embodiments, the data warehouse is Vuex; the Vuex data warehouse is created as follows: a state object (state), action objects (actions), and mutation objects (mutations) are created; a data storage variable is set in the state object (state), which is used to store menu data and represent target state information; a first backend interface is set in the action objects (actions), which is used to send an HTTP menu request to the server to request menu data and receive feedback data from the server; a second backend interface is set in the mutation objects (mutations), which is used to change the data stored in the data storage variable; and data retrieval interfaces (getters) are set in the data warehouse, which are used by the frontend to retrieve data stored in the browser cache. The browser retrieves menu data; correspondingly, it reads target state information from the data warehouse, including: the browser calls the data retrieval interface getters to obtain the values of data storage variables in the state object state; the browser calls the backend interface in the data warehouse to send an HTTP menu request to the server, including: the browser calls the first backend interface to request menu data from the server, and calls the second backend interface to modify the values of data storage variables in the behavior object based on the returned data from the first backend interface; the browser calls the frontend interface in the data warehouse in real time to retrieve cached menu data, and renders the real-time display page of the management system based on the menu data, including: the browser calls the data retrieval interface getters in real time to obtain the values of data storage variables in the behavior object state, and renders the real-time display page of the management system based on the values.
[0165] In some embodiments, the apparatus further includes: a second invocation unit, configured to, when a user logs out of the management system, have the browser invoke a second backend interface in the update object mutations to set the data storage variable to null.
[0166] This specification provides a data processing device for a management system, which can be used to implement... Figure 6 The data processing method of the management system shown. For example... Figure 13 As shown, the device includes a third receiving unit 21, a feedback unit 22, a monitoring unit 23, a determination unit 24, and a notification unit 25.
[0167] The third receiving unit 21 is used to receive an HTTP menu request sent by the user client, the HTTP menu request being used to obtain menu data.
[0168] Feedback unit 22 is used to respond to the HTTP menu request by retrieving menu data from the database and using the menu data as feedback data for the HTTP menu request.
[0169] Monitoring unit 23 is used to monitor data changes in the database.
[0170] The determining unit 24 is used to determine the target user identifier involved in the data change when data changes occur in the database.
[0171] The notification unit 25 is used to send a change notification to the browser of the target user who is logged in; the change notification is used to enable the target user client to send an HTTP menu request for menu data.
[0172] In some embodiments, the feedback unit includes: a first feedback subunit, configured to, in response to an HTTP menu request sent by a browser, retrieve full menu data or partial menu data from a database and use it as feedback data for the HTTP menu request.
[0173] In some embodiments, the feedback unit includes: an acquisition subunit, configured to acquire menu data and user access popularity values for each menu page in the full menu data from the database in response to the first HTTP menu request sent after the browser logs into the management system; a first determination subunit, configured to determine a target menu data branch whose access popularity value reaches a first preset condition based on the access popularity value of each menu page; and a second determination subunit, configured to use the data of the target menu data branch as feedback data for the HTTP menu request.
[0174] In some embodiments, the second determining subunit includes: a third determining subunit, configured to determine whether each menu page on the target menu data branch meets a second preset condition based on the access popularity value of each menu page, and to take the menu page with the longest access path that meets the second preset condition as the access depth of the target menu data branch; and a fourth determining subunit, configured to take each menu data on the access path of the access depth on the target menu data branch as the feedback data of the HTTP menu request.
[0175] In some embodiments, the feedback unit includes: a fifth determining subunit, configured to, in response to the HTTP menu request, determine the width and depth of the menu accessed by the user, wherein the width is each menu data branch whose access popularity value reaches a first preset condition, and the depth is the furthest menu page on a menu data branch whose access popularity value reaches a second preset condition; a sixth determining subunit, configured to, based on the cache space size carried in the HTTP menu request, determine the width and depth of the menu that match the cache space size; and a seventh determining subunit, configured to, use the width and depth of the matching menu as feedback data for the HTTP menu request.
[0176] In some embodiments, the feedback unit includes: a second feedback subunit, configured to respond to the first HTTP menu request sent by the browser after not logging into the management system, and to use the data of the menu data branch corresponding to the identifier as feedback data of the HTTP menu request; wherein the first HTTP menu request sent after not logging into the management system includes the identifier of the menu data branch.
[0177] The descriptions and functions of the above devices can be understood by referring to the data processing methods section of the management system, and will not be repeated here.
[0178] This invention also provides an electronic device, which can be either a user client running a browser or a server. Figure 14 As shown, the electronic device may include a processor 1401 and a memory 1402, wherein the processor 1401 and the memory 1402 may be connected via a bus or other means. Figure 14 Taking the example of a connection between China and Israel via a bus.
[0179] Processor 1401 may be a central processing unit (CPU). Processor 1401 may also be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, or combinations thereof.
[0180] Memory 1402, as a non-transitory computer-readable storage medium, can be used to store non-transitory software programs, non-transitory computer-executable programs, and modules, such as program instructions / modules corresponding to the data processing method of the management system in this embodiment of the invention (e.g., Figure 12The reading unit 11, the first processing unit 12, the second processing unit 13, the first receiving unit 14, the sending unit 15, and the modification unit 16 shown are, or Figure 13 The third receiving unit 21, feedback unit 22, monitoring unit 23, determination unit 24, and notification unit 25 shown in the diagram. The processor 1401 executes various functional applications and data processing by running non-transitory software programs, instructions, and modules stored in the memory 1402, thereby implementing the data processing method of the management system in the above method embodiment.
[0181] The memory 1402 may include a program storage area and a data storage area. The program storage area may store the operating system and applications required for at least one function; the data storage area may store data created by the processor 1401, etc. Furthermore, the memory 1402 may include high-speed random access memory and may also include non-transitory memory, such as at least one disk storage device, flash memory device, or other non-transitory solid-state storage device. In some embodiments, the memory 1402 may optionally include memory remotely located relative to the processor 1401, and these remote memories may be connected to the processor 1401 via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.
[0182] The one or more modules are stored in the memory 1402, and when executed by the processor 1401, they perform the following: Figure 1 or Figure 6 The data processing method of the management system in the illustrated embodiment.
[0183] The specific details of the above-mentioned electronic device can be understood by referring to the relevant descriptions and effects in the method embodiments, and will not be repeated here.
[0184] This specification also provides a computer storage medium storing computer program instructions, which, when executed, implement the steps of the data processing method of the above-described management system.
[0185] This specification also provides a computer program product comprising a computer program that, when executed by a processor, implements the steps of the data processing method of the above-described management system.
[0186] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The program can be stored in a computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. The storage medium can be a magnetic disk, optical disk, read-only memory (ROM), random access memory (RAM), flash memory, hard disk drive (HDD), or solid-state drive (SSD), etc.; the storage medium can also include combinations of the above types of memory.
[0187] The various embodiments in this specification are described in a progressive manner. For the same or similar parts between the various embodiments, please refer to each other. The focus of each embodiment is to describe the differences from other embodiments.
[0188] The systems, devices, modules, or units described in the above embodiments can be implemented by computer chips or entities, or by products with certain functions.
[0189] For ease of description, the above devices are described separately by function as various units. Of course, in implementing this application, the functions of each unit can be implemented in one or more software and / or hardware.
[0190] As can be seen from the above description of the embodiments, those skilled in the art can clearly understand that this application can be implemented by means of software plus necessary general-purpose hardware platforms. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute certain parts of the methods of various embodiments of this application.
[0191] This application can be used in a wide variety of general-purpose or special-purpose computer system environments or configurations. For example: personal computers, server computers, handheld or portable devices, tablet devices, multiprocessor systems, microprocessor-based systems, set-top boxes, programmable consumer electronics devices, network PCs, minicomputers, mainframe computers, distributed computing environments including any of the above systems or devices, etc.
[0192] This application can be described in the general context of computer-executable instructions, such as program modules, that are executed by a computer. Generally, program modules include routines, programs, objects, components, data structures, etc., that perform a specific task or implement a specific abstract data type. This application can also be practiced in distributed computing environments where tasks are performed by remote processing devices connected via a communication network. In distributed computing environments, program modules can reside in local and remote computer storage media, including storage devices.
[0193] Although this application has been described through embodiments, those skilled in the art will know that this application has many modifications and variations without departing from the spirit of this application, and it is intended that the appended claims cover such modifications and variations without departing from the spirit of this application.
Claims
1. A data processing method for a management system, characterized in that, include: The browser reads the target state information from the data warehouse; If the target state information is not in the predetermined state, the browser calls the backend interface in the data warehouse to send an HTTP menu request to the server; the HTTP menu request is used to enable the server to retrieve menu data from the database and use the menu data as the feedback data of the HTTP menu request; the browser calls the backend interface in the data warehouse to store the menu data fed back by the server in the browser's cache, and calls the backend interface in the data warehouse to modify the target state information in the data warehouse to the predetermined state. When the target state information is in a predetermined state, the browser calls the front-end interface in the data warehouse in real time to obtain the menu data in the cache, and renders the real-time display page of the management system based on the menu data; Receive change notifications sent by the server; the change notifications are sent to the browser in response to changes in menu data in the database; In response to the change notification, the backend interface in the data warehouse is invoked to send an HTTP menu request to the server to request menu data; Based on the feedback data from the HTTP menu request, the backend interface in the data warehouse is invoked to modify the menu data stored in the browser cache.
2. The method according to claim 1, characterized in that, The method further includes: After logging into the management system, the browser calls the backend interface in the data warehouse to send an HTTP menu request to the server for the first time to request menu data. Receive menu data from the server in response to the HTTP menu request; The browser calls the backend interface in the data warehouse to store the menu data fed back by the server in the browser cache, and calls the backend interface in the data warehouse to modify the target state information in the data warehouse to the predetermined state.
3. The method according to claim 1, characterized in that, The menu data sent by the server in response to the HTTP menu request sent by the browser may be the full menu data or a partial menu data; When the menu data sent by the server in response to the HTTP menu request sent by the browser is partial menu data, the method further includes: the browser concatenating the partial menu data with the already cached partial menu data; Accordingly, the browser renders the real-time display page of the management system based on the concatenated menu data.
4. The method according to claim 1, characterized in that, The HTTP menu request includes the size of the available cache space; the size of the available cache space is used by the server to determine the width and / or depth of the menu sent to the browser.
5. The method according to claim 1, characterized in that, The method further includes: If the cache space is insufficient, delete the menu data branches with low access popularity values from the cached menu data; the menu data sent by the server in response to the HTTP menu request sent by the browser consists of menu data branches and the access popularity values corresponding to each menu data.
6. The method according to claim 1, characterized in that, The data warehouse is Vuex; the Vuex data warehouse is created using the following methods: Create a state object (state), action objects (actions), and update objects (mutations); A data storage variable is set in the state object, which is used to store menu data and represent target state information; A first backend interface is set in the action object, which is used to send an HTTP menu request to the server to request menu data and receive feedback data from the server. In the update object mutations, a second backend interface is set up, which is used to change the data stored in the data storage variable; Set up data retrieval interface getters for the data warehouse, which are used by the front end to retrieve menu data stored in the browser cache; Accordingly, The browser reads target state information from the data warehouse, including: the browser calls the data acquisition interface getters to obtain the values of data storage variables in the state object state; The browser calls the backend interface in the data warehouse to send an HTTP menu request to the server, including: the browser calls the first backend interface to request menu data from the server, and calls the second backend interface to modify the value of the data storage variable in the behavior object based on the returned data of the first backend interface; The browser calls the front-end interface in the data warehouse in real time to obtain the cached menu data, and renders the real-time display page of the management system based on the menu data. This includes: the browser calls the data acquisition interface getters in real time to obtain the value of the data storage variable in the behavior object state, and renders the real-time display page of the management system based on the value.
7. The method according to claim 6, characterized in that, The method further includes: When a user logs out of the management system, the browser calls the second backend interface in the update object mutations to set the data storage variable to null.
8. A data processing method for a management system, characterized in that, include: Receive an HTTP menu request sent by a user client, the HTTP menu request being used to obtain menu data; The HTTP request is sent to the server by the browser after reading the target status information in the data warehouse and, if the target status information is not in the predetermined state, calling the backend interface in the data warehouse. In response to the HTTP menu request, menu data is retrieved from the database and used as feedback data for the HTTP menu request. The feedback data triggers the browser to call the backend interface in the data warehouse to store the menu data in the browser's cache, and calls the backend interface in the data warehouse to modify the target state information in the data warehouse to a predetermined state. This allows the browser to call the frontend interface in the data warehouse in real time to retrieve the cached menu data when the target state information in the data warehouse is in the predetermined state, and to render the real-time display page of the management system based on the menu data. Monitor data changes in the database; In the event of data changes in the database, identify the target user involved in the data changes; The browser of the target user who is logged in will be sent a change notification; the change notification is used to prompt the target user's client to send an HTTP menu request for menu data.
9. The method according to claim 8, characterized in that, In response to the HTTP menu request, menu data is retrieved from the database and used as feedback data for the HTTP menu request, including: In response to an HTTP menu request sent by the browser, the system retrieves full or partial menu data from the database and uses it as feedback data for the HTTP menu request.
10. The method according to claim 8, characterized in that, In response to the HTTP menu request, menu data is retrieved from the database and used as feedback data for the HTTP menu request, including: In response to the first HTTP menu request sent after the browser logs into the management system, retrieve menu data from the database and the user's access popularity value for each menu page in the full menu data; The target menu data branch whose access popularity value reaches the first preset condition is determined based on the access popularity value of each menu page; The data from the target menu data branch is used as feedback data for the HTTP menu request.
11. The method according to claim 10, characterized in that, The data from the target menu data branch is used as feedback data for the HTTP menu request, including: Based on the access popularity value of each menu page, determine whether each menu page on the target menu data branch meets the second preset condition, and take the menu page with the longest access path that meets the second preset condition as the access depth of the target menu data branch. The menu data on each access path at the access depth of the target menu data branch are used as the feedback data for the HTTP menu request.
12. The method according to claim 8, characterized in that, In response to the HTTP menu request, menu data is retrieved from the database and used as feedback data for the HTTP menu request, including: In response to the HTTP menu request, the width and depth of the menu accessed by the user are determined, wherein the width is the menu data branches whose access popularity value reaches the first preset condition, and the depth is the farthest menu page on a menu data branch whose access popularity value reaches the second preset condition. The width and depth of the menu that match the cache space size are determined based on the cache space size carried in the HTTP menu request; The width and depth of the matching menu are used as feedback data for the HTTP menu request.
13. The method according to claim 8, characterized in that, In response to the HTTP menu request, menu data is retrieved from the database and used as feedback data for the HTTP menu request, including: In response to the first HTTP menu request sent by the browser after logging into the system, the first HTTP menu request sent after logging into the system includes the identifier of the menu data branch; The data of the menu data branch corresponding to the identifier is used as the feedback data of the HTTP menu request.
14. A data processing device for a management system, characterized in that, include: The read unit is used by the browser to read target state information from the data warehouse; The first processing unit is configured to, when the target state information is not in a predetermined state, have the browser call the backend interface in the data warehouse to send an HTTP menu request to the server; the HTTP menu request is used to enable the server to retrieve menu data from the database and use the menu data as feedback data of the HTTP menu request; the browser calls the backend interface in the data warehouse to store the menu data fed back by the server in the browser's cache, and calls the backend interface in the data warehouse to modify the target state information in the data warehouse to the predetermined state; The second processing unit is used to, when the target state information is a predetermined state, call the front-end interface in the data warehouse in real time to obtain the menu data in the cache, and render the real-time display page of the management system based on the menu data. The first receiving unit is used to receive a change notification sent by the server; the change notification is sent to the browser in response to changes in the menu data in the database. The sending unit is used to respond to the change notification by calling the backend interface in the data warehouse to send an HTTP menu request to the server to request menu data; The modification unit is used to modify the menu data stored in the browser cache by calling the backend interface in the data warehouse based on the feedback data of the HTTP menu request.
15. A data processing device for a management system, characterized in that, include: The third receiving unit is used to receive an HTTP menu request sent by a user client, the HTTP menu request being used to obtain menu data; The HTTP request is sent to the server by the browser after reading the target status information in the data warehouse and, if the target status information is not in the predetermined state, calling the backend interface in the data warehouse. A feedback unit is used to respond to the HTTP menu request, retrieve menu data from the database, and use the menu data as feedback data for the HTTP menu request. The feedback data triggers the browser to call the backend interface in the data warehouse to store the menu data in the browser's cache, and calls the backend interface in the data warehouse to modify the target state information in the data warehouse to a predetermined state. This allows the browser to call the frontend interface in the data warehouse in real time to retrieve the cached menu data when the target state information in the data warehouse is in the predetermined state, and to render the real-time display page of the management system based on the menu data. The monitoring unit is used to monitor data changes in the database; The determination unit is used to identify the target user involved in the data change when data changes occur in the database. The notification unit is used to send a change notification to the browser of the target user who is logged in; the change notification is used to cause the target user's client to send an HTTP menu request for menu data.
16. An electronic device, characterized in that, include: The system includes a memory and a processor, which are communicatively connected to each other. The memory stores computer instructions, and the processor executes the computer instructions to implement the data processing method of the management system according to any one of claims 1 to 13.
17. A computer storage medium, characterized in that, The computer storage medium stores computer program instructions, which, when executed, implement the steps of the data processing method of the management system according to any one of claims 1 to 13.
18. A computer program product, characterized in that, It includes a computer program that, when executed by a processor, implements the steps of the data processing method of the management system according to any one of claims 1 to 13.
Citation Information
Patent Citations
Meteorological data warehouse rear-end interface data transmission interaction system and method
CN112182086A
Efficient multi-part upload for a data warehouse
US9426219B1