Background management method, device, computer device and storage medium of database
By encapsulating the subpage into components and using component associations to dynamically connect the database and subpages, the problem of inefficiency in the database management system when switching pages is solved, and efficient background management is achieved.
Patent Information
- Application Number
- CN202010100559.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-02-18
- Publication Date
- 2025-07-22
- Estimated Expiration
- 2040-02-18
AI Technical Summary
When the existing database management system switches page, websocket disconnection leads to inefficient background management.
Each subpage is encapsulated into components and loaded to the main page, and communicated and interconnected through component association, dynamically connect the database and subpages, and manage database data using the display and refresh switches of the component tab.
It realizes that only refreshing a single database during page switching, avoiding websocket disconnection and improving the database background management efficiency.
Smart Images

Figure CN111400635B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the technical field of data processing, and in particular to a background management method, device, computer device and storage medium for a database. Background Art
[0002] A database management system is a computer software system designed to manage databases, generally having basic functions such as storage, interception, security guarantee, backup, etc. The database management system can be classified according to the database model it supports. The database management system is the core component of the database system, mainly completing the manipulation and management functions of the database, realizing the creation of database objects, the query, addition, modification and deletion operations of the data stored in the database, and the user management and permission management of the database.
[0003] As needed, when managing a database system, the routing needs to be fixed. Click on the navigation tab, and different contents are displayed in the content display area on the right. When switching pages, it is required that the current page is not refreshed, or only a single database needs to be refreshed alone, without refreshing all databases. Because when the page is refreshed, the websocket will be disconnected, affecting the user's management and use of the database, resulting in low efficiency of the background management of the database. How to solve the problem of low efficiency of the background management of the database caused by the above technical problems has become an urgent problem to be solved. Summary of the Invention
[0004] The purpose of the embodiments of this application is to propose a background management method for a database to improve the efficiency of the background management of the database.
[0005] To solve the above technical problems, the embodiments of this application provide a background management method for a database, including:
[0006] Encapsulate each sub-page into a component form and load it onto the main page. The sub-page and the main page are associated through the component to achieve communication and interconnection. Each of the sub-pages is associated through the component to achieve communication and interconnection between the sub-pages;
[0007] If it is detected that the sub-page is loaded onto the display page, then perform a dynamic connection between the database and the component corresponding to the sub-page;
[0008] If it is detected that the component tab is activated, then through the display switch of the main page, load the data in the database into the display page in the form of a component. If it is detected that the component tab is refreshed, then through the refresh switch of the main page, delete the historical data corresponding to the current database and load the data corresponding to the updated component.
[0009] Further, before encapsulating each sub - page into a component and loading it onto the main page, where the sub - page is associated with the main page through the component to achieve communication and interconnection, and each sub - page is associated with other sub - pages through the component to achieve page communication and interconnection, the method further includes:
[0010] Load the main page based on router - view and obtain at least one navigation bar, where the navigation bar is associated with the sub - page through a sub - page button.
[0011] Further, the step of encapsulating each sub - page into a component and loading it onto the main page, where the sub - page is associated with the main page through the component to achieve communication and interconnection, and each sub - page is associated with other sub - pages through the component to achieve page communication and interconnection includes:
[0012] Render the corresponding page component in the body in the form of a page tab through the sub - page button corresponding to the navigation bar;
[0013] Use the component to extend the HTML element to construct the sub - page associated with the main page.
[0014] Further, the step of, if it is detected that the sub - page is loaded onto the display page, then performing the dynamic connection between the database and the component corresponding to the sub - page includes:
[0015] Through component - to - component communication, encapsulate the data in the database into the lifecycle function of the component corresponding to the sub - page;
[0016] When it is detected that the sub - page is loaded onto the display page, trigger the response of the lifecycle function;
[0017] According to the response of the lifecycle function, construct the dynamic connection between the database and the sub - page.
[0018] Further, if it is detected that the component tab is activated, then through the display switch of the main page, load the data in the database into the display page in the form of a component. If it is detected that the component tab is refreshed, through the refresh switch of the main page, delete the data in the database loaded onto the display page and load the data corresponding to the updated component, including:
[0019] When the component tab is activated, through the display switch of the main page, query the current data and record the information status of the current database;
[0020] Parse the content of the database into a component, load it into the tab, and display the content of the database through the display page;
[0021] When refreshing the component tab, through the refresh switch of the main page, load the data corresponding to the updated component and load it into the tab, and display the content of the database through the page.
[0022] Further, the step of parsing the content of the database into components, loading them into the tab, and displaying the content of the database through the page includes:
[0023] When activating the tab, associate the page through the component to dynamically generate a tab page;
[0024] Display the content of the database through the tab page.
[0025] Further, in the case where it is detected that the component tab is activated, through the display switch of the main page, load the database in the form of components into the display page. If it is detected that the component tab is refreshed, through the refresh switch of the main page, delete the data of the database loaded into the display page. After loading the data corresponding to the updated component, the method further includes:
[0026] Register a global variable through the memory and use the global variable to store the link information of the sub - page.
[0027] To solve the above - mentioned technical problems, a technical solution adopted by the present invention is: to provide a background management device for a database, including:
[0028] A sub - page loading module, used to load each sub - page into the main page in the form of a component. The sub - page is associated with the main page through the component to achieve communication and interconnection, and each sub - page is associated with each other through the component to achieve page communication and interconnection;
[0029] A database loading module, used to perform dynamic connection between the database and the component corresponding to the sub - page if it is detected that the sub - page is loaded into the display page;
[0030] A page refresh module, used to, if it is detected that the component tab is activated, load the data in the database into the display page in the form of components through the display switch of the main page. If it is detected that the component tab is refreshed, delete the historical data corresponding to the current database through the refresh switch of the main page and load the data corresponding to the updated component.
[0031] To solve the above - mentioned technical problems, a technical solution adopted by the present invention is: to provide a computer device, including one or more processors; a memory, used to store one or more programs, so that one or more processors implement the background management solution of the database described in any one of the above.
[0032] To solve the above technical problems, a technical solution adopted by the present invention is: a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the background management solution of the database described in any one of the above is implemented.
[0033] In a background management method of a database in the above solution, by encapsulating each sub-page into a component form and loading it onto the main page, the sub-page is associated with the main page through the component to achieve communication and interconnection, and each sub-page is associated with each other through the component to achieve page communication and interconnection. If it is detected that the sub-page is loaded onto the display page, the dynamic connection between the database and the component corresponding to the sub-page is executed. If it is detected that the component tab is activated, the data in the database is loaded onto the display page in the form of a component through the display switch on the main page. If it is detected that the component tab is refreshed, the historical data corresponding to the current database is deleted through the refresh switch on the main page, and the data corresponding to the updated component is loaded. Since communication and interconnection can be achieved between components, and each link of the component is independent and does not interfere with each other, by associating the database with the component, when the page needs to be switched, the single database can be refreshed, effectively improving the background management efficiency of the database. BRIEF DESCRIPTION OF THE DRAWINGS
[0034] To more clearly illustrate the solutions in the present application, the following will briefly introduce the drawings required for the description of the embodiments of the present application. Obviously, the drawings described below are some embodiments of the present application. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.
[0035] Figure 1 is a schematic diagram of the application environment of the background management method of the database provided by the embodiment of the present application;
[0036] Figure 2 is a flowchart of an implementation of the background management method of the database provided by the embodiment of the present application;
[0037] Figure 3 is a flowchart of an implementation of step S1 in the background management method of the database provided by the embodiment of the present application;
[0038] Figure 4 is a flowchart of an implementation of step S2 in the background management method of the database provided by the embodiment of the present application;
[0039] Figure 5 is a flowchart of an implementation of step S3 in the background management method of the database provided by the embodiment of the present application;
[0040] Figure 6It is a flowchart of an implementation of step S32 in the background management method of the database provided by the embodiments of the present application;
[0041] Figure 7 It is a schematic diagram of the background management device of the database provided by the embodiments of the present application;
[0042] Figure 8 It is a schematic diagram of the computer device provided by the embodiments of the present application. Detailed implementation manners
[0043] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by those of ordinary skill in the technical field to which this application belongs; the terms used in the description of this application in the specification are only for the purpose of describing specific embodiments and are not intended to limit this application; the terms "including" and "having" and any variations thereof in the specification and claims of this application and the above drawings are intended to cover non-exclusive inclusion. The terms "first", "second", etc. in the specification and claims of this application or the above drawings are used to distinguish different objects and not to describe a specific order.
[0044] Referring to "embodiments" herein means that the specific features, structures, or characteristics described in connection with the embodiments can be included in at least one embodiment of this application. The phrase appears in various places in the specification and does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment mutually exclusive with other embodiments. Those skilled in the art will explicitly and implicitly understand that the embodiments described herein can be combined with other embodiments.
[0045] In order to enable those skilled in the art to better understand the solutions of this application, the technical solutions in the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings.
[0046] The present invention will be described in detail below with reference to the accompanying drawings and embodiments.
[0047] Please refer to Figure 1 , the system architecture 100 may include terminal devices 101, 102, 103, a network 104, and a server 105. The network 104 is used to provide a medium for communication links between the terminal devices 101, 102, 103 and the server 105. The network 104 may include various connection types, such as wired, wireless communication links, or fiber optic cables, etc.
[0048] Users can use the terminal devices 101, 102, 103 to interact with the server 105 through the network 104 to receive or send messages, etc. Various communication client applications may be installed on the terminal devices 101, 102, 103, such as web browser applications, search applications, instant messaging tools, etc.
[0049] The terminal devices 101, 102, and 103 can be various electronic devices with a display screen and supporting web browsing, including but not limited to smartphones, tablets, laptop computers, desktop computers, and so on.
[0050] The server 105 can be a server that provides various services, such as a background server that supports the pages displayed on the terminal devices 101, 102, and 103.
[0051] It should be noted that a background management method of a database provided by an embodiment of the present application is generally executed by a server. Correspondingly, a background management device of the database is generally set in the server.
[0052] It should be understood that Figure 1 the numbers of the terminal devices, networks, and servers in
[0053] are merely illustrative. According to the implementation requirements, there can be any number of terminal devices, networks, and servers. Figure 2 Figure 2 Please refer to
[0054] Figure 2 which shows a specific implementation of the background management method of the database.
[0055]
[0056] S1: Package each sub - page into the form of a component and load it onto the main page. The sub - page is associated with the main page through the component to achieve communication and interconnection, and the sub - pages are associated with each other through the component to achieve page communication and interconnection.
[0056] Specifically, since the component can achieve communication and interconnection between components, and the components composed of components can support an infinitely recursive menu tree, each sub - page is packaged into the form of a component and loaded onto the main page. The sub - page is associated with the main page through the component, and the sub - pages are associated with each other through the component. In this way, communication and interconnection can be achieved between the main page and each sub - page, and communication and interconnection can also be achieved between each sub - page.
[0057] Among them, the component (Component) is one of the most powerful functions of Vue.js. Components can extend HTML elements and encapsulate reusable code. In this application, the component system allows independent and reusable small components to build large - scale applications, and the pages of the application are abstracted into a component tree, which can support an infinitely recursive menu tree.
[0058] Among them, components are used to make the code more modular. The main page is similar to the parent class, and components are like subclasses. Each functional page is introduced into the main page and registered in the components of the main page. The main page treats each page as an HTML tag. For the database connection page, a global variable is used to record the database connection information. Through communication between components, each database connection is ensured to be independent and non-interfering with each other.
[0059] Among them, since both the main page and the sub-pages are loaded in the form of components, and the database is dynamically connected to the page. When refreshing a single database connection, the database loaded by that page does not affect other database connections. Or when performing database connection and querying data, and when performing operations on other pages such as refreshing that page, it will not affect the current database query.
[0060] S2: If it is detected that the sub-page is loaded into the display page, then perform the dynamic connection between the database and the component corresponding to the sub-page.
[0061] Specifically, if it is detected that the sub-page is loaded into the display page, the database triggers the data connection in the lifecycle function of the sub-component corresponding to the sub-page, gives the database parameters to the sub-component, and the sub-component triggers the lifecycle function when loading, and performs the database connection in the function. And the sub-page is loaded in the form of a component, and through communication and interconnection between components, the dynamic connection between the database and the sub-page is realized.
[0062] Among them, since the sub-page is loaded into the main page in the form of a component, through communication and interconnection between components, the data of the database can be dynamically connected to the main page. Realizing the dynamic connection between the database and the main page is similar to the communication between parent and child components; the communication between parent and child components refers to the communication between the component corresponding to the main page and the component corresponding to the sub-page; through the communication between parent and child components, the database parameters are passed to the sub-component, and the sub-component triggers the lifecycle function when loading, and through the communication and interconnection between the parent component and the sub-component, the dynamic connection between the database and the main page is realized.
[0063] S3: If it is detected that the component tab is activated, then through the display switch of the main page, the data in the database is loaded into the display page in the form of a component. If it is detected that the component tab is refreshed, then through the refresh switch of the main page, the historical data corresponding to the current database is deleted, and the data corresponding to the updated component is loaded.
[0064] Specifically, the main page controls two switches. One is used to control the display switch of the displayed pages, and the other is used to control the refresh switch of the refreshed page. When a new tab is clicked, the corresponding component will be displayed through the display switch. When the tab is closed, the component will be deleted. When the component tab is refreshed, the historical data of the current database will be deleted, and the updated data corresponding to the component will be reloaded and then displayed through the page.
[0065] The database and the tab are dynamically connected in the form of switches. Each tab is connected to a corresponding database. When the corresponding page button in the left navigation bar is clicked, the corresponding page component is rendered in the main text in the form of a tab. At this time, the corresponding tab is activated. The server queries the current database information status, records the current database information status, parses the content of the database into the form of components, renders the corresponding tab, and displays the content of the database in the form of page display.
[0066] In this embodiment, each sub-page is encapsulated into a component and loaded into the main page. The sub-page and the main page are associated through the component to achieve communication and interconnection. Each sub-page is associated with other sub-pages through the component to achieve page communication and interconnection. If it is detected that the sub-page is loaded into the display page, the dynamic connection between the database and the component corresponding to the sub-page will be executed. If it is detected that the component tab is activated, the data in the database will be loaded into the display page in the form of a component through the display switch of the main page. If it is detected that the component tab is refreshed, the historical data corresponding to the current database will be deleted through the refresh switch of the main page, and the updated data corresponding to the component will be loaded. Since communication and interconnection can be achieved between components, and each link of the component is independent and does not interfere with each other, by associating the component with the database, when the page needs to be switched, a single database can be refreshed, effectively improving the background management efficiency of the database.
[0067] After step S3, a method for background management of a database further includes:
[0068] Load the main page based on router-view, and obtain at least one navigation bar, where the navigation bar is associated with the sub-page through the sub-page button.
[0069] Specifically, the server has paths and components that form a mapping relationship with the main page. By establishing a mapping relationship between the paths and components, when loading the main page application, through the switching between paths, that is, the switching of components, the main page is loaded into the server. In the main page, at least one navigation bar can be obtained. There are several tabs in the navigation bar. By rendering the labels of the tabs in the navigation bar, the dynamic connection between the tab and the database is realized.
[0070] Among them, the navigation bar is associated with the sub-pages by setting sub-page buttons, and can guide the tabs of the sub-pages through the navigation bar, which is convenient for the management of background data.
[0071] Among them, vue-router is the official routing plugin of Vue.js (Vue.js is a progressive framework for building user interfaces), and it is deeply integrated with vue.js, suitable for building single-page applications. In traditional page applications, some hyperlinks are used to achieve page switching and jumping. In this application, vue-router is used to load the main page, and the mapping relationship between the path and the component is used to achieve the loading of the main page.
[0072] In this embodiment, by loading the main page based on router-view, obtaining at least one navigation bar, and the navigation bar is associated with the sub-pages through sub-page buttons, the distribution of each sub-page can be displayed on the main page, which is convenient for the background management of the database.
[0073] Please refer to Figure 3 , Figure 3 which shows a specific implementation manner of step S1. In step S1, each sub-page is encapsulated into a component form and loaded onto the main page. The sub-page is associated with the main page through the component to achieve communication and interconnection. The specific implementation process of page communication and interconnection between each sub-page through the component is described in detail as follows:
[0074] S11: Through the sub-page button corresponding to the navigation bar, use the page tab form to render the corresponding page component in the text.
[0075] Specifically, by using the page tab form to render the corresponding page component in the text, the sub-page can be displayed in the form of a tab.
[0076] S12: Use the component to expand the HTML element to build a sub-page associated with the main page.
[0077] Among them, HTML is the Hyper Text Markup Language, an application under the Standard Generalized Markup Language. HTML is not a programming language but a markup language, which is essential for web page production. In this application, by using the component to expand the HTML element, a page associated with the main page is formed.
[0078] In this embodiment, through the sub-page button corresponding to the navigation bar, use the page tab form to render the corresponding page component in the text, and use the component to expand the HTML element to build a page associated with the main page, realizing the association between the sub-page and the main page and strengthening the background management of the database.
[0079] Please refer to Figure 4 , Figure 4 which shows a specific implementation of step S2. In step S2, if it is detected that the sub-page is loaded onto the display page, the specific implementation process of dynamically connecting the database to the components corresponding to the sub-page is as follows:
[0080] S21: Through communication between components, encapsulate the data in the database into the lifecycle function of the components corresponding to the sub-page.
[0081] Specifically, since components can communicate with each other, by encapsulating the data in the database into the lifecycle function of the components corresponding to the sub-page, the association between the components corresponding to the sub-page and the database can be achieved.
[0082] Among them, during a series of processes of Vue.js from creation, initialization of data, compilation of templates, mounting to rendering, update to rendering, unloading, etc., various events always occur, and the names of these events are lifecycle functions.
[0083] S22: When it is detected that the sub-page is loaded onto the display page, trigger the response of the lifecycle function.
[0084] Specifically, when it is detected that the sub-page is loaded onto the display page, the sub-components corresponding to the sub-page are loaded, and at this time, the loading of the sub-components triggers the response of the lifecycle function.
[0085] S23: According to the response of the lifecycle function, construct a dynamic connection between the database and the sub-page.
[0086] Specifically, according to the response of the lifecycle function, through the data of the database encapsulated in the lifecycle function of the components corresponding to the sub-page, perform data connection in the lifecycle function to construct a dynamic connection between the database and the sub-page.
[0087] In this embodiment, by encapsulating the data in the database into the lifecycle function and through the response of the lifecycle function, a dynamic connection between the database and the sub-page is constructed, realizing the dynamic connection between the database and the sub-page, and improving the management efficiency of background data.
[0088] Please refer to Figure 5 , Figure 5 which shows a specific implementation of step S3. In step S3, if it is detected that the component tab is activated, then through the display switch of the main page, load the data in the database into the display page in the form of components. If it is detected that the component tab is refreshed, then through the refresh switch of the main page, delete the historical data corresponding to the current database and load the data corresponding to the updated components. The specific implementation process is as follows:
[0089] S31: When the component tab is activated, query the current data through the display switch on the main page and record the information status of the current database.
[0090] Specifically, there are a display switch and a refresh switch on the main page, and the display switch communicates with the component tab. When it is detected that the component tab is activated, the current data is queried through the display switch, and the current data link and the information status of the current database are recorded.
[0091] S32: Parse the content of the database into components, load them into the tab, and display the content of the database through the display page.
[0092] Specifically, since in step S31, the display switch queries the current data and records the information status of the current database, the database parses the content of the database into the form of components through the response of the lifecycle function, loads them into the tab, and displays the content of the database through the display page.
[0093] S33: When the component tab is refreshed, load the data corresponding to the updated component through the refresh switch on the main page, load it into the tab, and display the content of the database through the page.
[0094] Specifically, the refresh switch communicates with the component tab. When the component tab is refreshed, the data of the database on the display page is deleted through the refresh switch on the main page, the data of the database is updated, and through the response of the lifecycle function, the updated data is parsed into the form of components and loaded into the tab, and the content of the database is displayed through the display page.
[0095] In this embodiment, by communicating with the component tab through the display switch and the refresh switch on the main page, the data of the database can be loaded or refreshed, and displayed through the display page, realizing that the background data can be loaded and refreshed, and can be displayed through the display page, achieving accurate management of the background data and improving the management efficiency of the background data.
[0096] Please refer to Figure 7 , Figure 7 which shows a specific implementation manner of step S32. In step S32, the specific implementation process of parsing the content of the database into components, loading them into the tab, and displaying the content of the database through the page is described in detail as follows:
[0097] S321: When the tab is activated, dynamically generate a tab page through the component association page.
[0098] Specifically, the tab communicates with the sub-page through the component. When the tab is activated, a tab page will be dynamically generated, and the tab page will display the content of the database in the form of components.
[0099] S322: Display the content of the database through the tab page.
[0100] Specifically, when the navigation tab is clicked, a callback function is triggered. This callback function determines whether the page is in an active state based on the status of the variable that records the page information globally. The main page listens to this variable and enables the refresh instruction to refresh the current page when it is found to be in an active state. When the component tab is activated, the display switch is loaded, and the content of the database of the components on the corresponding page is displayed by generating a new tab page.
[0101] In this embodiment, when the tab is activated, the page is associated with the component, a tab page is dynamically generated, and the content of the database is displayed through the tab page, so that the database is displayed through different pages, which is convenient for the management of the database background.
[0102] After step S3, a method for the background management of a database further includes:
[0103] Register a global variable through the memory and use the global variable to store the link information of the sub-pages.
[0104] Specifically, by registering a global variable to store the link information of the page and which pages are opened or closed.
[0105] Furthermore, bind the corresponding key through the tab, and the memory records the password.
[0106] Preferably, store some global variables such as database connection information, current page information, and page refresh switch through preset global variables.
[0107] In this embodiment, by registering a global variable to store the link information of the page, binding the corresponding key through the tab, and the memory records the password, the security of the background management of the database can be improved.
[0108] Those of ordinary skill in the art can understand that all or part of the processes in the methods of the above embodiments can be completed by instructing relevant hardware through a computer program. This computer program can be stored in a computer-readable storage medium. When the program is executed, it can include the processes of the embodiments of the above methods. Among them, the aforementioned storage medium can be a non-volatile storage medium such as a magnetic disk, an optical disk, a read-only memory (ROM), etc., or a random access memory (RAM), etc.
[0109] Please refer to Figure 7 as a reference to the above Figure 2For the implementation of the method described above, the present application provides an embodiment of a background management device for a database. This device embodiment corresponds to Figure 2 the method embodiment shown above, and this device can be specifically applied to various electronic devices.
[0110] As Figure 7 shown, the background management device for the database in this embodiment includes: a sub-page loading module 41, a database loading module 42, and a page refreshing module 43, where:
[0111] The sub-page loading module 41 is used to load each sub-page into the main page in the form of a component. The sub-page is associated with the main page through the component to achieve communication and interconnection, and the sub-pages communicate and interconnect with each other through the component.
[0112] The database loading module 42 is used to perform dynamic connection between the database and the component corresponding to the sub-page if it is detected that the sub-page is loaded into the display page.
[0113] The page refreshing module 43 is used to load the data in the database into the display page in the form of a component through the display switch of the main page if it is detected that the component tab is activated, and to delete the historical data corresponding to the current database and load the data corresponding to the updated component through the refresh switch of the main page if it is detected that the component tab is refreshed.
[0114] Furthermore, a background management device for a database further includes a navigation bar acquisition module, which is used to load the main page based on router-view and acquire at least one navigation bar, where the navigation bar is associated with the sub-page through a sub-page button.
[0115] Furthermore, the sub-page loading module 41 further includes:
[0116] The page tab unit is used to render the corresponding page component at the text part in the form of a page tab through the sub-page button corresponding to the navigation bar.
[0117] The main page association unit is used to build a page associated with the main page by extending HTML elements with components.
[0118] Furthermore, the database loading module 42 further includes:
[0119] The encapsulation unit is used to encapsulate the data in the database into the life cycle function of the component corresponding to the sub-page through communication between components.
[0120] The response unit is used to trigger the response of the life cycle function when it is detected that the sub-page is loaded into the display page.
[0121] A connection unit for constructing a dynamic connection between a database and a sub-page in response to a lifecycle function.
[0122] Furthermore, the page refresh module 43 further includes:
[0123] A display switch unit for querying current data through the display switch of the main page and recording the information status of the current database when the component tab is activated.
[0124] A data loading unit for parsing the content of the database into components, loading them into the tab, and displaying the content of the database through the display page.
[0125] A data refresh unit for loading the updated data corresponding to the component when the component tab is refreshed through the refresh switch of the main page, loading it into the tab, and displaying the content of the database through the page.
[0126] Furthermore, the display switch unit further includes:
[0127] A tab page sub-unit for dynamically generating a tab page through the component-associated page when the tab is activated.
[0128] A database sub-unit for displaying the content of the database through the tab page.
[0129] Furthermore, a background management device for a database further includes a link information storage module for registering global variables through a memory and storing the link information of the sub-page using the global variables.
[0130] To solve the above technical problems, the embodiments of the present application also provide a computer device. For details, please refer to Figure 8 , Figure 8 which is the basic structural block diagram of the computer device in this embodiment.
[0131] The computer device 5 includes a memory 51, a processor 52, and a network interface 53 that communicate with each other via a system bus. It should be noted that only a computer device 5 with three components, namely, a memory 51, a processor 52, and a network interface 53, is shown in the figure. However, it should be understood that it is not necessary to implement all the shown components, and more or fewer components can be implemented alternatively. Among them, those skilled in the art of this technology can understand that a computer device here is a device that can automatically perform numerical calculations and / or information processing according to pre-set or stored instructions, and its hardware includes but is not limited to microprocessors, application specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), digital signal processors (DSPs), embedded devices, etc.
[0132] The computer device can be a desktop computer, a notebook, a palm computer, a cloud server, or other computing devices. The computer device can perform human-computer interaction with users through a keyboard, a mouse, a remote control, a touchpad, a voice control device, or other means.
[0133] The memory 51 includes at least one type of readable storage medium. The readable storage medium includes flash memory, hard disks, multimedia cards, card-type memories (such as SD or DX memories, etc.), random access memories (RAMs), static random access memories (SRAMs), read-only memories (ROMs), electrically erasable programmable read-only memories (EEPROMs), programmable read-only memories (PROMs), magnetic memories, magnetic disks, optical discs, etc. In some embodiments, the memory 51 can be an internal storage unit of the computer device 5, such as the hard disk or memory of the computer device 5. In other embodiments, the memory 51 can also be an external storage device of the computer device 5, such as a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. equipped on the computer device 5. Of course, the memory 51 can also include both the internal storage unit and the external storage device of the computer device 5. In this embodiment, the memory 51 is generally used to store the operating system installed on the computer device 5 and various application software, such as the program code of the background management method of the database. In addition, the memory 51 can also be used to temporarily store various data that have been output or will be output.
[0134] The processor 52 may be a Central Processing Unit (CPU), a controller, a microcontroller, a microprocessor, or other data processing chips in some embodiments. The processor 52 is generally used to control the overall operation of the computer device 5. In this embodiment, the processor 52 is used to run the program code stored in the memory 51 or process data, such as running the program code of a background management method for a database.
[0135] The network interface 53 may include a wireless network interface or a wired network interface, and the network interface 53 is generally used to establish a communication connection between the computer device 5 and other electronic devices.
[0136] The present application also provides another implementation manner, that is, to provide a computer-readable storage medium storing a server maintenance program, and the server maintenance program can be executed by at least one processor to enable the at least one processor to execute the steps of a background management method for a database as described above.
[0137] Through the description of the above embodiments, those skilled in the art can clearly understand that the above-described embodiment methods can be implemented by means of software plus a necessary general hardware platform. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation manner. Based on such an understanding, the technical solution of the present application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. The computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disc), and includes several instructions to enable a terminal device (which may be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to execute the methods of the various embodiments of the present application.
[0138] Obviously, the above-described embodiments are only part of the embodiments of the present application, rather than all of the embodiments. The accompanying drawings show preferred embodiments of the present application, but do not limit the patent scope of the present application. The present application can be implemented in many different forms. On the contrary, the purpose of providing these embodiments is to make the understanding of the disclosure content of the present application more thorough and comprehensive. Although the present application has been described in detail with reference to the foregoing embodiments, those skilled in the art can still modify the technical solutions described in the foregoing specific embodiments, or perform equivalent replacements for some of the technical features. Any equivalent structure directly or indirectly using the content of the specification and drawings of the present application in other related technical fields shall be within the scope of the patent protection of the present application by the same token.
Claims
1. A background management method for a database, characterized in that Including: Encapsulate each sub - page into a component form and load it onto the main page. The sub - page is associated with the main page through the component to achieve communication and interconnection. Each of the sub - pages is associated with each other through the component to achieve communication and interconnection between the sub - pages; If it is detected that the sub - page is loaded onto the display page, perform the dynamic connection between the database and the component corresponding to the sub - page; If it is detected that the component tab is activated, through the display switch of the main page, load the data in the database into the display page in the form of a component. If it is detected that the component tab is refreshed, through the refresh switch of the main page, delete the historical data corresponding to the current database and load the data corresponding to the updated component. Among them, when it is detected that the component tab is activated, through the display switch of the main page, load the data in the database into the display page in the form of a component. When it is detected that the component tab is refreshed, through the refresh switch of the main page, delete the data of the database loaded onto the display page and load the data corresponding to the updated component, including: When the component tab is activated, through the display switch of the main page, query the current data and record the information status of the current database. The current data includes the data to be added to the current database for background management; Parse the content of the database into a component, load it into the tab, and display the content of the database through the display page; When the component tab is refreshed, through the refresh switch of the main page, load the data corresponding to the updated component and load it into the tab, and display the content of the database through the page.
2. The background management method of the database according to claim 1, characterized in that Before encapsulating each sub - page into a component form and loading it onto the main page, where the sub - page is associated with the main page through the component to achieve communication and interconnection, and each of the sub - pages is associated with each other through the component to achieve communication and interconnection between the pages, the method further includes: Load the main page based on router - view, and obtain at least one navigation bar, where the navigation bar is associated with the sub - page through the sub - page button.
3. The background management method of the database according to claim 2, characterized in that The encapsulating each sub - page into a component form and loading it onto the main page, where the sub - page is associated with the main page through the component to achieve communication and interconnection, and each of the sub - pages is associated with each other through the component to achieve communication and interconnection between the pages includes: Through the sub - page button corresponding to the navigation bar, render the corresponding page component in the main text in the form of a page tab; Adopt the component to extend the HTML element to construct the sub - page associated with the main page.
4. The background management method of the database according to claim 1, wherein The performing the dynamic connection between the database and the component corresponding to the sub - page if it is detected that the sub - page is loaded onto the display page includes: Through communication between components, encapsulate the data of the database into the life - cycle function of the component corresponding to the sub - page; When it is detected that the sub - page is loaded onto the display page, trigger the response of the life - cycle function; According to the response of the life - cycle function, construct the dynamic connection between the database and the sub - page.
5. The background management method of the database according to claim 1, characterized in that Parsing the content of the database into components, loading them into the tab, and displaying the content of the database through the page includes: When the tab is activated, associating the page through the component to dynamically generate a tab page; Displaying the content of the database through the tab page.
6. The background management method of the database according to any one of claims 1 to 5, characterized in that, In the case where it is detected that the component tab is activated, through the display switch of the main page, loading the database into the display page in the form of a component. If it is detected that the component tab is refreshed, through the refresh switch of the main page, deleting the data of the database loaded into the display page, and after loading the data corresponding to the updated component, the method further includes: Registering a global variable through the memory and using the global variable to store the link information of the sub-page.
7. A background management device for a database, characterized in that Including: A sub-page loading module for encapsulating each sub-page into a component form and loading it into the main page. The sub-page is associated with the main page through the component to achieve communication and interconnection, and each of the sub-pages is associated through the component to achieve page communication and interconnection; A database loading module for, if it is detected that the sub-page is loaded into the display page, performing a dynamic connection between the database and the component corresponding to the sub-page; A page refresh module for, if it is detected that the component tab is activated, through the display switch of the main page, loading the data in the database into the display page in the form of a component. If it is detected that the component tab is refreshed, through the refresh switch of the main page, deleting the historical data corresponding to the current database and loading the data corresponding to the updated component. Among them, the page refresh module further includes: A display switch unit for, when the component tab is activated, querying the current data through the display switch of the main page and recording the information status of the current database. The current data includes the data to be added to the current database for background management; A data loading unit for parsing the content of the database into components, loading them into the tab, and displaying the content of the database through the display page; A data refresh unit for, when the component tab is refreshed, through the refresh switch of the main page, loading the data corresponding to the updated component and loading it into the tab, and displaying the content of the database through the page.
8. A computer device includes a memory and a processor. A computer program is stored in the memory. When the processor executes the computer program, the steps of a method for background management of a database according to any one of claims 1 to 6 are implemented.
9. A computer-readable storage medium, characterized in that, A computer program is stored on the computer-readable storage medium. When the computer program is executed by the processor, the steps of a method for background management of a database according to any one of claims 1 to 6 are implemented.
Citation Information
Patent Citations
User interface implementation method, client and storage medium
CN107992301A
System and method for bulding customized web applications within a domain
US20180341369A1