CN109446457A - Update method, terminal device and the medium of page data - Google Patents

Update method, terminal device and the medium of page data Download PDF

Info

Publication number
CN109446457A
CN109446457A CN201811114997.8A CN201811114997A CN109446457A CN 109446457 A CN109446457 A CN 109446457A CN 201811114997 A CN201811114997 A CN 201811114997A CN 109446457 A CN109446457 A CN 109446457A
Authority
CN
China
Prior art keywords
page
data
key
mobile application
value pair
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201811114997.8A
Other languages
Chinese (zh)
Inventor
梁承飞
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Ping An Puhui Enterprise Management Co Ltd
Original Assignee
Ping An Puhui Enterprise Management Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Ping An Puhui Enterprise Management Co Ltd filed Critical Ping An Puhui Enterprise Management Co Ltd
Priority to CN201811114997.8A priority Critical patent/CN109446457A/en
Publication of CN109446457A publication Critical patent/CN109446457A/en
Pending legal-status Critical Current

Links

Landscapes

  • Information Transfer Between Computers (AREA)

Abstract

The present invention is suitable for Internet technical field, provides update method, terminal device and the medium of a kind of page data, this method comprises: obtaining the exploitation code of mobile application, and data receiver interface and data callback interface is added in exploitation code;The determining and associated each H5 page of mobile application;The page code of every H5 page is obtained, and module is monitored in addition in page code, monitors the key-value pair information that module is used to monitor the H5 page, key-value pair information includes key assignments corresponding to each page control;Start mobile application based on control instruction, and by data receiver interface, obtains and monitor the key-value pair information that module returns;By data callback interface, key-value pair information is synchronized to associated each H5 page, so that the H5 page for receiving key-value pair information is updated its page data.The present invention realizes the data synchronization updating between multiple H5 pages, greatly improves the Refresh Data effect of the H5 page, maintains the consistency of page data.

Description

Update method, terminal device and the medium of page data
Technical field
The invention belongs to Internet technical field more particularly to a kind of update methods of page data, terminal device and meter Calculation machine readable storage medium storing program for executing.
Background technique
With the continuous development of Internet technology, in order to enable mobile device more can neatly support all kinds of more matchmakers Body is convenient for developer's Web- Designing interaction effect, completes currently, World Wide Web Consortium has been formulated about hypertext markup language The standard criterion of (Hyper Text Mark-up Language, Html) 5.
In the prior art, Html5 is often used in the webpage web page of exploitation mobile application, then such page is H5 pages Face.Dynamic interaction effect provided by the H5 page can be experienced since user need not download the additional third party software of installation, Thus the H5 page has obtained better development for the traditional Html page.
For the Mobile operating system of Apple Inc.'s exploitation, in order to browse H5 webpage, exploitation in its mobile application Personnel would generally in mobile application built-in UIWebview control.Based on the functional characteristic of UIWebview control, terminal user Multiple H5 pages can be accessed simultaneously in mobile application.However, due to being independent from each other between each H5 page, Gu Dangqi In the page data of H5 page when changing, and data will not be generated between other H5 pages for running simultaneously, Thus it may result in the case where same parameters correspond to different numerical value in each H5 page generation, thus also result in movement and answer With there is the problem of data perturbation.
Summary of the invention
It can in view of this, the embodiment of the invention provides a kind of update method of page data, terminal device and computers Storage medium being read, to solve in the prior art, leading to mobile application because cannot achieve the synchronization of the data between multiple H5 pages There is the problem of data perturbation.
The first aspect of the embodiment of the present invention provides a kind of update method of page data, comprising:
The exploitation code of mobile application is obtained, and adds data receiver interface and data readjustment in the exploitation code Interface;
The determining and associated each H5 page of the mobile application, the H5 page are using hypertext markup language the 5th The page that secondary material alteration HTML5 writes;
The page code of each H5 page is obtained, and module, the monitoring are monitored in addition in the page code Module is used to monitor the key-value pair information of the H5 page, and the key-value pair information includes key corresponding to each page control Value;
Start the mobile application based on control instruction, and by the data receiver interface, obtains the monitoring module The key-value pair information returned;
By the data callback interface, the key-value pair information is synchronized to each described of the association mobile application The H5 page, so that the H5 page for receiving the key-value pair information carries out real-time update to its page data.
The second aspect of the embodiment of the present invention provides a kind of terminal device, including memory and processor, described to deposit Reservoir is stored with the computer program that can be run on the processor, which is characterized in that the processor executes the calculating Following steps are realized when machine program:
The exploitation code of mobile application is obtained, and adds data receiver interface and data readjustment in the exploitation code Interface;
The determining and associated each H5 page of the mobile application, the H5 page are using hypertext markup language the 5th The page that secondary material alteration HTML5 writes;
The page code of each H5 page is obtained, and module, the monitoring are monitored in addition in the page code Module is used to monitor the key-value pair information of the H5 page, and the key-value pair information includes key corresponding to each page control Value;
Start the mobile application based on control instruction, and by the data receiver interface, obtains the monitoring module The key-value pair information returned;
By the data callback interface, the key-value pair information is synchronized to each described of the association mobile application The H5 page, so that the H5 page for receiving the key-value pair information carries out real-time update to its page data.
The third aspect of the embodiment of the present invention provides a kind of computer readable storage medium, the computer-readable storage Media storage has computer program, and the computer program realizes following steps when being executed by processor:
The exploitation code of mobile application is obtained, and adds data receiver interface and data readjustment in the exploitation code Interface;
The determining and associated each H5 page of the mobile application, the H5 page are using hypertext markup language the 5th The page that secondary material alteration HTML5 writes;
The page code of each H5 page is obtained, and module, the monitoring are monitored in addition in the page code Module is used to monitor the key-value pair information of the H5 page, and the key-value pair information includes key corresponding to each page control Value;
Start the mobile application based on control instruction, and by the data receiver interface, obtains the monitoring module The key-value pair information returned;
By the data callback interface, the key-value pair information is synchronized to each described of the association mobile application The H5 page, so that the H5 page for receiving the key-value pair information carries out real-time update to its page data.
In the embodiment of the present invention, module is monitored by adding in the page code of the H5 page, ensure that every H5 page In its operational process, the key-value pair information in its page can be monitored in real time;By in advance by data receiver Interface and data callback interface make an addition in the exploitation code of mobile application, when so that mobile application being in starting state, energy It is enough based on the data receiver interface, receives the page data that the monitoring module of each H5 page dynamically returns, and be based on data The callback function of callback interface, by other H5 pages of above-mentioned page data active transmission into mobile application.It is thereby achieved that Data synchronization updating between multiple H5 pages greatly improves the Refresh Data effect of the H5 page, maintains page data Consistency, avoid page data and get muddled.
Detailed description of the invention
It to describe the technical solutions in the embodiments of the present invention more clearly, below will be to embodiment or description of the prior art Needed in attached drawing be briefly described, it should be apparent that, the accompanying drawings in the following description is only of the invention some Embodiment for those of ordinary skill in the art without any creative labor, can also be according to these Attached drawing obtains other attached drawings.
Fig. 1 is the implementation flow chart of the update method of page data provided in an embodiment of the present invention;
Fig. 2 is the specific implementation flow chart of the update method S102 of page data provided in an embodiment of the present invention;
Fig. 3 is the specific implementation flow chart of the update method S105 of page data provided in an embodiment of the present invention;
Fig. 4 is the specific implementation flow chart of the update method S101 of page data provided in an embodiment of the present invention;
Fig. 5 be another embodiment of the present invention provides page data update method implementation flow chart;
Fig. 6 is the structural block diagram of the updating device of page data provided in an embodiment of the present invention;
Fig. 7 is the schematic diagram of terminal device provided in an embodiment of the present invention.
Specific embodiment
In being described below, for illustration and not for limitation, the tool of such as particular system structure, technology etc is proposed Body details, to understand thoroughly the embodiment of the present invention.However, it will be clear to one skilled in the art that there is no these specific The present invention also may be implemented in the other embodiments of details.In other situations, it omits to well-known system, device, electricity The detailed description of road and method, in case unnecessary details interferes description of the invention.
In order to illustrate technical solutions according to the invention, the following is a description of specific embodiments.
Fig. 1 shows the implementation process of the method for summary of list data provided in an embodiment of the present invention, this method process packet Include step S101 to S105.The specific implementation principle of each step is as follows:
S101: obtaining the exploitation code of mobile application, and data receiver interface and number are added in the exploitation code According to callback interface.
In the embodiment of the present invention, data receiver interface and data callback interface be developer using program language come The code interface function write.Wherein, data receiver interface is used to receive external incoming data information, and data callback interface is used It is responded in the data information received, which is pulled back into other pages.
In the embodiment of the present invention, for the mobile application comprising multiple H5 pages, to the exploitation code of the mobile application into Row load.According to the Code Edit instruction received, by above-mentioned about data receiver interface and the code of data callback interface Interface function is added in the exploitation code of mobile application.
S102: the determining and associated each H5 page of the mobile application, the H5 page are using hypertext markup language Say the page that the 5th material alteration HTML5 writes.
In the embodiment of the present invention, dissection process is carried out to the exploitation code of mobile application, is closed with determining with the mobile application Each H5 page of connection.Specifically, it according to preset regular expression, is detected in exploitation code and the regular expression The code line matched, and position the html label pair being located at after the code line.Wherein, above-mentioned regular expression is for describing H5 pages Doctype corresponding to face;Above-mentioned html label to for<html>and</html>.Every html label that positioning is obtained Page code between is determined as the page code with the associated H5 page of mobile application.
As an embodiment of the present invention, Fig. 2 shows the update methods of page data provided in an embodiment of the present invention The specific implementation flow of S102, details are as follows:
S1021: in the exploitation code of the mobile application, according to the preset and matched canonical table of webpage view control Up to formula, each webpage view control corresponding with the regular expression is searched.
In the embodiment of the present invention, webpage view (WebView) control is the control for rendering web page.In order to move It can show that the WebView control is previously written in exploitation code for calling this in the operational process of dynamic application The power function of WebView control.The power function as corresponding to WebView control is library provided by Integrated Development Environment Function, therefore power function satisfaction specifically writes specification.In the embodiment of the present invention, writing with this for developer's input is obtained The regular expression of specification matching can be found out corresponding each then according to the regular expression from the exploitation code of mobile application The power function of a WebView control.
S1022: the property parameters of the webpage view control are obtained, and determine that the webpage regards based on the property parameters The storage catalogue called needed for figure control.
In the power function for searching obtained every WebView control, its every property parameters for being included is read, and According to the uniform resource locator (Uniform Resource Locator, URL) in property parameters, WebView control is determined Associated storage catalogue.
S1023: searching each hypertext markup language html file under the storage catalogue, and by each of these Html file is determined as and the associated H5 page of the mobile application.
In the embodiment of the present invention, the display page of the affiliated terminal of current mobile application is jumped, is determined with entering Each storage catalogue in.Each file for being included to storage catalogue detects, and reads the expansion of above-mentioned each file Name is opened up, and finds out the file for wherein extending entitled " .html " or " .htm ", then the file found out is html file.
Since html file is performed, a corresponding page will be shown in the WebView control of mobile application, because This, each html file found out is determined as and the associated H5 page of mobile application.
Further, the html file found out is read out, reads all kinds of web page tags that html file is included. If detect in the web page tag there are with the not associated web page tag of the H5 page, it is determined that the html file be non-H5 pages Face at this point, reading next html file in storage catalogue, and returns to execute and reads all kinds of webpages that html file is included The operation of label.Wherein, it is instructed with the not associated web page tag of the H5 page according to the input of developer come preparatory typing, including But it is not limited to<center>,<basefont>,<acronym>and<big>the web page tag that equal HTML5 are not supported.If detection All kinds of web page tags for being included to html file are associated with the H5 page, it is determined that the html file is to be associated with mobile application The H5 page.
S103: obtaining the page code of each H5 page, and module is monitored in addition in the page code, described The key-value pair information that module is used to monitor the H5 page is monitored, the key-value pair information includes corresponding to each page control Key assignments.
In the embodiment of the present invention, monitoring module is the code function for executing monitor function.Determining mobile application After the associated H5 page, page generation is added to by reading its page code, and by the above-mentioned monitoring module pre-saved In code, it ensure that when being performed in mobile terminal the page code, the monitoring module can be called, thus to the H5 currently run The key-value pair information of the page is monitored.
Specifically, monitoring the corresponding function of realizing of module includes: every preset time interval, and detection is present in current Each page control in the H5 page, and identified according to the control of each page control, reading and control from background information library Identify corresponding real-time parameter value.In the embodiment of the present invention, each control is identified as a key name, and real-time parameter value is key name pair The key assignments answered, therefore, control mark and the corresponding relationship of its real-time parameter value are above-mentioned key-value pair information.
S104: the mobile application is started based on control instruction, and by the data receiver interface, obtains the monitoring The key-value pair information that module returns.
In the terminal device for being equipped with above-mentioned mobile application, the control for receiving user or the sending of third party's client refers to It enables, and above-mentioned mobile application is started according to the control instruction.Since mobile application is associated with multiple H5 pages, in terminal In equipment, while showing above-mentioned multiple H5 pages.
During the displaying of every H5 page, monitoring of the module by triggering to the key-value pair information of the H5 page is monitored. Based on monitor module and mobile application institute pre-added data receiver interface between data interaction, obtain monitor module institute in fact When the key-value pair information that returns.
S105: by the data callback interface, the key-value pair information is synchronized to each of the association mobile application A H5 page, so that the H5 page for receiving the key-value pair information carries out real-time update to its page data.
For the key-value pair information that the monitoring module of each H5 page is returned, by data callback interface, by the key Value to information real-time synchronization to the associated each H5 page of mobile application so that each H5 page can update with should The relevant page data of key-value pair information.
Preferably, it will only monitor the key-value pair information that module is returned and be synchronized to and be currently at each H5 pages of operating status Face.
Illustratively, if in the operational process of mobile application, 5 H5 pages is triggered based on the control instruction received Face, then when " test result " this field value in a wherein H5 page changes, which will call movement The data receiver interface of application, to be returned to the field value of updated " test result " by monitoring module.At this point, The field value is synchronized to remaining 4 H5 page by mobile application trigger data callback interface, thereby ensure that user check appoint When the one H5 page, the test result value for obtaining synchronized update can be checked.
In the embodiment of the present invention, module is monitored by adding in the page code of the H5 page, ensure that every H5 page In its operational process, the key-value pair information in its page can be monitored in real time;By in advance by data receiver Interface and data callback interface make an addition in the exploitation code of mobile application, when so that mobile application being in starting state, energy It is enough based on the data receiver interface, receives the page data that the monitoring module of each H5 page dynamically returns, and be based on data The callback function of callback interface, by other H5 pages of above-mentioned page data active transmission into mobile application.It is thereby achieved that Data synchronization updating between multiple H5 pages greatly improves the Refresh Data effect of the H5 page, maintains page data Consistency, avoid page data and get muddled.
As an embodiment of the present invention, Fig. 3 shows the update method of page data provided in an embodiment of the present invention The specific implementation flow of S105, details are as follows:
S1051: obtaining the corresponding source page of the key-value pair information, and determine in addition to the source page with institute State the associated H5 page of mobile application.
In the embodiment of the present invention, there are multiple and different page controls in the H5 page, and each page control has pair The key assignments answered therefore, will be with key name-key when key assignments to be transmitted to the data receiver interface of mobile application by monitoring module It is worth the form of this kind of key-value pair information to carry out data transmission.Also, in the data packet of transmission, it is marked with the page of the H5 page Face mark.
When receiving the data information that any monitoring module is returned, identify wherein entrained key name, key assignments with And page iden-tity.According to preset page iden-tity and H5 page corresponding relationship, determine H5 pages corresponding with the page iden-tity Face, and the H5 page is determined as the corresponding source page of current key-value pair information.
For the above-mentioned and associated each H5 page of mobile application, other H5 in addition to the source page are therefrom determined The page.
S1052: it is identified according to the page control that the key-value pair information is included, described H5 pages in each determined In face, detect whether there is page object relevant to page control mark.
To every H5 page in addition to source page, the page code of the H5 page is read, which is present in detection Each page object in the page.Page object includes but is not limited to page button, field, picture and Text Entry etc.. Each page object is corresponding with preset page control mark.
Key name, that is, page control mark in the embodiment of the present invention, in key-value pair information.In each above-mentioned determined In the H5 page, page object corresponding with page control mark is judged whether there is.If the determination result is YES, then it executes S1053;If judging result be it is no, the data callback interface of mobile application is not called, avoids the key assignments that will be received To synchronizing information to the H5 page.
S1053: the key-value pair information is then synchronized to by page object relevant to page control mark if it exists The H5 page, so that the H5 page for receiving the key-value pair information carries out real-time update to its page data.
If there is page object relevant to the page control mark in key-value pair information in the H5 page, trigger to data The calling of callback interface after the key-value pair information is synchronized to the H5 page, enables the H5 page to carry out its page data real Shi Gengxin.
In the embodiment of the present invention, by obtaining the corresponding source page of key-value pair information, and determine except source page it Other preceding H5 pages avoid mobile application and repeat key-value pair information to pull back to source page, therefore improve page data Effective transmission rate;By will just receive when detecting that the H5 page has page object relevant to key-value pair information Key-value pair information synchronizes, and reduces the transmission range of page data, avoids the dynamic change that data occur for every H5 page When change, all H5 pages associated by mobile application are required to carry out the simultaneously operating of key-value pair information, and this improves the pages The synchronous efficiency of data.
As an embodiment of the present invention, Fig. 4 shows the update method of page data provided in an embodiment of the present invention The specific implementation flow of S101, details are as follows:
S1011: if detecting the control instruction for starting the mobile application, the account of the mobile application is obtained Log-on message, the account log-on message include account identification and account key.
In the embodiment of the present invention, after mobile application is installed, if receiving the control for starting the mobile application Instruction, then run the mobile application, and user is requested to input the account log-on message about the mobile application.Wherein, account is stepped on Recording information includes account identification and account key.
S1012: legitimacy verifies are carried out to the account log-on message, and when verifying completion, it is same to issue page data Prompt information is walked, the synchronous prompt information of the page data is used to prompt whether to need to synchronize the page number of each H5 page According to.
Based on preset authorization access list, legitimacy verifies are carried out to above-mentioned account log-on message.Authorize access list In include that identify corresponding account close by each legitimate user mark for licensing the mobile application and each legitimate user Key.For the included user identifier of account log-on message and account key of current mobile application, if the user identifier is to close Method user identifier, then account key and the legitimate user identify corresponding account cipher key match, it is determined that current account is stepped on Record information passes through legitimacy verifies.At this point, the synchronous prompt information of page data is issued in the form of pop-up in terminal display interface, with Prompt the user whether the page data for needing to synchronize each H5 page currently shown.
S1013: it if receiving the instruction of data confirmation of synchronization, obtains corresponding to the page charging assembly of the mobile application Component mark.
If receiving user to be instructed according to the data confirmation of synchronization that the synchronous prompt information of above-mentioned page data is issued, adjust With the page charging assembly of mobile application.
In the embodiment of the present invention, reads the page charging assembly and correspond to preset component mark, and judge that the component identifies Whether matched with the account identification of mobile application.
S1014: if the account identification is matched with component mark, in the exploitation code of the mobile application, Add the scripted code for calling data receiver interface and data callback interface.
If the component mark of page charging assembly is matched with the account identification of mobile application, then it represents that current mobile application The administration authority that user has page charging assembly is operated, therefore, in order to which the data for enabling current mobile application have the H5 page are same Step function adds the foot for calling data receiver interface and data callback interface in the exploitation code of the mobile application This code.If the component mark of page charging assembly and the account identification of mobile application mismatch, then it represents that current mobile application Operation user do not have page charging assembly administration authority, issue permission limit prompt information.
In the embodiment of the present invention, legitimacy verifies are carried out by the account log-on message to mobile application, and detecting After the instruction of data confirmation of synchronization, confirm in the mark of component corresponding to page charging assembly and the matched situation of account identification, Allow for data receiver interface and data callback interface to be added in the exploitation code of mobile application, ensure that mobile application Page data synchronizing function can be adjusted directly on the subscriber terminal, improve the scalability of mobile application, while It avoids illegal person to distort the exploitation code of mobile application wantonly, thus also improves the safety of mobile application.
As another embodiment of the invention, as shown in figure 5, it is above-mentioned based on control instruction starting mobile application it Afterwards, it by data receiver interface, obtains before monitoring the key-value pair information that module returns, further includes:
S106: it issues to background server and is requested about the data cached downloading of each H5 page, and according to described The return value of background server updates local cache resource.
In the embodiment of the present invention, after based on control instruction starting mobile application, page cache event is triggered.Page It is relevant data cached to each H5 page for downloading from specified background server that face caches event.According to background service The response message that device is returned by the H5 page and its corresponding data cached is updated to local cache resource.
S107: if detecting the page load request about any H5 page, to the page load request into Row intercepts, and page data corresponding with the H5 page is searched from the local cache resource.
In the embodiment of the present invention, when receiving the selection instruction that user issues any page control, generate to the page The associated page load request of access address.If the blocker for defaulting in mobile application detects the page load request, Page load request is intercepted and captured, so that page load request can not be reached normally corresponding to its page access address Server, thus can not page resource on request of loading server.
For the page load request that interception obtains, from page access address entrained by the page load request, solution The resource path and resource file name of the H5 page loaded needed for current mobile application is precipitated.In local cache resource, look into It finds out and the resource path and the matched page data of resource file name.
S108: if any one parameter associated by the H5 page does not exist in the page data, after described Downloading in real time and the matched data value of the parameter in platform server, and to the page data and described in terminal interface Data value is shown.
In the embodiment of the present invention, it is shown in the page data that terminal display interface goes out current lookup.If current The data value that any parameter is detected in the H5 page shown is null value, then it represents that the parameter associated by the H5 page is not It is pre-stored in local cache resource, at this point, the page load request of above-mentioned interception is discharged, to be added based on the page Request is carried, downloading and the matched data value of the parameter from corresponding background server.
Preferably, after being discharged to page load request, the parameter field information entrained by it is modified, is made Obtaining the page load request requests the parameters of downloading to be changed to the parameters not existed in above-mentioned page data.It will Updated page load request be sent to the matched background server of the H5 page, with downloaded from background server with it is every After the matched data value of parameter, every page data associated by the H5 page is shown in terminal interface.
In the embodiment of the present invention, by actively loading and each H5 pages after starting mobile application based on control instruction Face is matched data cached to update local cache resource, ensure that in the selection for detecting that user issues any H5 page When instruction, the page data shown needed for capable of quickly being loaded from local cache resource, to reduce to background server The number for requesting H5 page data, the load for greatly reducing page resource is time-consuming, improves the access efficiency to the H5 page;? When detecting that any one parameter associated by the H5 page does not exist in local cache resource, by real-time from background server Downloading and the matched data value of the parameter, ensure that the actually required page data of user can smoothly load completion and therefore mention Access Success Rate of the height to the H5 page.
It should be understood that the size of the serial number of each step is not meant that the order of the execution order in above-described embodiment, each process Execution sequence should be determined by its function and internal logic, the implementation process without coping with the embodiment of the present invention constitutes any limit It is fixed.
Corresponding to the update method of page data described in foregoing embodiments, Fig. 6 shows provided in an embodiment of the present invention The structural block diagram of the updating device of page data.For ease of description, only parts related to embodiments of the present invention are shown.
Referring to Fig. 6, which includes:
First acquisition unit 61 adds data for obtaining the exploitation code of mobile application, and in the exploitation code Receiving interface and data callback interface.
Determination unit 62, for the determining and associated each H5 page of the mobile application, the H5 page is using super The page that the 5th material alteration HTML5 of text mark up language writes.
Second acquisition unit 63 for obtaining the page code of each H5 page, and adds in the page code Add monitoring module, the key-value pair information monitored module and be used to monitor the H5 page, the key-value pair information includes each Key assignments corresponding to page control.
Third acquiring unit 64 for starting the mobile application based on control instruction, and is connect by the data receiver Mouthful, obtain the key-value pair information monitoring module and returning.
Synchronization unit 65, for by the data callback interface, the key-value pair information to be synchronized to the association shifting Each H5 page of dynamic application, so that the H5 page for receiving the key-value pair information carries out in fact its page data Shi Gengxin.
Optionally, the synchronization unit 65 includes:
First obtains subelement, for obtaining the corresponding source page of the key-value pair information, and determines except described next Except the page of source with the associated H5 page of the mobile application.
Detection sub-unit, the page control mark for being included according to the key-value pair information are each what is determined In a H5 page, detect whether there is page object relevant to page control mark.
Synchronous subelement, for page object relevant to page control mark if it exists, then by the key-value pair Synchronizing information is to the H5 page, so that the H5 page for receiving the key-value pair information carries out in real time more its page data Newly.
Optionally, the first acquisition unit 61 includes:
Second obtains subelement, if for detecting the control instruction for starting the mobile application, obtain described in The account log-on message of mobile application, the account log-on message include account identification and account key.
Subelement is verified, for carrying out legitimacy verifies to the account log-on message, and when verifying completion, issues page Face data synchronizes prompt information, and the synchronous prompt information of the page data is for prompting whether need to synchronize each H5 page Page data.
Third obtains subelement, if obtaining the page of the mobile application for receiving the instruction of data confirmation of synchronization The mark of component corresponding to charging assembly.
Subelement is added, if matching for the account identification with component mark, in opening for the mobile application It sends out in code, adds the scripted code for calling data receiver interface and data callback interface.
Optionally, the updating device of the page data further include:
Updating unit is requested for issuing to background server about the data cached downloading of each H5 page, and According to the return value of the background server, local cache resource is updated.
Searching unit, if adding for detecting about the page load request of any H5 page to the page It carries request to be intercepted, and searches page data corresponding with the H5 page from the local cache resource.
Display unit, if not existing in the page data for any one parameter associated by the H5 page, Downloading in real time and the matched data value of the parameter from the background server, and to the page data in terminal interface And the data value is shown.
Optionally, the determination unit 62 includes:
Subelement is searched, in the exploitation code of the mobile application, according to preset with webpage view control The regular expression matched searches each webpage view control corresponding with the regular expression.
Third obtains subelement, for obtaining the property parameters of the webpage view control, and is based on the property parameters Determine the storage catalogue called needed for the webpage view control;
Determine subelement, for searching each hypertext markup language html file under the storage catalogue, and by its Each of html file be determined as and the associated H5 page of the mobile application.
Fig. 7 is the schematic diagram for the terminal device that one embodiment of the invention provides.As shown in fig. 7, the terminal of the embodiment is set Standby 7 include: processor 70, memory 71 and are stored in the meter that can be run in the memory 71 and on the processor 70 Calculation machine program 72, such as the more new procedures of page data.The processor 70 is realized above-mentioned when executing the computer program 72 Step in the update method embodiment of each page data, such as step 101 shown in FIG. 1 is to 105.Alternatively, the processing Device 70 realizes the function of each module/unit in above-mentioned each Installation practice when executing the computer program 72, such as shown in Fig. 6 The function of unit 61 to 65.
Illustratively, the computer program 72 can be divided into one or more module/units, it is one or Multiple module/units are stored in the memory 71, and are executed by the processor 70, to complete the present invention.Described one A or multiple module/units can be the series of computation machine program instruction section that can complete specific function, which is used for Implementation procedure of the computer program 72 in the terminal device 7 is described.
The terminal device 7 can be the calculating such as desktop PC, notebook, palm PC and cloud server and set It is standby.The terminal device may include, but be not limited only to, processor 70, memory 71.It will be understood by those skilled in the art that Fig. 7 The only example of terminal device 7 does not constitute the restriction to terminal device 7, may include than illustrating more or fewer portions Part perhaps combines certain components or different components, such as the terminal device can also include input-output equipment, net Network access device, bus etc..
Alleged processor 70 can be central processing unit (Central Processing Unit, CPU), can also be Other general processors, digital signal processor (Digital Signal Processor, DSP), specific integrated circuit (Application Specific Integrated Circuit, ASIC), ready-made programmable gate array (Field- Programmable Gate Array, FPGA) either other programmable logic device, discrete gate or transistor logic, Discrete hardware components etc..General processor can be microprocessor or the processor is also possible to any conventional processor Deng.
The memory 71 can be the internal storage unit of the terminal device 7, such as the hard disk or interior of terminal device 7 It deposits.The memory 71 is also possible to the External memory equipment of the terminal device 7, such as be equipped on the terminal device 7 Plug-in type hard disk, intelligent memory card (Smart Media Card, SMC), secure digital (Secure Digital, SD) card dodge Deposit card (Flash Card) etc..Further, the memory 71 can also both include the storage inside list of the terminal device 7 Member also includes External memory equipment.The memory 71 is for storing needed for the computer program and the terminal device Other programs and data.The memory 71 can be also used for temporarily storing the data that has exported or will export.
It, can also be in addition, each functional unit in each embodiment of the application can integrate in one processing unit It is that each unit physically exists alone, can also be integrated in one unit with two or more units.Above-mentioned integrated list Member both can take the form of hardware realization, can also realize in the form of software functional units.
If the integrated unit is realized in the form of SFU software functional unit and sells or use as independent product When, it can store in a computer readable storage medium.Based on this understanding, the technical solution of the application is substantially The all or part of the part that contributes to existing technology or the technical solution can be in the form of software products in other words It embodies, which is stored in a storage medium, including some instructions are used so that a computer Equipment (can be personal computer, server or the network equipment etc.) executes the complete of each embodiment the method for the application Portion or part steps.And storage medium above-mentioned include: USB flash disk, mobile hard disk, read-only memory (Read-Only Memory, ROM), random access memory (Random Access Memory, RAM), magnetic or disk etc. are various can store program The medium of code.
The above, above embodiments are only to illustrate the technical solution of the application, rather than its limitations;Although referring to before Embodiment is stated the application is described in detail, those skilled in the art should understand that: it still can be to preceding Technical solution documented by each embodiment is stated to modify or equivalent replacement of some of the technical features;And these It modifies or replaces, the spirit and scope of each embodiment technical solution of the application that it does not separate the essence of the corresponding technical solution.

Claims (10)

1. a kind of update method of page data characterized by comprising
The exploitation code of mobile application is obtained, and addition data receiver interface and data readjustment connect in the exploitation code Mouthful;
The determining and associated each H5 page of the mobile application, the H5 page are using the 5th weight of hypertext markup language The page that big modification HTML5 writes;
The page code of each H5 page is obtained, and module, the monitoring module are monitored in addition in the page code For monitoring the key-value pair information of the H5 page, the key-value pair information includes key assignments corresponding to each page control;
Start the mobile application based on control instruction, and by the data receiver interface, obtains the monitoring module and return The key-value pair information;
By the data callback interface, the key-value pair information is synchronized to each described H5 pages of the association mobile application Face, so that the H5 page for receiving the key-value pair information carries out real-time update to its page data.
2. the update method of page data as described in claim 1, which is characterized in that described to be connect by data readjustment Mouthful, the key-value pair information is synchronized to each H5 page for being associated with the mobile application, so as to receive the key assignments Real-time update is carried out to its page data to the H5 page of information, comprising:
Obtain the corresponding source page of the key-value pair information, and determine in addition to the source page with the mobile application The associated H5 page;
The page control mark for being included according to the key-value pair information, in each the described H5 page determined, detection With the presence or absence of page object relevant to page control mark;
Page object relevant to page control mark if it exists, then be synchronized to the H5 page for the key-value pair information, So that the H5 page for receiving the key-value pair information carries out real-time update to its page data.
3. the update method of page data as described in claim 1, which is characterized in that the exploitation generation for obtaining mobile application Code, and data receiver interface and data callback interface are added in the exploitation code, comprising:
If detecting the control instruction for starting the mobile application, the account log-on message of the mobile application is obtained, The account log-on message includes account identification and account key;
Legitimacy verifies are carried out to the account log-on message, and when verifying completion, issue the synchronous prompt information of page data, The synchronous prompt information of the page data is used to prompt whether to need to synchronize the page data of each H5 page;
If receiving the instruction of data confirmation of synchronization, component mark corresponding to the page charging assembly of the mobile application is obtained Know;
If the account identification is matched with component mark, in the exploitation code of the mobile application, add for adjusting With data receiver interface and the scripted code of data callback interface.
4. the update method of page data as described in claim 1, which is characterized in that start institute based on control instruction described After stating mobile application, described by the data receiver interface, the key-value pair letter monitoring module and returning is obtained Before breath, further includes:
It issues to background server and is requested about the data cached downloading of each H5 page, and according to the background server Return value, update local cache resource;
If detecting about the page load request of any H5 page, the page load request is intercepted, and Page data corresponding with the H5 page is searched from the local cache resource;
If any one parameter associated by the H5 page does not exist in the page data, from the background server Downloading in real time and the matched data value of the parameter, and the page data and the data value are carried out in terminal interface It shows.
5. the update method of page data as described in claim 1, which is characterized in that the determination and the mobile application close Each H5 page of connection, comprising:
In the exploitation code of the mobile application, according to the preset and matched regular expression of webpage view control, search Each webpage view control corresponding with the regular expression;
The property parameters of the webpage view control are obtained, and are determined needed for the webpage view control based on the property parameters The storage catalogue of calling;
Each hypertext markup language html file under the storage catalogue is searched, and each of these html file is true It is set to and the associated H5 page of the mobile application.
6. a kind of terminal device, including memory and processor, the memory, which is stored with, to be run on the processor Computer program, which is characterized in that the processor realizes following steps when executing the computer program:
The exploitation code of mobile application is obtained, and addition data receiver interface and data readjustment connect in the exploitation code Mouthful;
The determining and associated each H5 page of the mobile application, the H5 page are using the 5th weight of hypertext markup language The page that big modification HTML5 writes;
The page code of each H5 page is obtained, and module, the monitoring module are monitored in addition in the page code For monitoring the key-value pair information of the H5 page, the key-value pair information includes key assignments corresponding to each page control;
Start the mobile application based on control instruction, and by the data receiver interface, obtains the monitoring module and return The key-value pair information;
By the data callback interface, the key-value pair information is synchronized to each described H5 pages of the association mobile application Face, so that the H5 page for receiving the key-value pair information carries out real-time update to its page data.
7. terminal device as claimed in claim 6, which is characterized in that it is described by the data callback interface, by the key Value to synchronizing information to each H5 page for being associated with the mobile application, so as to receive the described of the key-value pair information The H5 page carries out real-time update to its page data, comprising:
Obtain the corresponding source page of the key-value pair information, and determine in addition to the source page with the mobile application The associated H5 page;
The page control mark for being included according to the key-value pair information, in each the described H5 page determined, detection With the presence or absence of page object relevant to page control mark;
Page object relevant to page control mark if it exists, then be synchronized to the H5 page for the key-value pair information, So that the H5 page for receiving the key-value pair information carries out real-time update to its page data.
8. terminal device as claimed in claim 6, which is characterized in that the exploitation code for obtaining mobile application, and in institute It states and adds data receiver interface and data callback interface in exploitation code, comprising:
If detecting the control instruction for starting the mobile application, the account log-on message of the mobile application is obtained, The account log-on message includes account identification and account key;
Legitimacy verifies are carried out to the account log-on message, and when verifying completion, issue the synchronous prompt information of page data, The synchronous prompt information of the page data is used to prompt whether to need to synchronize the page data of each H5 page;
If receiving the instruction of data confirmation of synchronization, component mark corresponding to the page charging assembly of the mobile application is obtained Know;
If the account identification is matched with component mark, in the exploitation code of the mobile application, add for adjusting With data receiver interface and the scripted code of data callback interface.
9. terminal device as claimed in claim 6, which is characterized in that the processor goes back reality when executing the computer program Existing following steps:
It issues to background server and is requested about the data cached downloading of each H5 page, and according to the background server Return value, update local cache resource;
If detecting about the page load request of any H5 page, the page load request is intercepted, and Page data corresponding with the H5 page is searched from the local cache resource;
If any one parameter associated by the H5 page does not exist in the page data, from the background server Downloading in real time and the matched data value of the parameter, and the page data and the data value are carried out in terminal interface It shows.
10. a kind of computer readable storage medium, the computer-readable recording medium storage has computer program, and feature exists In when the computer program is executed by processor the step of any one of such as claim 1 to 5 of realization the method.
CN201811114997.8A 2018-09-25 2018-09-25 Update method, terminal device and the medium of page data Pending CN109446457A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811114997.8A CN109446457A (en) 2018-09-25 2018-09-25 Update method, terminal device and the medium of page data

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811114997.8A CN109446457A (en) 2018-09-25 2018-09-25 Update method, terminal device and the medium of page data

Publications (1)

Publication Number Publication Date
CN109446457A true CN109446457A (en) 2019-03-08

Family

ID=65530652

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811114997.8A Pending CN109446457A (en) 2018-09-25 2018-09-25 Update method, terminal device and the medium of page data

Country Status (1)

Country Link
CN (1) CN109446457A (en)

Cited By (21)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110224896A (en) * 2019-06-24 2019-09-10 深圳前海桔子信息技术有限公司 A kind of network performance data acquisition method, device, server and storage medium
CN110298000A (en) * 2019-05-21 2019-10-01 平安普惠企业管理有限公司 Acquisition methods, terminal device and the medium of page parameter
CN110321140A (en) * 2019-05-23 2019-10-11 天津五八到家科技有限公司 Data-updating method, device and mobile terminal
CN110516180A (en) * 2019-08-21 2019-11-29 北京拉勾网络技术有限公司 A kind of content display method, device and calculate equipment
CN110647578A (en) * 2019-08-14 2020-01-03 平安普惠企业管理有限公司 Method and device for synchronously displaying page information, computer equipment and storage medium
CN110719261A (en) * 2019-09-16 2020-01-21 努比亚技术有限公司 Activity page data processing method, mobile terminal, server and storage medium
CN111399809A (en) * 2020-03-11 2020-07-10 苏州金羲智慧科技有限公司 Method, system, device and medium for communication between RN and H5 pages
CN111399872A (en) * 2020-02-28 2020-07-10 北京无限光场科技有限公司 Page updating method and device and electronic equipment
CN111679826A (en) * 2020-04-27 2020-09-18 平安国际智慧城市科技股份有限公司 Method, device and equipment for previewing webpage editing content in real time and storage medium
CN111897602A (en) * 2020-08-06 2020-11-06 平安普惠企业管理有限公司 Method, device, equipment and medium for loading and updating H5 page
CN111949354A (en) * 2020-08-13 2020-11-17 北京字节跳动网络技术有限公司 Page content updating method and device
WO2020253061A1 (en) * 2019-06-20 2020-12-24 平安科技(深圳)有限公司 Page generating method and apparatus, computer device, and storage medium
CN112181690A (en) * 2020-09-30 2021-01-05 武汉斗鱼鱼乐网络科技有限公司 Cross-end webpage display method, storage medium, electronic device and system
CN112328925A (en) * 2020-10-28 2021-02-05 北京鸿腾智能科技有限公司 Page data loading method, device, equipment and storage medium
CN112507263A (en) * 2021-02-05 2021-03-16 平安普惠企业管理有限公司 Page loading updating method and device, electronic equipment and storage medium
CN112579430A (en) * 2019-09-30 2021-03-30 北京国双科技有限公司 Processing method and device for collected codes
CN112799857A (en) * 2019-11-14 2021-05-14 腾讯科技(深圳)有限公司 Application access method and device
CN112905281A (en) * 2021-02-08 2021-06-04 北京字跳网络技术有限公司 View display method and device, electronic equipment and storage medium
CN112988263A (en) * 2021-02-10 2021-06-18 青岛希望鸟科技有限公司 Method and system for synchronizing web pages
CN113608895A (en) * 2021-08-06 2021-11-05 湖南快乐阳光互动娱乐传媒有限公司 Web backend data access method and system
CN114499829A (en) * 2020-11-11 2022-05-13 快撮撮(成都)科技有限公司 Key pair management method and device, electronic equipment and storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101977209A (en) * 2010-10-11 2011-02-16 苏州阔地网络科技有限公司 Method for realizing page-turning synchronization on web page
CN102215243A (en) * 2010-04-12 2011-10-12 华为技术有限公司 Event synchronization method, system, client and server
CN106357697A (en) * 2016-11-14 2017-01-25 威创软件南京有限公司 Multi-terminal page synchronizing method based on WebSocket attribute synchronization

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102215243A (en) * 2010-04-12 2011-10-12 华为技术有限公司 Event synchronization method, system, client and server
CN101977209A (en) * 2010-10-11 2011-02-16 苏州阔地网络科技有限公司 Method for realizing page-turning synchronization on web page
CN106357697A (en) * 2016-11-14 2017-01-25 威创软件南京有限公司 Multi-terminal page synchronizing method based on WebSocket attribute synchronization

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
DANNNNEY: "如何在微信小程序里面实现跨页面通信?", pages 1 - 7, Retrieved from the Internet <URL:https://www.jianshu.com/p/2ba137a02f09> *
WEIXIN_33704591: "利用localStorage实现跨窗口内容共享", pages 1 - 2, Retrieved from the Internet <URL:https://blog.csdn.net/weixin_33704591/article/details/91560961> *

Cited By (33)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110298000A (en) * 2019-05-21 2019-10-01 平安普惠企业管理有限公司 Acquisition methods, terminal device and the medium of page parameter
CN110321140A (en) * 2019-05-23 2019-10-11 天津五八到家科技有限公司 Data-updating method, device and mobile terminal
WO2020253061A1 (en) * 2019-06-20 2020-12-24 平安科技(深圳)有限公司 Page generating method and apparatus, computer device, and storage medium
CN110224896A (en) * 2019-06-24 2019-09-10 深圳前海桔子信息技术有限公司 A kind of network performance data acquisition method, device, server and storage medium
CN110224896B (en) * 2019-06-24 2021-11-26 深圳桔子数字技术有限公司 Network performance data acquisition method and device and storage medium
CN110647578A (en) * 2019-08-14 2020-01-03 平安普惠企业管理有限公司 Method and device for synchronously displaying page information, computer equipment and storage medium
CN110647578B (en) * 2019-08-14 2023-10-13 陕西小神农数字科技有限公司 Method, device, computer equipment and storage medium for synchronously displaying page information
CN110516180A (en) * 2019-08-21 2019-11-29 北京拉勾网络技术有限公司 A kind of content display method, device and calculate equipment
CN110516180B (en) * 2019-08-21 2023-04-07 北京拉勾网络技术有限公司 Content display method and device and computing equipment
CN110719261B (en) * 2019-09-16 2023-11-17 努比亚技术有限公司 Active page data processing method and storage medium
CN110719261A (en) * 2019-09-16 2020-01-21 努比亚技术有限公司 Activity page data processing method, mobile terminal, server and storage medium
CN112579430A (en) * 2019-09-30 2021-03-30 北京国双科技有限公司 Processing method and device for collected codes
CN112799857B (en) * 2019-11-14 2023-09-29 腾讯科技(深圳)有限公司 Application access method, device, terminal and storage medium
CN112799857A (en) * 2019-11-14 2021-05-14 腾讯科技(深圳)有限公司 Application access method and device
CN111399872A (en) * 2020-02-28 2020-07-10 北京无限光场科技有限公司 Page updating method and device and electronic equipment
CN111399809B (en) * 2020-03-11 2023-09-12 苏州金羲智慧科技有限公司 Method, system, device and medium for communication between RN and H5 page
CN111399809A (en) * 2020-03-11 2020-07-10 苏州金羲智慧科技有限公司 Method, system, device and medium for communication between RN and H5 pages
CN111679826B (en) * 2020-04-27 2024-04-05 深圳赛安特技术服务有限公司 Method, device, equipment and storage medium for previewing webpage editing content in real time
CN111679826A (en) * 2020-04-27 2020-09-18 平安国际智慧城市科技股份有限公司 Method, device and equipment for previewing webpage editing content in real time and storage medium
CN111897602A (en) * 2020-08-06 2020-11-06 平安普惠企业管理有限公司 Method, device, equipment and medium for loading and updating H5 page
CN111897602B (en) * 2020-08-06 2023-10-20 湖北华中电力科技开发有限责任公司 Method, device, equipment and medium for loading and updating H5 page
CN111949354A (en) * 2020-08-13 2020-11-17 北京字节跳动网络技术有限公司 Page content updating method and device
CN111949354B (en) * 2020-08-13 2024-03-12 抖音视界有限公司 Page content updating method and device
CN112181690A (en) * 2020-09-30 2021-01-05 武汉斗鱼鱼乐网络科技有限公司 Cross-end webpage display method, storage medium, electronic device and system
CN112328925A (en) * 2020-10-28 2021-02-05 北京鸿腾智能科技有限公司 Page data loading method, device, equipment and storage medium
CN114499829B (en) * 2020-11-11 2023-07-07 蓝婷 Key management method and device, electronic equipment and storage medium
CN114499829A (en) * 2020-11-11 2022-05-13 快撮撮(成都)科技有限公司 Key pair management method and device, electronic equipment and storage medium
CN112507263A (en) * 2021-02-05 2021-03-16 平安普惠企业管理有限公司 Page loading updating method and device, electronic equipment and storage medium
CN112905281A (en) * 2021-02-08 2021-06-04 北京字跳网络技术有限公司 View display method and device, electronic equipment and storage medium
CN112988263A (en) * 2021-02-10 2021-06-18 青岛希望鸟科技有限公司 Method and system for synchronizing web pages
CN112988263B (en) * 2021-02-10 2023-11-28 青岛希望鸟科技有限公司 Webpage synchronization method and system
CN113608895A (en) * 2021-08-06 2021-11-05 湖南快乐阳光互动娱乐传媒有限公司 Web backend data access method and system
CN113608895B (en) * 2021-08-06 2024-04-09 湖南快乐阳光互动娱乐传媒有限公司 Web back-end data access method and system

Similar Documents

Publication Publication Date Title
CN109446457A (en) Update method, terminal device and the medium of page data
US11740891B2 (en) Providing access to a hybrid application offline
US11082426B2 (en) Identifying accounts having shared credentials
US10880287B2 (en) Out of box experience application API integration
KR102161667B1 (en) System and method for providing offline access in a hosted document service
US9363310B2 (en) Standard commands for native commands
CN108345543B (en) Data processing method, device, equipment and storage medium
CN106503134A (en) Browser jumps to the method for data synchronization and device of application program
WO2016099809A1 (en) No password user account access
US9258291B2 (en) Pre-authorizing a client application to access a user account on a content management system
EP2951734B1 (en) Providing a content preview
CN107463657B (en) File operation method and terminal
US10209976B2 (en) Automated application installation
CN106250454A (en) The loading method of a kind of page script and device
CN110197075A (en) Resource access method, calculates equipment and storage medium at device
CN110019552A (en) User pays close attention to the method and apparatus that state updates
US20150222431A1 (en) Random identifier generation for offline database
US8381269B2 (en) System architecture and method for secure web browsing using public computers
CN117290840B (en) Browser auditing method, device, computer equipment and storage medium
KR20120016335A (en) Web page pre-caching system and method for offline-executing
CN117614943A (en) Internet application management method and system
CN117714541A (en) iOS application network data caching method and system based on request link interception
US20140068016A1 (en) System and Method for Web Application Acceleration
JP2001312341A (en) Communication terminal equipment, document data processing method and recording medium recording program therefor

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