Browser front-end data storage method, device, equipment and readable storage medium

By setting up an IndexDB warehouse in the browser's local database and establishing independent data tables based on the browser's functional modules, the problem of chaotic data storage and management in the browser is solved, the data display process is improved, network consumption is reduced, and the user experience is improved.

CN110362776BActive Publication Date: 2025-09-19WEBANK (CHINA)
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN201910667449.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2019-07-23
Publication Date
2025-09-19
Estimated Expiration
2039-07-23

AI Technical Summary

Technical Problem

The browser front-end data storage management is chaotic, resulting in a slowdown in the data display process.

Method used

An IndexDB warehouse is set up in the browser's local database, and an independent data table is established based on the browser's functional module. When a data request instruction is detected, it is determined whether the IndexDB warehouse is empty. If not, it is determined whether the independent data table has cached target data and rendered.

Benefits of technology

It realizes orderly front-end data display, improves data display process, reduces network consumption and improves user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN110362776B_ABST
    Figure CN110362776B_ABST
Patent Text Reader

Abstract

The present invention discloses a browser front-end data storage method, apparatus, device, and readable storage medium, relating to the technical field of financial technology (Fintech). The method comprises: upon detecting a data request instruction, determining whether the IndexDB warehouse is empty; if the IndexDB warehouse is not empty, determining whether the independent data table caches the target data corresponding to the data request instruction; if the independent data table caches the target data corresponding to the data request instruction, obtaining the target data and rendering the target data into a page to be displayed. The present invention solves the technical problem in the prior art of chaotic browser front-end data storage management, which slows the front-end data display process.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of financial technology (Fintech), and in particular to a browser front-end data storage method, device, equipment and readable storage medium. Background Art

[0002] With the continuous development of Fintech, especially internet-based finance, more and more technologies are being applied in the financial sector. The browser front-end data storage process in the financial sector involves numerous technical applications. However, currently, browsers primarily use local data storage APIs such as LocalStorage to cache front-end data. LocalStorage caches data in the local browser as key-value pairs. When data is cached in the local browser as key-value pairs, data from different pages of the same source webpage and from different functional modules of the same page all share a single data warehouse under LocalStorage. This leads to confusion in browser front-end data storage management and slows down the front-end data display process. Summary of the Invention

[0003] The main purpose of the present invention is to provide a browser front-end data storage method, device, equipment and readable storage medium, aiming to solve the technical problem in the prior art that the browser front-end data storage management is chaotic, resulting in a slowdown in the front-end data display process.

[0004] To achieve the above objectives, an embodiment of the present invention provides a browser front-end data storage method, wherein an IndexDB warehouse is provided in a browser local database, and independent data tables are established in the IndexDB warehouse based on the functional modules of the browser front-end page. The browser front-end data storage method includes:

[0005] When a data request instruction is detected, determining whether the IndexDB warehouse is an empty warehouse;

[0006] If the IndexDB warehouse is not an empty warehouse, determining whether the independent data table caches the target data corresponding to the data request instruction;

[0007] If the independent data table caches the target data corresponding to the data request instruction, the target data is acquired and rendered into a page to be displayed.

[0008] Optionally, after the step of determining whether the IndexDB warehouse is an empty warehouse when a data request instruction is detected, the following steps are performed:

[0009] If the IndexDB warehouse is empty, obtaining the target data corresponding to the data request instruction from the server corresponding to the browser;

[0010] The target data is rendered into an initialized page to be displayed, and the target data is cached in the IndexDB warehouse.

[0011] Optionally, the step of caching the target data in the IndexDB warehouse includes:

[0012] Obtaining the same-origin page where the target data is located under the same-origin policy, and obtaining the target functional module where the target data is located on the same-origin page;

[0013] Based on the preset association relationship between the target functional module and the independent data table, the target data is cached in the target data table corresponding to the IndexDB warehouse.

[0014] Optionally, if the independent data table caches the target data corresponding to the data request instruction, obtaining the target data and rendering the target data into a page to be displayed further comprises:

[0015] If an operation of editing the page of the browser is received, the data corresponding to the page after the operation is saved in the IndexDB warehouse, wherein the data corresponding to the page after the operation includes the content of tags, log information, historical records, global variable information, custom table field information, and function information.

[0016] Optionally, if the independent data table caches the target data corresponding to the data request instruction, obtaining the target data and rendering the target data into a page to be displayed further comprises:

[0017] If a clear instruction to clear the data in the IndexDB warehouse is detected, obtaining the content to be cleared carried in the clear instruction;

[0018] Clear the content to be cleared.

[0019] Optionally, if the independent data table caches the target data corresponding to the data request instruction, obtaining the target data and rendering the target data into a page to be displayed further comprises:

[0020] If an operation event on a functional module in the IndexDB warehouse is detected, determining whether the operation event is a coupled operation event;

[0021] If the operation event is a coupled operation event, other functional modules are decoupled based on the decoupling method preset in the IndexDB warehouse.

[0022] Optionally, if the independent data table caches the target data corresponding to the data request instruction, obtaining the target data and rendering the target data into a page to be displayed includes:

[0023] If an update instruction for the target data corresponding to the data request instruction is received, the target data in the IndexDB warehouse is updated.

[0024] The present invention also provides a browser front-end data storage device, wherein an IndexDB warehouse is set up in a browser local database, and an independent data table is established in the IndexDB warehouse based on the functional modules of the browser front-end page. The browser front-end data storage device includes:

[0025] A first judgment module is used to judge whether the IndexDB warehouse is an empty warehouse when a data request instruction is detected;

[0026] A second judgment module is configured to judge whether the independent data table caches the target data corresponding to the data request instruction if the IndexDB warehouse is not an empty warehouse;

[0027] The first acquisition module is configured to acquire the target data corresponding to the data request instruction if the independent data table has the target data cached therein, and render the target data into a page to be displayed.

[0028] Optionally, the browser front-end data storage device further includes:

[0029] A second acquisition module is configured to acquire target data corresponding to the data request instruction from a server corresponding to the browser if the IndexDB warehouse is empty;

[0030] The cache module is used to render the target data into an initialized page to be displayed, and cache the target data in the IndexDB warehouse.

[0031] Optionally, the cache module includes:

[0032] an acquisition unit, configured to acquire a homologous page where the target data is located under a homologous policy, and acquire a target functional module where the target data is located on the homologous page;

[0033] The cache unit is used to cache the target data in the target data table corresponding to the IndexDB warehouse based on the preset association relationship between the target functional module and the independent data table.

[0034] Optionally, the browser front-end data storage device further includes:

[0035] A saving unit is used to save the data corresponding to the page after the operation in the IndexDB warehouse when an operation of editing the page of the browser is received, wherein the data corresponding to the page after the operation includes the content of tags, log information, historical records, global variable information, custom table field information, and function information.

[0036] Optionally, the browser front-end data storage device further includes:

[0037] A third acquisition module is configured to, when a clear instruction for clearing data in the IndexDB warehouse is detected, obtain the content to be cleared carried in the clear instruction;

[0038] The clearing module is used to clear the content to be cleared.

[0039] Optionally, the browser front-end data storage device further includes:

[0040] a detection module configured to, upon detecting an operation event on a functional module in the IndexDB warehouse, determine whether the operation event is a coupled operation event;

[0041] The decoupling processing module is used to decouple other functional modules based on the decoupling method preset in the IndexDB warehouse if the operation event is a coupled operation event.

[0042] Optionally, the browser front-end data storage device further includes:

[0043] The update processing module is used to update the target data in the IndexDB warehouse if an update instruction for the target data corresponding to the data request instruction is received.

[0044] The present invention also provides a readable storage medium, on which a browser front-end data storage program is stored. When the browser front-end data storage program is executed by a processor, the steps of the browser front-end data storage method described above are implemented.

[0045] The present invention sets up an IndexDB warehouse in the local database of the browser, and establishes an independent data table in the IndexDB warehouse based on the functional module of the browser front-end page. When a data request instruction is detected, it determines whether the IndexDB warehouse is an empty warehouse; if the IndexDB warehouse is not an empty warehouse, it determines whether the independent data table has cached the target data corresponding to the data request instruction; if the independent data table has cached the target data corresponding to the data request instruction, then the target data is obtained and rendered into a page to be displayed. In this application, since an IndexDB warehouse is set up in the local database of the browser, and an independent data table is established in the IndexDB warehouse based on the functional module of the browser front-end page, instead of storing data based on the entire homologous page, when the IndexDB warehouse is not an empty warehouse, if a data request instruction is detected, the target data can be obtained in an orderly manner based on the independent data table, and the page to be displayed can be obtained. That is, in this application, since an independent data table is established based on the functional module of the browser front-end page, the front-end data can be displayed in an orderly manner, which improves the display process of the front-end data. BRIEF DESCRIPTION OF THE DRAWINGS

[0046] Figure 1 This is a flow chart of a first embodiment of a browser front-end data storage method according to the present invention;

[0047] Figure 2 This is a detailed flow chart of the second embodiment of the browser front-end data storage method of the present invention, after the step of determining whether the IndexDB warehouse is an empty warehouse when a data request instruction is detected;

[0048] Figure 3 It is a schematic diagram of the device structure of the hardware operating environment involved in the embodiment of the method of the present invention.

[0049] The purpose, features and advantages of the present invention will be further described with reference to the accompanying drawings and in conjunction with the embodiments. DETAILED DESCRIPTION

[0050] It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.

[0051] The present invention provides a browser front-end data storage method. In one embodiment of the browser front-end data storage method, referring to Figure 1 An IndexDB warehouse is set in the browser local database, and an independent data table is established in the IndexDB warehouse based on the functional module of the browser front-end page. The browser front-end data storage method includes:

[0052] Step S10, when a data request instruction is detected, determining whether the IndexDB warehouse is an empty warehouse;

[0053] Step S20: If the IndexDB warehouse is not empty, determine whether the independent data table has cached the target data corresponding to the data request instruction;

[0054] Step S30: If the independent data table caches the target data corresponding to the data request instruction, the target data is obtained and rendered into a page to be displayed.

[0055] The specific steps are as follows:

[0056] Step S10, when a data request instruction is detected, determining whether the IndexDB warehouse is an empty warehouse;

[0057] It should be noted that the browser front-end data storage method is applied to the browser, wherein the browser front-end data storage mainly refers to the cache of the browser front-end data. In order to cache the browser front-end data in an orderly manner, in this embodiment, an IndexDB warehouse is provided. Specifically, a Dexie management tool is provided in the browser. The Dexie management tool can be used to quickly create an IndexDB warehouse. Specifically, the preset warehouse creation module in the Dexie management tool is used (the present invention pre-sets a structured creation program in the warehouse creation module) to create the IndexDB warehouse. That is, in the browser, when the data from the server is received for the first time to display the page content, the Dexie management tool can be used to create an IndexDB warehouse on the local end of the browser. In the prior art, the storage method of LocalStorage is: caching data in the local browser in the form of key-value pairs. When caching data in the local browser in the form of key-value pairs, in the LocalStorage storage method, data in different pages of the same source web page and different functional modules of the same page all share a data warehouse under LocalStorage. For example, different pages A and B of the same source web page, the first sub-functional module and the second sub-functional module of page B are all in the local database and are not distinguished. The principle of using LocalStorage as a cache is that when data needs to be stored, the data can be saved in the local browser through the LocalStorage.setItem(keyName, keyValue) method (keyName: custom key name, keyValue: (key value), this value can only be a string type). When entering the page next time or performing the same operation, the required value can be obtained through the LocalStorage.setItem(keyName) method without making structured distinctions on the data. That is, in the prior art, the difference between browser LocalStorage and IndexDB warehouse is that IndexDB warehouse has a structured storage method instead of caching data through key-value pair storage method. IndexDB warehouse has a structured storage method instead of caching data through key-value pair storage method, which can distinguish data in different pages of the same source web page and in different functional modules of the same page.

[0058] In addition, SessionStorage only exists during the browser session and has a short lifetime, while LocalStorage data storage time is long, but the storage space allocated by the browser is small, only about 5M, while IndexDB can store large amounts of structured data and supports indexing to increase the speed of searching for data. IndexDB's storage space is much larger than SessionStorage. IndexDB's storage space is actually calculated and allocated by the browser, and it varies from browser to browser. Desktop browsers are generally in the tens of GB.

[0059] It should be noted that the LocalStorage storage format is synchronous, and the traversal reading and writing of large amounts of data will block the process. However, in this application, due to the structured setting of the IndexDB warehouse, data can be read and written in an orderly manner to avoid process blocking.

[0060] Specifically, in this embodiment, for the IndexDB warehouse, data is structured differently. That is, under the IndexDB warehouse, there is a warehouse named bdp-ide created with the project as the structure. After creating the warehouse named bdp-ide, a tabs data table with the functional modules under the project as the structural units can be created. The tabs data table is an independent table, and the specific content of the corresponding functional module exists under the independent table.

[0061] When a data request instruction is detected, it is determined whether the IndexDB warehouse is an empty warehouse, that is, whether there is data content in the IndexDB warehouse. Specifically, it is determined whether the user enters the browser page for the first time. If the user enters the browser page for the first time, the IndexDB warehouse is an empty warehouse. If the user does not enter the browser page for the first time, the IndexDB warehouse is not an empty warehouse.

[0062] Step S20: If the IndexDB warehouse is not empty, determine whether the independent data table has cached the target data corresponding to the data request instruction;

[0063] If the IndexDB warehouse is not an empty warehouse, it is obvious that the user is not entering the browser page for the first time. At this time, it is determined whether the independent data table has cached the target data corresponding to the data request instruction. The method of determining whether the independent data table has cached the target data corresponding to the data request instruction includes: determining whether the corresponding target data exists by whether the structure (determined by the structure name) where the target data requested by the data request instruction exists, or determining whether the corresponding target data exists by whether the page tag (determined by the tag name) where the target data exists exists.

[0064] Reference Figure 2 , after the step of determining whether the IndexDB warehouse is an empty warehouse when a data request instruction is detected, the following steps are included:

[0065] Step S21: if the IndexDB warehouse is empty, obtaining the target data corresponding to the data request instruction from the server corresponding to the browser;

[0066] In this embodiment, if the IndexDB warehouse is an empty warehouse, it is obvious that the user enters the browser page for the first time. At this time, the target data corresponding to the data request instruction is obtained from the server corresponding to the browser, that is, the target data corresponding to the data request instruction obtained by the server corresponding to the browser is received.

[0067] Step S22: Render the target data into an initialized page to be displayed, and cache the target data in the IndexDB warehouse.

[0068] In this embodiment, after obtaining the target data, the target data is rendered into an initialized page to be displayed. Rendering the target data into an initialized page to be displayed belongs to the prior art and is not described in detail here. After rendering the target data into an initialized page to be displayed, a task is created, that is, the task is created in the IndexDB warehouse, and the target data is cached in the IndexDB warehouse.

[0069] The step of caching the target data in the IndexDB warehouse includes:

[0070] Step S221, obtaining the same-origin page where the target data is located under the same-origin policy, and obtaining the target functional module where the target data is located on the same-origin page;

[0071] Step S222: Based on the preset association relationship between the target functional module and the independent data table, the target data is cached in the target data table corresponding to the IndexDB warehouse.

[0072] In this embodiment, caching the target data in the IndexDB warehouse means caching the target data in a structured manner in the IndexDB warehouse rather than caching it in an unordered manner. Therefore, after obtaining the target data, it is necessary to determine the structural position of the target data cached in the IndexDB warehouse through the page tag and module tag carried in the target data, that is, first obtain the homologous page where the target data is located under the homologous strategy to determine the initial structural position of the target data in the IndexDB warehouse (determined according to the page tag), and obtain the target functional module where the target data is located on the homologous page to determine the final structural position of the target data in the IndexDB warehouse.

[0073] After obtaining the target functional module, the target data is cached in the target data table corresponding to the IndexDB warehouse based on the preset association relationship between the target functional module and the independent data table. Specifically, for example, after obtaining the target functional module A, the target data is cached in the target data table A corresponding to the IndexDB warehouse based on the preset association relationship between the target functional module and the independent data table.

[0074] Step S30: If the independent data table caches the target data corresponding to the data request instruction, the target data is obtained and rendered into a page to be displayed.

[0075] In this embodiment, if the independent data table caches the target data corresponding to the data request instruction, the target data is obtained in a structured manner and rendered into a page to be displayed, that is, the target data can be rendered into a page to be displayed, wherein rendering belongs to the existing technology and is not described in detail here.

[0076] The present invention sets up an IndexDB warehouse in the local database of the browser, and establishes an independent data table in the IndexDB warehouse based on the functional module of the browser front-end page. When a data request instruction is detected, it determines whether the IndexDB warehouse is an empty warehouse; if the IndexDB warehouse is not an empty warehouse, it determines whether the independent data table has cached the target data corresponding to the data request instruction; if the independent data table has cached the target data corresponding to the data request instruction, then the target data is obtained and rendered into a page to be displayed. In this application, since an IndexDB warehouse is set up in the local database of the browser, and an independent data table is established in the IndexDB warehouse based on the functional module of the browser front-end page, instead of storing data based on the entire homologous page, when the IndexDB warehouse is not an empty warehouse, if a data request instruction is detected, the target data can be obtained in an orderly manner based on the independent data table, and the page to be displayed can be obtained. That is, in this application, since an independent data table is established based on the functional module of the browser front-end page, the front-end data can be displayed in an orderly manner, which improves the display process of the front-end data.

[0077] Furthermore, the present invention provides another embodiment of the browser front-end data storage method. In this embodiment, if the independent data table caches the target data corresponding to the data request instruction, then after the step of obtaining the target data and rendering the target data into a page to be displayed, the method further includes:

[0078] In step S40, if an operation of editing the page of the browser is received, the data corresponding to the page after the operation is saved in the IndexDB warehouse, wherein the data corresponding to the page after the operation includes the content of tags, log information, history records, global variable information, custom table field information, and function information.

[0079] In this embodiment, users can also perform editing operations on the page, such as editing task script information or opening a new tab. At this point, the data corresponding to the page after the operation is saved in the IndexDB warehouse. This creates a process of back-and-forth storage and utilization of required functional data, reducing network consumption, preserving user habits, and improving user experience. The data corresponding to the page after the operation includes tags, log information, historical records, global variable information, custom table field information, and function information.

[0080] In this embodiment, when an edit operation is received on a page of the browser, data corresponding to the page after the operation is stored in the IndexDB warehouse, wherein the data corresponding to the page after the operation includes tags, log information, history records, global variable information, custom table field information, and function information. In this embodiment, the technical effect of reducing network consumption is achieved.

[0081] Furthermore, the present invention provides another embodiment of the browser front-end data storage method. In this embodiment, if the independent data table caches the target data corresponding to the data request instruction, then after the step of obtaining the target data and rendering the target data into a page to be displayed, the method further includes:

[0082] Step S50: if a clear instruction for clearing the data in the IndexDB warehouse is detected, obtaining the content to be cleared carried in the clear instruction;

[0083] Step S60: clearing the content to be cleared.

[0084] In this embodiment, manual clearing of cached data is also supported. That is, when the page is operated for a long time, the amount of cached data will be very large, which will cause slow reading and writing of IndexDB. Users can manually clear the cache regularly to enhance the response speed of IndexDB. Specifically, if a clear instruction to clear the data in the IndexDB warehouse is detected, the content to be cleared carried in the clear instruction is obtained, and the content to be cleared can be cleared.

[0085] In this embodiment, if a clear instruction for clearing data in the IndexDB warehouse is detected, the content to be cleared carried in the clear instruction is obtained and cleared, thereby improving data display efficiency.

[0086] Furthermore, the present invention provides another embodiment of the browser front-end data storage method. In this embodiment, if the independent data table caches the target data corresponding to the data request instruction, then after the step of obtaining the target data and rendering the target data into a page to be displayed, the method further includes:

[0087] Step S70: If an operation event on a functional module in the IndexDB warehouse is detected, determining whether the operation event is a coupled operation event;

[0088] Step S80: If the operation event is a coupled operation event, decoupling processing is performed on other functional modules based on the decoupling method preset in the IndexDB warehouse.

[0089] In this embodiment, if an operation event is detected for a functional module in the IndexDB warehouse, it is determined whether the operation event is a coupled operation event, that is, whether the operation event is applicable to other modules. If applicable to other modules, the other modules are synchronized accordingly. Specifically, in this embodiment, the IndexDB warehouse contains a preset functional module, which has a preset coupling program segment pre-stored therein. When a coupling relationship is detected between different functional modules, the preset coupling program segment decouples the other functional modules based on the preset decoupling method corresponding to the preset coupling program segment in the IndexDB warehouse.

[0090] In this embodiment, when an operation event on a functional module in the IndexDB warehouse is detected, it is determined whether the operation event is a coupled operation event. If the operation event is a coupled operation event, other functional modules are decoupled based on the decoupling method preset in the IndexDB warehouse. In this embodiment, decoupling other functional modules using the preset decoupling method improves data processing efficiency.

[0091] Furthermore, the present invention provides another embodiment of a browser front-end data storage method. In this embodiment, if the independent data table caches the target data corresponding to the data request instruction, then obtaining the target data and rendering the target data into a page to be displayed includes:

[0092] Step S90: If an update instruction for the target data corresponding to the data request instruction is received, the target data in the IndexDB warehouse is updated.

[0093] In this embodiment, if an update instruction for the target data corresponding to the data request instruction is received, the target data in the IndexDB warehouse is updated to cache the latest target data.

[0094] Reference Figure 3 , Figure 3 It is a schematic diagram of the device structure of the hardware operating environment involved in the embodiment of the present invention.

[0095] The browser front-end data storage device in the embodiment of the present invention can be a PC, or a terminal device such as a smart phone, a tablet computer, or a portable computer.

[0096] like Figure 3As shown, the browser front-end data storage device may include: a processor 1001, such as a CPU, a memory 1005, and a communication bus 1002. Communication bus 1002 is used to implement communication between processor 1001 and memory 1005. Memory 1005 may be a high-speed RAM memory or a non-volatile memory, such as a disk storage device. Memory 1005 may also optionally be a storage device independent of processor 1001.

[0097] Optionally, the browser front-end data storage device may further include a target user interface, a network interface, a camera, an RF (Radio Frequency) circuit, a sensor, an audio circuit, a WiFi module, and the like. The target user interface may include a display screen and an input unit such as a keyboard. Optionally, the target user interface may also include a standard wired interface or a wireless interface. The network interface may optionally include a standard wired interface or a wireless interface (such as a WiFi interface).

[0098] Those skilled in the art will understand that Figure 3 The browser front-end data storage device structure shown in does not constitute a limitation on the browser front-end data storage device, and may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently.

[0099] like Figure 3 As shown, the memory 1005, which is a computer storage medium, may include an operating system, a network communication module, and a browser front-end data storage program. The operating system is a program that manages and controls the hardware and software resources of the browser front-end data storage device and supports the operation of the browser front-end data storage program and other software and / or programs. The network communication module is used to implement communication between the various components within the memory 1005, as well as communication with other hardware and software in the browser front-end data storage device.

[0100] exist Figure 3 In the browser front-end data storage device shown, the processor 1001 is used to execute the browser front-end data storage program stored in the memory 1005 to implement the steps of any of the above-mentioned browser front-end data storage methods.

[0101] The specific implementation of the browser front-end data storage device of the present invention is basically the same as the various embodiments of the above-mentioned browser front-end data storage method, and will not be repeated here.

[0102] In addition, an embodiment of the present invention further provides a browser front-end data storage device. The present invention further provides a browser front-end data storage device, wherein an IndexDB warehouse is set up in a browser local database, and an independent data table is established in the IndexDB warehouse based on the functional modules of the browser front-end page. The browser front-end data storage device includes:

[0103] A first judgment module is used to judge whether the IndexDB warehouse is an empty warehouse when a data request instruction is detected;

[0104] A second judgment module is configured to judge whether the independent data table caches the target data corresponding to the data request instruction if the IndexDB warehouse is not an empty warehouse;

[0105] The first acquisition module is configured to acquire the target data corresponding to the data request instruction if the independent data table has the target data cached therein, and render the target data into a page to be displayed.

[0106] Optionally, the browser front-end data storage device further includes:

[0107] A second acquisition module is configured to acquire target data corresponding to the data request instruction from a server corresponding to the browser if the IndexDB warehouse is empty;

[0108] The cache module is used to render the target data into an initialized page to be displayed, and cache the target data in the IndexDB warehouse.

[0109] Optionally, the cache module includes:

[0110] an acquisition unit, configured to acquire a homologous page where the target data is located under a homologous policy, and acquire a target functional module where the target data is located on the homologous page;

[0111] The cache unit is used to cache the target data in the target data table corresponding to the IndexDB warehouse based on the preset association relationship between the target functional module and the independent data table.

[0112] Optionally, the browser front-end data storage device further includes:

[0113] A saving unit is used to save the data corresponding to the page after the operation in the IndexDB warehouse when an operation of editing the page of the browser is received, wherein the data corresponding to the page after the operation includes the content of tags, log information, historical records, global variable information, custom table field information, and function information.

[0114] Optionally, the browser front-end data storage device further includes:

[0115] A third acquisition module is configured to, when a clear instruction for clearing data in the IndexDB warehouse is detected, obtain the content to be cleared carried in the clear instruction;

[0116] The clearing module is used to clear the content to be cleared.

[0117] Optionally, the browser front-end data storage device further includes:

[0118] a detection module configured to, upon detecting an operation event on a functional module in the IndexDB warehouse, determine whether the operation event is a coupled operation event;

[0119] The decoupling processing module is used to decouple other functional modules based on the decoupling method preset in the IndexDB warehouse if the operation event is a coupled operation event.

[0120] Optionally, the browser front-end data storage device further includes:

[0121] The update processing module is used to update the target data in the IndexDB warehouse if an update instruction for the target data corresponding to the data request instruction is received.

[0122] The specific implementation of the browser front-end data storage device of the present invention is basically the same as the various embodiments of the above-mentioned browser front-end data storage method, and will not be repeated here.

[0123] In addition, an embodiment of the present invention also proposes a browser front-end data storage device, which includes: a memory 109, a processor 110, and a browser front-end data storage program stored on the memory 109 and capable of running on the processor 110. When the browser front-end data storage program is executed by the processor 110, the steps of each embodiment of the above-mentioned browser front-end data storage method are implemented.

[0124] In addition, the present invention also provides a computer-readable storage medium, which stores one or more programs. The one or more programs can also be executed by one or more processors to implement the steps of each embodiment of the above-mentioned browser front-end data storage method.

[0125] The expanded contents of the specific implementation methods of the device and readable storage medium (ie, computer-readable storage medium) of the present invention are basically the same as those of the above-mentioned browser front-end data storage method embodiments, and are not described in detail here.

[0126] It should be noted that, in this document, the terms "comprises," "includes," or any other variations thereof are intended to encompass non-exclusive inclusion, such that a process, method, article, or apparatus comprising a series of elements includes not only those elements but also other elements not explicitly listed, or elements inherent to such process, method, article, or apparatus. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of other identical elements in the process, method, article, or apparatus comprising the element.

[0127] The serial numbers of the above embodiments of the present invention are for description only and do not represent the advantages or disadvantages of the embodiments.

[0128] Through the description of the above embodiments, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus the necessary general hardware platform, and of course can also be implemented by hardware, but in many cases the former is a better embodiment. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes a number of instructions for enabling a terminal (which can be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in each embodiment of the present invention.

[0129] The embodiments of the present invention are described above in conjunction with the accompanying drawings, but the present invention is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the guidance of the present invention, ordinary technicians in this field can also make many forms without departing from the scope of protection of the present invention and the claims, all of which are protected by the present invention.

Claims

1. A browser front-end data storage method, characterized in that: An IndexDB warehouse is set in the browser local database, and an independent data table is established in the IndexDB warehouse based on the functional module of the browser front-end page. The browser front-end data storage method includes: When a data request instruction is detected, determining whether the IndexDB warehouse is an empty warehouse; If the IndexDB warehouse is not an empty warehouse, determining whether the independent data table caches the target data corresponding to the data request instruction; If the independent data table caches the target data corresponding to the data request instruction, obtaining the target data and rendering the target data into a page to be displayed; The independent data tables established in the IndexDB warehouse based on the functional modules of the browser front-end page include: Create a bdp-ide warehouse with a project structure under the IndexDB warehouse, and create an independent data table with a functional module as the structural unit. The independent data table contains the specific content of the corresponding functional module; If the independent data table caches the target data corresponding to the data request instruction, then after obtaining the target data and rendering the target data into a page to be displayed, the method further includes: If an operation event on a functional module in the IndexDB warehouse is detected, determining whether the operation event is a coupled operation event; If the operation event is a coupled operation event, other functional modules are decoupled based on the decoupling method preset in the IndexDB warehouse.

2. The browser front-end data storage method according to claim 1, wherein: After the step of determining whether the IndexDB warehouse is empty when a data request instruction is detected, the following steps are performed: If the IndexDB warehouse is empty, obtaining the target data corresponding to the data request instruction from the server corresponding to the browser; The target data is rendered into an initialized page to be displayed, and the target data is cached in the IndexDB warehouse.

3. The browser front-end data storage method according to claim 2, wherein: The step of caching the target data in the IndexDB warehouse includes: Obtaining the same-origin page where the target data is located under the same-origin policy, and obtaining the target functional module where the target data is located on the same-origin page; Based on the preset association relationship between the target functional module and the independent data table, the target data is cached in the target data table corresponding to the IndexDB warehouse.

4. The browser front-end data storage method according to claim 1, wherein: If the independent data table caches the target data corresponding to the data request instruction, then after obtaining the target data and rendering the target data into a page to be displayed, the method further includes: If an operation of editing the page of the browser is received, the data corresponding to the page after the operation is saved in the IndexDB warehouse, wherein the data corresponding to the page after the operation includes the content of tags, log information, historical records, global variable information, custom table field information, and function information.

5. The browser front-end data storage method according to claim 1, wherein: If the independent data table caches the target data corresponding to the data request instruction, then after obtaining the target data and rendering the target data into a page to be displayed, the method further includes: If a clear instruction to clear the data in the IndexDB warehouse is detected, obtaining the content to be cleared carried in the clear instruction; Clear the content to be cleared.

6. The browser front-end data storage method according to any one of claims 1 to 5, characterized in that: If the independent data table caches the target data corresponding to the data request instruction, then obtaining the target data and rendering the target data into a page to be displayed includes: If an update instruction for the target data corresponding to the data request instruction is received, the target data in the IndexDB warehouse is updated.

7. A browser front-end data storage device, characterized in that: An IndexDB warehouse is set in the browser local database. The IndexDB warehouse has a bdp-ide warehouse with a project structure and independent data tables with the functional modules of the browser front-end page as structural units. The independent data tables contain specific content of the corresponding functional modules. The browser front-end data storage device includes: A first judgment module is used to judge whether the IndexDB warehouse is an empty warehouse when a data request instruction is detected; A second judgment module is configured to judge whether the independent data table caches the target data corresponding to the data request instruction if the IndexDB warehouse is not an empty warehouse; A first acquisition module is configured to acquire the target data corresponding to the data request instruction if the independent data table has the target data cached therein, and render the target data into a page to be displayed; a detection module configured to, upon detecting an operation event on a functional module in the IndexDB warehouse, determine whether the operation event is a coupled operation event; If the operation event is a coupled operation event, other functional modules are decoupled based on the decoupling method preset in the IndexDB warehouse.

8. A browser front-end data storage device, characterized in that: The device includes: a memory, a processor, and a browser front-end data storage program stored in the memory and runnable on the processor. When the browser front-end data storage program is executed by the processor, the steps of the browser front-end data storage method according to any one of claims 1 to 6 are implemented.

9. A readable storage medium, characterized in that: The readable storage medium stores a browser front-end data storage program, which, when executed by a processor, implements the steps of the browser front-end data storage method according to any one of claims 1 to 6.

10. A computer program product, characterized in that The computer program product stores instructions, and when a computer reads and executes the instructions, the computer is caused to perform the method according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • Page data acquiring method and device

    CN105786844A