CN110245156A - Caching data processing method and device - Google Patents
Caching data processing method and device Download PDFInfo
- Publication number
- CN110245156A CN110245156A CN201910455943.6A CN201910455943A CN110245156A CN 110245156 A CN110245156 A CN 110245156A CN 201910455943 A CN201910455943 A CN 201910455943A CN 110245156 A CN110245156 A CN 110245156A
- Authority
- CN
- China
- Prior art keywords
- html5 page
- data cached
- request
- data
- html5
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/24—Querying
- G06F16/245—Query processing
- G06F16/2455—Query execution
- G06F16/24552—Database cache management
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/90—Details of database functions independent of the retrieved data types
- G06F16/95—Retrieval from the web
- G06F16/955—Retrieval from the web using information identifiers, e.g. uniform resource locators [URL]
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/90—Details of database functions independent of the retrieved data types
- G06F16/95—Retrieval from the web
- G06F16/957—Browsing optimisation, e.g. caching or content distillation
- G06F16/9574—Browsing optimisation, e.g. caching or content distillation of access to content, e.g. by caching
Abstract
The present invention discloses a kind of caching data processing method and device, the storage and obtain data cached method that the HTML5 page can call are provided by client, when the HTML5 page needs memory buffers data, the data cached are needed to parse by way of Key-Value the HTML5 page, and after being associated with the domain name by the HTML5 page acquired in uniform resource locator, store into local data base;When the HTML5 page needs to obtain data cached, the data cached corresponding Key value provided according to the HTML5 page, and the uniform resource locator of the HTML5 page, in the local database after query caching data, the HTML5 page is returned to by data cached, and this method is simple, effectively, can be realized in HTML5 page cache data cross-domain and across agreement, development cost is low, is suitble to the various complex interaction scenes of mobile client and the HTML5 page.
Description
Technical field
The present invention relates to field of computer technology more particularly to a kind of caching data processing methods and device.
Background technique
With the rapid development of development of Mobile Internet technology, various diversification application program (English: Application, contracting
Write: App) meet the demands of the various scenes such as people's communication, social, study, work.In the App of mobile terminal, often use
Certain functions are realized to HTML5 webpage.
HTML5 abbreviation H5, it is a kind of advanced web technologies, compares H4, and H5 can be realized the functions such as more interactions, most
Big advantage first is that supporting multimedia on the mobile apparatus.During realizing these functions using HTML5 webpage, HTML5
Webpage needs to cache some necessary datas.In HTML5 have a LocalStorage characteristic, this characteristic primarily as
It is locally stored to use, solves the problems, such as cookie memory space inadequate.
But a problem existing for LocalStorage local storage function be cannot cross-domain name, across agreement use.Mesh
Before, typically more complicated for this solution to the problem, efficiency is relatively low, and is poorly suited for use in mobile terminal
App exploitation.
Summary of the invention
The present invention provides a kind of caching data processing method and device, with solve HTML5 webpage in the App of mobile terminal need it is slow
When depositing some necessary datas, LocalStorage local storage function cannot cross-domain name, across agreement use the problem of.
In a first aspect, the present invention provides a kind of caching data processing method, which comprises
Receive the request of HTML5 page memory buffers data;
Need the data that cache to parse by way of Key-Value the HTML5 page, and with pass through unification
The domain name of the HTML5 page acquired in Resource Locator is associated;
The data cached are needed to store into local data base the HTML5 page;
It receives the HTML5 page and obtains the data cached request, the request carries described data cached corresponding
Key value;
According to the data cached corresponding Key value and the uniform resource locator of the HTML5 page, described
It is inquired in local data base described data cached;
Data cached the HTML5 page is returned to for described.
With reference to first aspect, the first in first aspect can receive HTML5 page memory buffers data in realization mode
Request the step of in, receive HTML5 page invocation client provide setStorageItem method request.
With reference to first aspect the first can realize mode, described in second of achievable mode of first aspect
In the request for the setStorageItem method that HTML5 page invocation client provides, parameter is that HTML5 page needs are deposited
That stores up is data cached.
With reference to first aspect, the third in first aspect can receive the HTML5 page and obtain the caching in realization mode
In the step of request of data, the request carries the data cached corresponding Key value, HTML5 page invocation visitor is received
The request for the getStorageItem method that family end provides.
With reference to first aspect the third can realize mode, described in the 4th kind of achievable mode of first aspect
In the request for the getStorageItem method that HTML5 page invocation client provides, parameter is that HTML5 page needs obtain
The data cached corresponding Key value taken.
Second aspect, the present invention provide a kind of data cached processing unit, and described device includes:
Receiving unit, for receiving the request of HTML5 page memory buffers data;
Resolution unit, for needing the data cached to solve by way of Key-Value the HTML5 page
Analysis, and be associated with the domain name by the HTML5 page acquired in uniform resource locator;
Storage unit, for needing the data cached to store into local data base the HTML5 page;
The receiving unit is also used to receive the HTML5 page and obtains the data cached request, and the request carries
The data cached corresponding Key value;
Query unit, for the unified resource according to the data cached corresponding Key value and the HTML5 page
Finger URL is inquired described data cached in the local data base;
Return unit, for data cached returning to the HTML5 page for described.
In conjunction with second aspect, the first in second aspect can be in realization mode, the receiving unit, for receiving
The request for the setStorageItem method that HTML5 page invocation client provides.
The first in conjunction with second aspect can realize mode, described in second of achievable mode of second aspect
In the request for the setStorageItem method that HTML5 page invocation client provides, parameter is that HTML5 page needs are deposited
That stores up is data cached.
In conjunction with second aspect, the third in second aspect can be in realization mode, and the receiving unit is used for HTML5 pages
The request for the getStorageItem method that face calls client to provide.
The third in conjunction with second aspect can realize mode, described in the 4th kind of achievable mode of second aspect
In the request for the getStorageItem method that HTML5 page invocation client provides, parameter is that HTML5 page needs obtain
The data cached corresponding Key value taken.
From the above technical scheme, caching data processing method and device provided by the invention, are provided by client
The storage and obtain data cached method that the HTML5 page can call will when the HTML5 page needs memory buffers data
The HTML5 page needs the data cached to be parsed by way of Key-Value, and is obtained with by uniform resource locator
After the domain name of the HTML5 page taken is associated, store into local data base;It needs to obtain in the HTML5 page data cached
When, the uniform resource locator of the data cached corresponding Key value and the HTML5 page that are provided according to the HTML5 page, at this
In ground database after query caching data, the HTML5 page is returned to by data cached, this method is simple, effective, at HTML5 pages
It can be realized cross-domain and across agreement when face is data cached, development cost is low, is suitble to the various multiple of mobile client and the HTML5 page
Miscellaneous interaction scenarios.
Detailed description of the invention
In order to illustrate more clearly of technical solution of the present invention, letter will be made to attached drawing needed in the embodiment below
Singly introduce, it should be apparent that, for those of ordinary skills, without any creative labor,
It is also possible to obtain other drawings based on these drawings.
Fig. 1 is the flow chart of caching data processing method provided in an embodiment of the present invention.
Fig. 2 is the signal of HTML5 page memory buffers data in caching data processing method provided in an embodiment of the present invention
Figure.
Fig. 3 is that the HTML5 page obtains data cached signal in caching data processing method provided in an embodiment of the present invention
Figure.
Fig. 4 is the schematic diagram of data cached processing unit provided in an embodiment of the present invention.
Specific embodiment
To make the object, technical solutions and advantages of the present invention clearer, below in conjunction with the specific embodiment of the invention and
Technical solution of the present invention is clearly and completely described in corresponding attached drawing.Obviously, described embodiment is only the present invention one
Section Example, instead of all the embodiments.Based on the embodiments of the present invention, those of ordinary skill in the art are not doing
Every other embodiment obtained under the premise of creative work out, shall fall within the protection scope of the present invention.Below in conjunction with attached drawing,
The technical solution that each embodiment that the present invention will be described in detail provides.
It please refers to Fig.1 to Fig.3, is a kind of flow chart of caching data processing method provided in an embodiment of the present invention, the party
The executing subject of method can be client, store and obtain data cached, the party for realizing the HTML5 page of mobile terminal App
Method may comprise steps of:
Step S101, client receive the request of HTML5 page memory buffers data.
In the present embodiment, client can provide storage (setStorageItem) that the HTML5 page can call and
Obtain (getStorageItem) data cached JsBridge method.When the HTML5 page needs memory buffers data,
In the setStorageItem method for calling client to provide, also, parameter is the caching number that the HTML5 page needs to store
According to.
The HTML5 page is needed the data cached to solve by way of Key-Value by step S102, client
Analysis, and be associated with the domain name by the HTML5 page acquired in uniform resource locator.
The HTML5 page is needed the data cached to store into local data base by step S103, client.
Step S104, client receive the HTML5 page and obtain the data cached request, and the request carries described
Data cached corresponding Key value.
In the present embodiment, when the HTML5 page need obtain before store it is data cached when, client can be called to mention
The getStorageItem method of confession, also, parameter is the data cached corresponding Key value that the HTML5 page needs to obtain.
Step S105, client are provided according to the data cached corresponding Key value and the unified of the HTML5 page
Source finger URL is inquired described data cached in the local data base.
Step S106, client data cached return to the HTML5 page for described.
As seen from the above embodiment, caching data processing method provided by the invention provides the HTML5 page by client
The data cached method of the storage and acquisition that can be called, when the HTML5 page needs memory buffers data, by the HTML5 page
The data for needing to cache are parsed by way of Key-Value, and with pass through HTML5 acquired in uniform resource locator
After the domain name of the page is associated, store into local data base.
When the HTML5 page needs to obtain data cached, according to the HTML5 page provide data cached corresponding Key value,
And the uniform resource locator of the HTML5 page returns in the local database after query caching data by data cached
The HTML5 page, this method is simple, effectively, can be realized in HTML5 page cache data cross-domain and across agreement, development cost
It is low, it is suitble to the various complex interaction scenes of mobile client and the HTML5 page.
Referring to Fig. 4, being a kind of structural schematic diagram of data cached processing unit provided in an embodiment of the present invention, the dress
It sets and specifically includes:
Receiving unit 401, for receiving the request of HTML5 page memory buffers data.
Resolution unit 402, for needing the data cached to carry out by way of Key-Value the HTML5 page
Parsing, and be associated with the domain name by the HTML5 page acquired in uniform resource locator.
Storage unit 403, for needing the data cached to store into local data base the HTML5 page.
The receiving unit 401 is also used to receive the HTML5 page and obtains the data cached request, and the request is taken
With the data cached corresponding Key value.
Query unit 404, for being provided according to the data cached corresponding Key value and the unified of the HTML5 page
Source finger URL is inquired described data cached in the local data base.
Return unit 405, for data cached returning to the HTML5 page for described.
In the present embodiment, the receiving unit 401, for receiving the offer of HTML5 page invocation client
The getStorageItem method that the request of setStorageItem method and HTML5 page invocation client provide is asked
It asks.
In the present embodiment, in the request for the setStorageItem method that the HTML5 page invocation client provides,
Parameter stores data cached for HTML5 page needs.What the HTML5 page invocation client provided
In the request of getStorageItem method, parameter is the data cached corresponding Key value that the HTML5 page needs to obtain.
Each unit of a kind of data cached processing unit provided by the invention, with caching data processing method embodiment
Step corresponds, and for realizing above-mentioned caching data processing method, its advantages can be found in caching data processing method
Beneficial effect, details are not described herein again.
The embodiment of the present invention also provides a kind of storage medium, and the embodiment of the present invention also provides a kind of storage medium, described to deposit
Computer program is stored in storage media, the computer program is realized provided by the invention data cached when being executed by processor
Step some or all of in each embodiment of processing method.The storage medium can be magnetic disk, CD, read-only store-memory
Body (English: Read-OnlyMemory, referred to as: ROM) or random access memory (English: RandomAccessMemory, letter
Claim: RAM) etc..
It is required that those skilled in the art can be understood that the technology in the embodiment of the present invention can add by software
The mode of general hardware platform realize.Based on this understanding, the technical solution in the embodiment of the present invention substantially or
Say that the part that contributes to existing technology can be embodied in the form of software products, which can deposit
Storage is in storage medium, such as ROM/RAM, magnetic disk, CD, including some instructions are used so that computer equipment (can be with
It is personal computer, server or the network equipment etc.) execute certain part institutes of each embodiment of the present invention or embodiment
The method stated.
Same and similar part may refer to each other between each embodiment in this specification.Especially for data cached
For processing device embodiment, since it is substantially similar to the method embodiment, so be described relatively simple, related place referring to
Explanation in embodiment of the method.
Invention described above embodiment is not intended to limit the scope of the present invention..
Claims (10)
1. a kind of caching data processing method, which is characterized in that the described method includes:
Receive the request of HTML5 page memory buffers data;
Need the data that cache to parse by way of Key-Value the HTML5 page, and with pass through unified resource
The domain name of the HTML5 page acquired in finger URL is associated;
The data cached are needed to store into local data base the HTML5 page;
It receives the HTML5 page and obtains the data cached request, the request carries the data cached corresponding Key
Value;
According to the data cached corresponding Key value and the uniform resource locator of the HTML5 page, in the local
It is inquired in database described data cached;
Data cached the HTML5 page is returned to for described.
2. the method as described in claim 1, which is characterized in that the step of receiving the request of HTML5 page memory buffers data
In, receive the request for the setStorageItem method that HTML5 page invocation client provides.
3. method according to claim 2, which is characterized in that the HTML5 page invocation client provided
In the request of setStorageItem method, parameter stores data cached for HTML5 page needs.
4. the method as described in claim 1, which is characterized in that receive the HTML5 page and obtain the data cached request, institute
It states in the step of request carries the data cached corresponding Key value, receives what HTML5 page invocation client provided
The request of getStorageItem method.
5. method as claimed in claim 4, which is characterized in that the HTML5 page invocation client provided
In the request of getStorageItem method, parameter is the data cached corresponding Key value that the HTML5 page needs to obtain.
6. a kind of data cached processing unit, which is characterized in that described device includes:
Receiving unit, for receiving the request of HTML5 page memory buffers data;
Resolution unit, for needing the data cached to parse by way of Key-Value the HTML5 page, and
It is associated with the domain name by the HTML5 page acquired in uniform resource locator;
Storage unit, for needing the data cached to store into local data base the HTML5 page;
The receiving unit is also used to receive the HTML5 page and obtains the data cached request, and the request carries described
Data cached corresponding Key value;
Query unit, for being positioned according to the data cached corresponding Key value and the unified resource of the HTML5 page
Symbol, is inquired described data cached in the local data base;
Return unit, for data cached returning to the HTML5 page for described.
7. device as claimed in claim 6, which is characterized in that the receiving unit, for receiving HTML5 page invocation client
The request of the setStorageItem method provided is provided.
8. device as claimed in claim 7, which is characterized in that the HTML5 page invocation client provided
In the request of setStorageItem method, parameter stores data cached for HTML5 page needs.
9. device as claimed in claim 6, which is characterized in that the receiving unit is mentioned for HTML5 page invocation client
The request of the getStorageItem method of confession.
10. device as claimed in claim 9, which is characterized in that the HTML5 page invocation client provided
In the request of getStorageItem method, parameter is the data cached corresponding Key value that the HTML5 page needs to obtain.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910455943.6A CN110245156A (en) | 2019-05-29 | 2019-05-29 | Caching data processing method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910455943.6A CN110245156A (en) | 2019-05-29 | 2019-05-29 | Caching data processing method and device |
Publications (1)
Publication Number | Publication Date |
---|---|
CN110245156A true CN110245156A (en) | 2019-09-17 |
Family
ID=67885402
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910455943.6A Pending CN110245156A (en) | 2019-05-29 | 2019-05-29 | Caching data processing method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN110245156A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112286545A (en) * | 2020-09-21 | 2021-01-29 | 长沙市到家悠享网络科技有限公司 | Data updating method, device, equipment and storage medium |
Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20150127838A1 (en) * | 2013-11-06 | 2015-05-07 | Huawei Device Co., Ltd. | Page Operation Processing Method and Apparatus, and Terminal |
CN107070870A (en) * | 2017-01-09 | 2017-08-18 | 阿里巴巴集团控股有限公司 | A kind of data capture method and device |
CN107329963A (en) * | 2016-04-29 | 2017-11-07 | 北京京东尚科信息技术有限公司 | Accelerate the method and apparatus of web page access |
CN108021593A (en) * | 2016-11-03 | 2018-05-11 | 北京金山云网络技术有限公司 | A kind of information transmitting methods, device and browser |
CN108170745A (en) * | 2017-12-20 | 2018-06-15 | 福建网龙计算机网络信息技术有限公司 | It is a kind of to access web terminal data cached method and terminal |
CN108932238A (en) * | 2017-05-23 | 2018-12-04 | 北京金山云网络技术有限公司 | A kind of cross-domain communication method and device |
CN108964975A (en) * | 2018-05-30 | 2018-12-07 | 北京五八信息技术有限公司 | Cross-domain access processing method and device |
-
2019
- 2019-05-29 CN CN201910455943.6A patent/CN110245156A/en active Pending
Patent Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20150127838A1 (en) * | 2013-11-06 | 2015-05-07 | Huawei Device Co., Ltd. | Page Operation Processing Method and Apparatus, and Terminal |
CN107329963A (en) * | 2016-04-29 | 2017-11-07 | 北京京东尚科信息技术有限公司 | Accelerate the method and apparatus of web page access |
CN108021593A (en) * | 2016-11-03 | 2018-05-11 | 北京金山云网络技术有限公司 | A kind of information transmitting methods, device and browser |
CN107070870A (en) * | 2017-01-09 | 2017-08-18 | 阿里巴巴集团控股有限公司 | A kind of data capture method and device |
CN108932238A (en) * | 2017-05-23 | 2018-12-04 | 北京金山云网络技术有限公司 | A kind of cross-domain communication method and device |
CN108170745A (en) * | 2017-12-20 | 2018-06-15 | 福建网龙计算机网络信息技术有限公司 | It is a kind of to access web terminal data cached method and terminal |
CN108964975A (en) * | 2018-05-30 | 2018-12-07 | 北京五八信息技术有限公司 | Cross-domain access processing method and device |
Non-Patent Citations (1)
Title |
---|
唐帅: "基于移动Web的"认我测"质检服务平台的设计与实现", 《中国优秀硕士学位论文全文数据库(信息科技辑)》 * |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112286545A (en) * | 2020-09-21 | 2021-01-29 | 长沙市到家悠享网络科技有限公司 | Data updating method, device, equipment and storage medium |
CN112286545B (en) * | 2020-09-21 | 2023-05-05 | 长沙市到家悠享网络科技有限公司 | Data updating method, device, equipment and storage medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110149423B (en) | Domain name processing method and device, readable storage medium and electronic equipment | |
US8527862B2 (en) | Methods for making ajax web applications bookmarkable and crawlable and devices thereof | |
US8255921B2 (en) | Method and apparatus that enables a web-based client-server application to be used offline | |
CN106294365A (en) | The page data processing method of a kind of single page web application and equipment | |
CN107391664A (en) | Page data processing method and system based on WEB | |
CN103685304A (en) | Method and system for sharing session information | |
CN107291913B (en) | Hypertext markup language webpage loading method and device | |
CN107343031A (en) | A kind of method, apparatus for automatically updating file, electronic equipment and storage medium | |
CN108366058A (en) | Method, apparatus, equipment and the storage medium for preventing advertisement operators flow from kidnapping | |
CN109634753B (en) | Data processing method, device, terminal and storage medium for switching browser kernels | |
CN104113567A (en) | Content distribution network data processing method, device and system | |
US10594764B2 (en) | Request cache to improve web applications performance | |
CN105868234A (en) | Update method and device of caching data | |
CN107613040A (en) | A kind of method and apparatus of domain name system DNS server lookup | |
CN105516333A (en) | Interactive method and system based on webpage | |
US20230161766A1 (en) | Data investigation and visualization system | |
CN104008096B (en) | A kind of application operating method and apparatus based on browser | |
CN108200127A (en) | Data transmission method for uplink, device, server, terminal and storage medium | |
CN110245156A (en) | Caching data processing method and device | |
CN110020297A (en) | A kind of loading method of web page contents, apparatus and system | |
US7340521B1 (en) | Method for routing a request over a network to a content source that can most advantageous serve the request | |
CN108197979A (en) | A kind of user information obtains and determines method and apparatus | |
US10394628B1 (en) | In-line event handlers across domains | |
CN112988803B (en) | Cache transformation method and device for micro-service system service and computing equipment | |
CN113127010B (en) | Application management method and device, electronic equipment and storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20190917 |