CN107203576A - Information synchronization method and device - Google Patents

Information synchronization method and device Download PDF

Info

Publication number
CN107203576A
CN107203576A CN201610159149.3A CN201610159149A CN107203576A CN 107203576 A CN107203576 A CN 107203576A CN 201610159149 A CN201610159149 A CN 201610159149A CN 107203576 A CN107203576 A CN 107203576A
Authority
CN
China
Prior art keywords
identification code
component
server
user
webpage
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.)
Granted
Application number
CN201610159149.3A
Other languages
Chinese (zh)
Other versions
CN107203576B (en
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.)
Beijing Jingdong Century Trading Co Ltd
Beijing Jingdong Shangke Information Technology Co Ltd
Original Assignee
Beijing Jingdong Century Trading Co Ltd
Beijing Jingdong Shangke Information Technology 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 Beijing Jingdong Century Trading Co Ltd, Beijing Jingdong Shangke Information Technology Co Ltd filed Critical Beijing Jingdong Century Trading Co Ltd
Priority to CN201610159149.3A priority Critical patent/CN107203576B/en
Publication of CN107203576A publication Critical patent/CN107203576A/en
Application granted granted Critical
Publication of CN107203576B publication Critical patent/CN107203576B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/958Organisation or management of web site content, e.g. publishing, maintaining pages or automatic linking
    • G06F16/986Document structures and storage, e.g. HTML extensions
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/52Program synchronisation; Mutual exclusion, e.g. by means of semaphores

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Databases & Information Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

This application discloses information synchronization method and device.One embodiment of methods described includes:During Webpage is loaded by the embedded component for loading Webpage, the component identification code stored in the component is obtained;The user identification code of storage is contrasted with the component with identification code, judges whether the user identification code is identical with the component identification code;If the user identification code is identical with identification code with the component, by for calling the code of Data synchronization interface to write in the script of the Webpage;In script described in the assembly operating and after calling the Data synchronization interface, pass through the Data synchronization interface and carry out synchronizing information with the Webpage.The embodiment realizes fast and efficiently synchronizing information.

Description

Information synchronization method and device
Technical field
The application is related to field of computer technology, and in particular to Internet technical field, especially relates to And information synchronization method and device.
Background technology
With the popularization of mobile terminal, the increasing application for being applied to mobile terminal is occurred in that. Due to mobile terminal be related to several operation systems (for example IOS systems, android system, Windows Phone systems etc.), therefore it is a suitable for various mobile terminals to want exploitation Application difficult is heavy.In this context, Hybrid App (mixed mode Mobile solution) Arise at the historic moment, Hybrid App refer between Web App (application based on Web) and Native The App of App (localization application) between the two, it both has the good users of Native App The advantage of interactive experience, the advantage with Web App Cross-border congestion managements.
However, often running into primary page and embedded webpage (such as html5 in Hybrid App The page) between interaction situation, often may require that in interaction the information of user is carried out it is same Step, the especially primary page and embedded web page contents in same mobile terminal and Hybrid App In the case of supplier's identical, how fast and efficiently to realize synchronizing information is a urgent need The problem of solution.
The content of the invention
The purpose of the application is to propose a kind of improved information synchronization method and device, to solve The technical problem that background section above is mentioned.
In a first aspect, this application provides a kind of information synchronization method, methods described includes: During loading Webpage by the embedded component for loading Webpage, institute is obtained The component identification code stored in component is stated, wherein, the component is in advance from clothes with identification code Identification code obtained in business device, for verifying user identity;By the user identification code of storage with The component is contrasted with identification code, judges that the user identification code is identified with the component Code it is whether identical, wherein, the user identification code be obtained in advance from the server, Identification code for verifying user identity;If the user identification code is identified with the component Code-phase is same, then by for calling the code of Data synchronization interface to write the script of the Webpage In;In script described in the assembly operating and after calling the Data synchronization interface, pass through institute State Data synchronization interface and carry out synchronizing information with the Webpage.
In certain embodiments, it is described obtain the component that is stored in the component with identification code it Before, methods described also includes:Receive the log-on message that is inputted by primary page of user, and by institute State log-on message and be sent to server and verified by the server;Receive the server hair The checking identification code sent, and the checking is stored as user identification code with identification code, wherein, The checking with identification code be by the server after the log-on message is verified successfully basis The log-on message generation;The checking is received by the component from the server to mark Know code and be stored as component identification code.
In certain embodiments, methods described also includes:By the Webpage to the clothes Business device sends the first data access request, wherein, first data access request includes described Component identification code;Receive the server is returned for first data access request the One data, wherein, first data are to determine the component identification code in the server Returned with the checking for previously generating and storing with identification code after identical.
In certain embodiments, methods described also includes:Sent out by primary page to the server The second data access request is sent, wherein, second data access request includes user identification code; Receive the server and be directed to the second data that second data access request is returned, wherein, Second data are to determine the user identification code with previously generating and storing in the server Checking with identification code it is identical after return.
In certain embodiments, the component identification code and/or the user identification code have Imitate the time limit;And methods described also includes:Judge in the component identification code and/or the use Whether the operation information of user is received in the period of validity of family identification code;If received, Extend the period of validity of the component identification code and/or the user identification code;If do not connect Receive, it is determined that the component identification code and/or the user identification code are expired.
In certain embodiments, methods described also includes:The Webpage is obtained to the clothes What business device was sent is used for the request that request redirects access, wherein, the request includes described group Part identification code;With receiving the webpage after the redirection that the server is returned for the request Location, and the corresponding redirection page of the web page address is loaded by the component, wherein, institute It is to determine the component identification code with previously generating and storing in the server to state web page address Checking with identification code it is identical after send;The component identification code and the user are marked Know code to be contrasted, judge whether the component identification code is identical with the user identification code; If identical, the interactive information between the redirection page and the server is obtained.
Second aspect, this application provides a kind of synchronizing information device, described device includes:Obtain Unit is taken, for loading Webpage by the embedded component for being used to load Webpage During, the component identification code stored in the component is obtained, wherein, the component mark Know code be obtained in advance from server, the identification code for verifying user identity;Contrast is single Member, for the user identification code of storage to be contrasted with the component with identification code, judges institute State user identification code whether identical with the component identification code, wherein, the user identification code It is identification code obtained in advance from the server, for verifying user identity;Write-in is single Member, if identical with identification code with the component for the user identification code, will be used to adjust Write with the code of Data synchronization interface in the script of the Webpage;Synchronization unit, is used for In script described in the assembly operating and after calling the Data synchronization interface, pass through the number Synchronizing information is carried out according to sync cap and the Webpage.
In certain embodiments, described device also includes:Receive and transmitting element, for receiving The log-on message that user is inputted by primary page, and by the log-on message be sent to server by The server is verified;First receives and memory cell, for receiving the server hair The checking identification code sent, and the checking is stored as user identification code with identification code, wherein, The checking with identification code be by the server after the log-on message is verified successfully basis The log-on message generation;Second receives and memory cell, for by the component from institute Server is stated to receive the checking identification code and be stored as component identification code.
In certain embodiments, described device also includes:First transmitting element, for passing through institute State Webpage and send the first data access request to the server, wherein, first number Include the component identification code according to access request;First receiving unit, for receiving the clothes Business device is directed to the first data that first data access request is returned, wherein, first number According to being to determine the component identification code in the server and previously generate and the checking that stores is used Returned after identification code is identical.
In certain embodiments, described device also includes:Second transmitting element, for passing through original Raw page sends the second data access request to the server, wherein, second data access Request includes user identification code;Second receiving unit, for receiving the server for described The second data that second data access request is returned, wherein, second data are in the clothes Business device determines to return after the user identification code is identical with identification code with the checking for previously generating and storing Return.
In certain embodiments, the component identification code and/or the user identification code have Imitate the time limit;And described device also includes:Judging unit, for judging to mark in the component Whether the operation information of user is received in the period of validity for knowing code and/or the user identification code; Renewal unit, if for receiving, extending the component identification code and/or described The period of validity of user identification code;Expired unit is confirmed, if for being not received by, really Fixed the component identification code and/or the user identification code are expired.
In certain embodiments, described device also includes:Acquisition request unit, for obtaining The request for being used to ask to redirect access that Webpage is sent to the server is stated, wherein, The request includes the component identification code;Unit is reloaded, for receiving the service Web page address after the redirection that device is returned for the request, and institute is loaded by the component The corresponding redirection page of web page address is stated, wherein, the web page address is in the server Determine that checking of the component identification code with previously generating and storing is sent out afterwards with identification code is identical Send;Contrast and judging unit, for by the component identification code and the user identification code Contrasted, judge whether the component identification code is identical with the user identification code;Information Acquiring unit, if for identical, obtained between the redirection page and the server Interactive information.
Information synchronization method and device that the application is provided, by embedding for loading webpage The component identification code that the component prestores is obtained during the component loading Webpage of the page, And contrasted the component with identification code and the user identification code that prestores, will if identical For calling the code of Data synchronization interface to write in the script of above-mentioned Webpage, in the component After running the script and calling the Data synchronization interface, then it can pass through the Data synchronization interface Synchronizing information is carried out with the Webpage, so as to fast and efficiently realize synchronizing information.
Brief description of the drawings
Retouched by reading with reference to the detailed of being made to non-limiting example of being made of the following drawings State, other features, objects and advantages will become more apparent upon:
Fig. 1 is that the application can apply to exemplary system architecture figure therein;
Fig. 2 is the flow chart of one embodiment of the information synchronization method according to the application;
Fig. 3 is the flow chart of another embodiment of the information synchronization method according to the application;
Fig. 4 is the structural representation of one embodiment of the synchronizing information device according to the application;
Fig. 5 is adapted for for realizing the terminal device of the embodiment of the present application or the computer of server The structural representation of system.
Embodiment
The application is described in further detail with reference to the accompanying drawings and examples.It is appreciated that , specific embodiment described herein is used only for explaining related invention, rather than to the hair Bright restriction.It also should be noted that, illustrate only for the ease of description, in accompanying drawing with About the related part of invention.
It should be noted that in the case where not conflicting, embodiment and embodiment in the application In feature can be mutually combined.Describe this in detail below with reference to the accompanying drawings and in conjunction with the embodiments Application.
Fig. 1 shows the reality of the information synchronization method or synchronizing information device that can apply the application Apply the exemplary system architecture 100 of example.
As shown in figure 1, system architecture 100 can include terminal device 101,102,103, Network 104 and server 105.Network 104 is used in the and of terminal device 101,102,103 The medium of communication link is provided between server 105.Network 104 can include various connection classes Type, such as wired, wireless communication link or fiber optic cables etc..
User can pass through network 104 and server 105 with using terminal equipment 101,102,103 Interaction, to receive or send message etc..It can be provided with terminal device 101,102,103 The client application developed using various development modes, such as Native App, Web App and Hybrid App etc..
Terminal device 101,102,103 can be browsed with display screen and supported web page Various electronic equipments, including but not limited to smart mobile phone, tablet personal computer, E-book reader, (Moving Picture Experts Group Audio Layer III, dynamic image is special for MP3 player Family's compression standard audio aspect 3), MP4 (Moving Picture Experts Group Audio Layer IV, dynamic image expert's compression standard audio aspect 4) player, portable meter on knee Calculation machine etc..
Server 105 can be to provide the server of various services, for example can be to terminal device 101st, 102,103 log-on messages sent are verified, and are stepped on after verifying successfully according to this Information generation identifying code is recorded, and the identifying code is fed back to the server of terminal device.
It should be noted that the information synchronization method that the embodiment of the present application is provided is general by terminal Equipment 101,102,103 is performed, and correspondingly, synchronizing information device is generally positioned at terminal and set In standby 101,102,103.
It should be understood that the number of the terminal device, network and server in Fig. 1 is only signal Property.According to needs are realized, can have any number of terminal device, network and server.
With continued reference to Fig. 2, one embodiment of the information synchronization method according to the application is shown Flow 200.Described information synchronization method, comprises the following steps:
Step 201, Webpage is being loaded by the embedded component for being used to load Webpage During, the component identification code stored in securing component.
In the present embodiment, electronic equipment (such as Fig. 1 of information synchronization method operation thereon Shown terminal device 101,102,103) on client application is installed, the client should With can be using mixed mode develop application, i.e. Hybrid App.In the client application A component for being used to load Webpage can be embedded with, the component can be that by The component of Web browser function, such as WebView components, WebView components can be visitors Apply the system component for being used for loading Web page in family end.The client application is passing through the component During loading Webpage, the component identification code prestored in the component can be obtained, Wherein, the component with identification code can be in advance obtained from server, for verifying user The identification code of identity.For example, said modules identification code can be server generation after write-in on The identification code stated in the identification code in the Http Cookie in component, Http Cookie can be One section of text fragments that acquiescence is carried when said modules send Http requests, the identification code can be used In the identity of checking user.Above-mentioned Webpage can be the Web page embedded in client application Face, can include html forms, xhtml forms, asp forms, php forms, jsp forms, Shtml forms, nsp forms, the webpage of xml forms or other following forms by exploitation Webpage.For example, above-mentioned Webpage can be the html5 pages.
Step 202, the user identification code of storage and component are contrasted with identification code, judged Whether user identification code is identical with identification code with component.
In the present embodiment, based on the component identification code obtained in step 201, above-mentioned client End application can be carried out the user identification code locally prestored and said modules with identification code pair Than, judge whether above-mentioned user identification code and said modules identification code are identical, wherein, it is above-mentioned User identification code can be mark obtained in advance from server, for verifying user identity Code.
Step 203, if user identification code is identical with identification code with component, it will be used to call The code of Data synchronization interface is write in the script of above-mentioned Webpage.
In the present embodiment, the judged result based on step 202, if above-mentioned user identification code It is identical with identification code with said modules, then it may determine that above-mentioned user identification code and said modules are used Identification code points to same user, and now, above-mentioned client application will can be used to call data same In the script for the above-mentioned Webpage that the code write-in said modules of step interface are being loaded.At this In embodiment, above-mentioned script can be by JavaScript scripts, VBScript script languages Speech, ActionScript scripts, MAX Script scripts, ASP scripts, JSP Script, PHP scripts, SQL scripts, perl script language, Shell scripts Language, python scripts, Ruby scripts, the various pin such as JavaFX scripts The script that this language is write.
Step 204, in the above-mentioned script of assembly operating and after calling Data synchronization interface, pass through Data synchronization interface carries out synchronizing information with above-mentioned Webpage.
In the present embodiment, run above-mentioned script in said modules and call above-mentioned data syn-chronization to connect After mouthful, above-mentioned client application can pass through above-mentioned Data synchronization interface and above-mentioned Webpage Synchronizing information is carried out, for example, above-mentioned client application can be incited somebody to action by above-mentioned Data synchronization interface Information is sent to above-mentioned Webpage, can also receive above-mentioned net by above-mentioned Data synchronization interface The information that the page page is sent.Herein, the information synchronized can be relevant with user each Plant information, such as user login information, userspersonal information, user's operation information etc..
In some optional implementations of the present embodiment, said modules identification code and/or on Period of validity can also be had by stating user identification code, more than period of validity said modules mark Code and/or above-mentioned user identification code can for example enter the identification code of expired failure expired failure Row is deleted.Above-mentioned client application may determine that in said modules identification code and/or above-mentioned user Whether the operation information of user is received in the period of validity of identification code, wherein, the operation information Can be that user is inputted by primary page or user is inputted by embedded Web page 's;, will extension said modules identification code and/or above-mentioned user if receiving operation information The period of validity of identification code;If being not received by operation information, it is determined that said modules are marked Know code and/or above-mentioned user identification code is expired.Above-mentioned period of validity can be people according to actual needs Work setting.For example, can having said modules identification code and/or above-mentioned user identification code The effect time limit is set to 24 hours, then if receiving user in 24 hours of period of validity Operation information will then be extended period of validity;If do not had in 24 hours of period of validity The operation information for receiving user is then determined expired and deleted.
In some optional implementations of the present embodiment, above-mentioned client application can be with head First obtain above-mentioned Webpage is used for asking for request redirection access to what above-mentioned server was sent Ask, wherein, the request includes component identification code.Herein, above-mentioned request, which is redirected, accesses Request can be that the solicited message inputted on above-mentioned Webpage according to user is generated, use The request accessed is redirected in the request sent to server.For example, in certain shopping class application, User adds commodity by the html5 pages input embedded in application the solicited message of shopping cart, If now detecting the user is currently in the state of being not logged in, request weight is sent to server The request of orientation visit, can include component identification code, request and redirect access in the request The page key word information, herein, request redirect access page key words information can Think User logs in, server can return to user's request according to the request and redirect the page accessed The corresponding website information in face;Secondly, above-mentioned client application can also receive above-mentioned server pin Web page address after the redirection returned to above-mentioned request, and load above-mentioned net by said modules The corresponding redirection page of page address, wherein, above-mentioned web page address is determined in above-mentioned server Said modules identification code is sent afterwards with the checking for previously generating and storing with identification code is identical 's;Then, above-mentioned client application can identify said modules identification code and above-mentioned user Code is contrasted, and judges whether said modules identification code is identical with above-mentioned user identification code, its In, above-mentioned Data synchronization interface can not be included in the script of the above-mentioned redirection page;Finally, If said modules identification code is identical with above-mentioned user identification code, above-mentioned client application can To obtain the interactive information between the above-mentioned redirection page and above-mentioned server, such as client should With the request that user is sent by above-mentioned redirection page towards above-mentioned server can be obtained, and obtain Above-mentioned server is taken to be directed to the information that the request is beamed back to above-mentioned redirection page face.
The method that above-described embodiment of the application is provided passes through the embedded webpage page in client application The code for calling Data synchronization interface is write in the script in face, and is calling the data syn-chronization Synchronizing information is carried out after interface, it is achieved thereby that quick between embedded Webpage, efficient Synchronizing information.
With further reference to Fig. 3, it illustrates the flow of another of information synchronization method embodiment 300.The flow 300 of the information synchronization method, comprises the following steps:
Step 301, the log-on message that is inputted by primary page of user is received, and by log-on message Server is sent to be verified by server.
In the present embodiment, electronic equipment (such as Fig. 1 of information synchronization method operation thereon Shown terminal device 101,102,103) on client application is installed, the client should With the log-on message that user is inputted by primary page can be received, and the log-on message is sent to Server is verified by server.Primary page can be based on above-mentioned electronic device system Native (primary) language development the page.Wherein, above-mentioned log-on message can include account Number, the information such as password.Above-mentioned server can test to log-on message, such as above-mentioned clothes Business device can verify that the account of user's input whether there is and whether password is correct.
Step 302, the checking identification code that the reception server is sent, and by checking identification code It is stored as user identification code.
In the present embodiment, above-mentioned client application can receive the checking that above-mentioned server is sent With identification code, and the checking is stored as user identification code with identification code.Wherein, above-mentioned checking With identification code can be by above-mentioned server after above-mentioned log-on message is verified successfully according to above-mentioned Log-on message generation, above-mentioned server can be stored to the checking of generation with identification code. Above-mentioned checking identification code can have period of validity, and its term of validity can be since the generation time Calculate.For example, after being verified successfully to log-on message, above-mentioned server can be inputted to user Log-on message carry out Hash operation generation Hash mark, the Hash marks can as checking Use identification code.Above-mentioned server can also include using when carrying out log-on message Hash operation In the time parameter of mark current time, it is possible thereby to generate the unique Hash relevant with the time Mark is used as checking identification code.
Step 303, checking identification code is received from server by component and is stored as component and used Identification code.
In the present embodiment, above-mentioned client application can be by embedded for loading webpage page The above-mentioned checking identification code that the component in face is generated from above-mentioned server the reception server, and should Checking is stored as component identification code with identification code, for example, said modules can use the checking Identification code is stored in Http Cookie.
Step 304, Webpage is being loaded by the embedded component for being used to load Webpage During, the component identification code stored in securing component.
In the present embodiment, step 304 may be referred to the step 201 of Fig. 2 correspondence embodiments, Here repeat no more.
Step 305, the user identification code of storage and component are contrasted with identification code, judged Whether user identification code is identical with identification code with component.
In the present embodiment, step 305 may be referred to the step 202 of Fig. 2 correspondence embodiments, Here repeat no more.
Step 306, if user identification code is identical with identification code with component, it will be used to call The code of Data synchronization interface is write in the script of above-mentioned Webpage.
In the present embodiment, step 306 may be referred to the step 203 of Fig. 2 correspondence embodiments, Here repeat no more.
Step 307, in the above-mentioned script of assembly operating and after calling Data synchronization interface, pass through Data synchronization interface carries out synchronizing information with above-mentioned Webpage.
In the present embodiment, step 307 may be referred to the step 204 of Fig. 2 correspondence embodiments, Here repeat no more.
In some optional implementations of the present embodiment, above-mentioned client application can also lead to Cross above-mentioned Webpage and send the first data access request to server, wherein, above-mentioned first number Include said modules identification code according to access request;Afterwards, above-mentioned client application can be with Receive above-mentioned server and be directed to the first data that above-mentioned first data access request is returned, wherein, Above-mentioned first data are to determine said modules identification code with previously generating and depositing in above-mentioned server What the checking of storage was returned with identification code after identical.
In some optional implementations of the present embodiment, above-mentioned client application can also lead to Cross primary page and send the second data access request to server, wherein, above-mentioned second data access Request includes user identification code;Afterwards, above-mentioned client can be directed to second with the reception server The second data that data access request is returned, wherein, above-mentioned second data are determined in server Above-mentioned user identification code is returned with the checking for previously generating and storing with identification code after identical.
From figure 3, it can be seen that compared with the corresponding embodiments of Fig. 2, the letter in the present embodiment Breath synchronous method 300 highlights checking identification code, component identification code and user identification code Generation step, the generation step ensure that the corresponding checking identification code of same user, component are used Identification code is identical with user identification code, during synchronizing information and server returned data, Checking can be used to carry out user identity with identification code and user identification code with identification code, component to test Card, only could carry out information exchange by authentication by (contrast after identical), from And ensure that the safe and reliable of information exchange while information exchange is fast and efficiently carried out.
With further reference to Fig. 4, as the realization to method shown in above-mentioned each figure, the application is provided A kind of one embodiment of synchronizing information device, the device embodiment and the method shown in Fig. 2 Embodiment is corresponding, and the device specifically can apply in various electronic equipments.
As shown in figure 4, the synchronizing information device 400 described in the present embodiment includes:Acquiring unit 401st, comparison unit 402, writing unit 403 and synchronization unit 404.Wherein, acquiring unit 401 are used in the process by the embedded component loading Webpage for being used to load Webpage In, the component identification code stored in said modules is obtained, wherein, said modules identification code It is identification code obtained in advance from server, for verifying user identity;Comparison unit 402 For the user identification code of storage and said modules to be contrasted with identification code, above-mentioned use is judged Whether family identification code is identical with identification code with said modules, wherein, above-mentioned user identification code is pre- Identification code first obtained from above-mentioned server, for verifying user identity;Writing unit 403 If identical with identification code with said modules for above-mentioned user identification code, it will be used to call number Write according to the code of sync cap in the script of above-mentioned Webpage;Synchronization unit 404 is used for After said modules run above-mentioned script and call above-mentioned Data synchronization interface, pass through above-mentioned data Sync cap carries out synchronizing information with above-mentioned Webpage.
In the present embodiment, acquiring unit 401, comparison unit 402, writing unit 403 and same The specific processing of step unit 404 may be referred to Fig. 2 correspondences embodiment step 201, step 202, The detailed description of step 203 and step 204, will not be repeated here.
In some optional implementations of the present embodiment, said apparatus also includes:Receive and send out Unit (not shown) is sent, for receiving the log-on message that user is inputted by primary page, and will be upper State log-on message and be sent to server and verified by above-mentioned server;First receives and storage list First (not shown), for receiving the checking identification code that above-mentioned server is sent, and is tested above-mentioned Card is stored as user identification code with identification code, wherein, above-mentioned checking is by above-mentioned clothes with identification code It is engaged in what device was generated after above-mentioned log-on message is verified successfully according to above-mentioned log-on message;Second connects Receive and memory cell (not shown), for receiving above-mentioned test from above-mentioned server by said modules Card identification code is simultaneously stored as component identification code.It is real that the implementation may be referred to Fig. 3 correspondences The detailed description of a step 301, step 302, step 303 is applied, be will not be repeated here.
In some optional implementations of the present embodiment, said apparatus also includes:First sends Unit (not shown), is visited for sending the first data to above-mentioned server by above-mentioned Webpage Request is asked, wherein, above-mentioned first data access request includes said modules identification code;First Receiving unit (not shown), for receiving above-mentioned server for above-mentioned first data access request The first data returned, wherein, above-mentioned first data are to determine said modules in above-mentioned server Returned with identification code with the checking for previously generating and storing with identification code after identical.The realization side Formula refers to the detailed description of corresponding implementation in above-mentioned Fig. 3 correspondences embodiment, herein no longer Repeat.
In some optional implementations of the present embodiment, the second transmitting element (not shown) is used In by primary page to above-mentioned server send the second data access request, wherein, above-mentioned second Data access request includes user identification code;Second receiving unit (not shown), for reception State server and be directed to the second data that above-mentioned second data access request is returned, wherein, above-mentioned the Two data are to determine above-mentioned user identification code and the checking for previously generating and storing in above-mentioned server Returned with identification code after identical.The implementation refers to phase in above-mentioned Fig. 3 correspondences embodiment The detailed description of implementation is answered, be will not be repeated here.
In some optional implementations of the present embodiment, said modules identification code and/or above-mentioned User identification code has period of validity;And said apparatus also includes:Judging unit (not shown), It is within the period of validity of said modules identification code and/or above-mentioned user identification code for judging The no operation information for receiving user;Renewal unit (not shown), if for receiving, Then extend the period of validity of said modules identification code and/or above-mentioned user identification code;Confirm expired Unit (not shown), if for being not received by, it is determined that said modules identification code and/ Or above-mentioned user identification code is expired.The implementation refers to phase in above-mentioned Fig. 2 correspondences embodiment The detailed description of implementation is answered, be will not be repeated here.
In some optional implementations of the present embodiment, said apparatus also includes:Acquisition request Unit (not shown), for obtain above-mentioned Webpage to above-mentioned server send be used for ask The request accessed is redirected, wherein, above-mentioned request includes said modules identification code;Again plus Carrier unit (not shown), for receiving after the redirection that above-mentioned server is returned for above-mentioned request Web page address, and load the corresponding redirection page of above-mentioned web page address by said modules, Wherein, above-mentioned web page address is to determine said modules identification code and pre- Mr. in above-mentioned server Into and store checking with identification code it is identical after send;Contrast and judging unit (not shown), For said modules to be contrasted with identification code with above-mentioned user identification code, said modules are judged It is whether identical with above-mentioned user identification code with identification code;Information acquisition unit (not shown), is used for If identical, the interactive information between the above-mentioned redirection page and above-mentioned server is obtained.Should Implementation refers to the detailed description of corresponding implementation in above-mentioned Fig. 2 correspondences embodiment, This is repeated no more.
Below with reference to Fig. 5, it illustrates suitable for for realizing the terminal device of the embodiment of the present application Or the structural representation of the computer system 500 of server.
As shown in figure 5, computer system 500 includes CPU (CPU) 501, its Can according to the program being stored in read-only storage (ROM) 502 or from storage part 508 The program that is loaded into random access storage device (RAM) 503 and perform various appropriate actions And processing.In RAM 503, the system that is also stored with 500 operates required various program sums According to.CPU 501, ROM 502 and RAM 503 are connected with each other by bus 504.Input / output (I/O) interface 505 is also connected to bus 504.
I/O interfaces 505 are connected to lower component:Importation 506 including keyboard, mouse etc.; Including cathode-ray tube (CRT), liquid crystal display (LCD) etc. and loudspeaker etc. Output par, c 507;Storage part 508 including hard disk etc.;And including such as LAN card, The communications portion 509 of the NIC of modem etc..Communications portion 509 is via such as The network of internet performs communication process.Driver 510 is also according to needing to be connected to I/O interfaces 505.Detachable media 511, such as disk, CD, magneto-optic disk, semiconductor memory etc., Be arranged on as needed on driver 510, in order to the computer program that reads from it according to Need to be mounted into storage part 508.
Especially, in accordance with an embodiment of the present disclosure, the process described above with reference to flow chart can be with It is implemented as computer software programs.For example, embodiment of the disclosure includes a kind of computer journey Sequence product, it includes being tangibly embodied in the computer program on machine readable media, the meter Calculation machine program bag, which contains, is used for the program code of the method shown in execution flow chart.Implement such In example, the computer program can be downloaded and installed by communications portion 509 from network, And/or be mounted from detachable media 511.In the computer program by CPU (CPU) during 501 execution, the above-mentioned functions limited in the present processes are performed.
Flow chart and block diagram in accompanying drawing, it is illustrated that according to the system of the various embodiments of the application, Architectural framework in the cards, function and the operation of method and computer program product.This point On, each square frame in flow chart or block diagram can represent a module, program segment or code A part, the part of the module, program segment or code is used for comprising one or more The executable instruction of logic function as defined in realizing.It should also be noted that being used as replacement at some In realization, the function of being marked in square frame can also be with different from the order marked in accompanying drawing hair It is raw.For example, two square frames succeedingly represented can essentially be performed substantially in parallel, they Sometimes it can also perform in the opposite order, this is depending on involved function.It is also noted that It is, each square frame in block diagram and/or flow chart and the square frame in block diagram and/or flow chart Combination, can be realized with the special hardware based system of defined function or operation is performed, Or can be realized with the combination of specialized hardware and computer instruction.
Being described in unit involved in the embodiment of the present application can be real by way of software It is existing, it can also be realized by way of hardware.Described unit can also be arranged on processing In device, for example, can be described as:A kind of processor includes acquiring unit, comparison unit, write Enter unit and synchronization unit.Wherein, the title of these units under certain conditions constitute pair The restriction of the unit in itself, for example, acquiring unit is also described as " by embedded During component loading Webpage for loading Webpage, obtain and deposited in the component The unit of the component identification code of storage ".
As on the other hand, present invention also provides a kind of nonvolatile computer storage media, The nonvolatile computer storage media can be described in above-described embodiment included in device Nonvolatile computer storage media;Can also be individualism, without non-in supplying terminal Volatile computer storage medium.Above-mentioned nonvolatile computer storage media be stored with one or The multiple programs of person, when one or more of programs are performed by an equipment so that described Equipment:During Webpage is loaded by the embedded component for loading Webpage, The component identification code stored in the component is obtained, wherein, the component is pre- with identification code Identification code first obtained from server, for verifying user identity;The user of storage is marked Know code to be contrasted with identification code with the component, judge the user identification code and the component It is whether identical with identification code, wherein, the user identification code is to be obtained in advance from the server Identification code take, for verifying user identity;If the user identification code and the component It is identical with identification code, then by for calling the code of Data synchronization interface to write the Webpage Script in;In script described in the assembly operating and after calling the Data synchronization interface, Synchronizing information is carried out by the Data synchronization interface and the Webpage.
Above description is only the preferred embodiment of the application and saying to institute's application technology principle It is bright.It will be appreciated by those skilled in the art that invention scope involved in the application, is not limited In the technical scheme of the particular combination of above-mentioned technical characteristic, do not departed from while should cover yet In the case of the inventive concept, it is combined by above-mentioned technical characteristic or its equivalent feature Formed by other technical schemes.Such as features described above and (but not limited to) disclosed herein Technical characteristic with similar functions carries out technical scheme formed by replacement mutually.

Claims (12)

1. a kind of information synchronization method, it is characterised in that methods described includes:
During Webpage is loaded by the embedded component for loading Webpage, The component identification code stored in the component is obtained, wherein, the component is pre- with identification code Identification code first obtained from server, for verifying user identity;
The user identification code of storage is contrasted with the component with identification code, described use is judged Whether family identification code is identical with identification code with the component, wherein, the user identification code is pre- Identification code first obtained from the server, for verifying user identity;
If the user identification code is identical with identification code with the component, it will be used to call number Write according to the code of sync cap in the script of the Webpage;
In script described in the assembly operating and after calling the Data synchronization interface, pass through institute State Data synchronization interface and carry out synchronizing information with the Webpage.
2. according to the method described in claim 1, it is characterised in that obtain described group described Before the component identification code stored in part, methods described also includes:
The log-on message that user is inputted by primary page is received, and the log-on message is sent to Server is verified by the server;
The checking identification code that the server is sent is received, and the checking is deposited with identification code Store up as user identification code, wherein, the checking is to be stepped on by the server described with identification code Generated after record information checking success according to the log-on message;
The checking identification code is received from the server by the component and component is stored as Use identification code.
3. method according to claim 2, it is characterised in that methods described also includes:
First data access request is sent to the server by the Webpage, wherein, First data access request includes the component identification code;
Receive the server and be directed to the first data that first data access request is returned, its In, first data are to determine the component identification code with previously generating in the server And the checking stored identification code return after identical.
4. method according to claim 2, it is characterised in that methods described also includes:
Second data access request is sent to the server by primary page, wherein, described the Two data access requests include user identification code;
Receive the server and be directed to the second data that second data access request is returned, its In, second data are to determine the user identification code in the server and previously generate simultaneously What the checking of storage was returned with identification code after identical.
5. according to the method described in claim 1, it is characterised in that the component identification code And/or the user identification code has period of validity;And
Methods described also includes:
Judge be within the period of validity of the component identification code and/or the user identification code The no operation information for receiving user;
If received, extend the component identification code and/or the user identification code has Imitate the time limit;
If be not received by, it is determined that the component identification code and/or the user identification code It is expired.
6. according to the method described in claim 1, it is characterised in that methods described also includes:
Obtain the Webpage is used for asking for request redirection access to what the server was sent Ask, wherein, the request includes the component identification code;
The web page address after the redirection that the server is returned for the request is received, and is led to Cross the component and load the corresponding redirection page of the web page address, wherein, the webpage Location is that the checking for determining the component identification code in the server and previously generating and storing is used Sent after identification code is identical;
The component is contrasted with identification code with the user identification code, the component is judged It is whether identical with the user identification code with identification code;
If identical, the interactive information between the redirection page and the server is obtained.
7. a kind of synchronizing information device, it is characterised in that described device includes:
Acquiring unit, for loading webpage by the embedded component for being used to load Webpage During the page, the component identification code stored in the component is obtained, wherein, described group Part with identification code be obtained in advance from server, the identification code for verifying user identity;
Comparison unit, for the user identification code of storage and the component to be carried out pair with identification code Than, judge whether the user identification code is identical with the component identification code, wherein, it is described User identification code be obtained in advance from the server, the mark for verifying user identity Code;
Writing unit, if identical with identification code with the component for the user identification code, Then by for calling the code of Data synchronization interface to write in the script of the Webpage;
Synchronization unit, in script described in the assembly operating and calling the data syn-chronization to connect After mouthful, synchronizing information is carried out by the Data synchronization interface and the Webpage.
8. device according to claim 7, it is characterised in that described device also includes:
Receive and transmitting element, for receiving the log-on message that user is inputted by primary page, and The log-on message is sent into server to be verified by the server;
First receives and memory cell, for receiving the checking identification code that the server is sent, And the checking is stored as user identification code with identification code, wherein, the checking identification code It is to be generated by the server after the log-on message is verified successfully according to the log-on message 's;
Second receives and memory cell, for receiving described from the server by the component Checking identification code is simultaneously stored as component identification code.
9. device according to claim 8, it is characterised in that described device also includes:
First transmitting element, is counted for sending first to the server by the Webpage According to access request, wherein, first data access request includes the component identification code;
First receiving unit, for receiving the server for first data access request The first data returned, wherein, first data are to determine the component in the server Returned with identification code with the checking for previously generating and storing with identification code after identical.
10. device according to claim 8, it is characterised in that described device also includes:
Second transmitting element, for sending the second data access to the server by primary page Request, wherein, second data access request includes user identification code;
Second receiving unit, for receiving the server for second data access request The second data returned, wherein, second data are to determine the user in the server Identification code is returned with the checking for previously generating and storing with identification code after identical.
11. device according to claim 7, it is characterised in that the component mark Code and/or the user identification code have period of validity;And
Described device also includes:
Judging unit, for judging in the component identification code and/or the user identification code Whether the operation information of user is received in period of validity;
Renewal unit, if for receiving, extend the component identification code and/ Or the period of validity of the user identification code;
Expired unit is confirmed, if for being not received by, it is determined that the component identification code And/or the user identification code is expired.
12. device according to claim 7, it is characterised in that described device also includes:
Acquisition request unit, for obtaining the Webpage to being used for that the server is sent Request redirects the request accessed, wherein, the request includes the component identification code;
Unit is reloaded, for receiving the redirection that the server is returned for the request Web page address afterwards, and the corresponding redirection page of the web page address is loaded by the component, Wherein, the web page address is to determine the component identification code and pre- Mr. in the server Into and store checking with identification code it is identical after send;
Contrast and judging unit, for the component identification code and the user identification code to be entered Row contrast, judges whether the component identification code is identical with the user identification code;
Information acquisition unit, if for identical, obtaining the redirection page and the clothes Interactive information between business device.
CN201610159149.3A 2016-03-18 2016-03-18 Information synchronization method and device Active CN107203576B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610159149.3A CN107203576B (en) 2016-03-18 2016-03-18 Information synchronization method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610159149.3A CN107203576B (en) 2016-03-18 2016-03-18 Information synchronization method and device

Publications (2)

Publication Number Publication Date
CN107203576A true CN107203576A (en) 2017-09-26
CN107203576B CN107203576B (en) 2020-06-05

Family

ID=59904266

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610159149.3A Active CN107203576B (en) 2016-03-18 2016-03-18 Information synchronization method and device

Country Status (1)

Country Link
CN (1) CN107203576B (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108595656A (en) * 2018-04-28 2018-09-28 宁波银行股份有限公司 A kind of processing method and system of data
CN108829528A (en) * 2018-06-11 2018-11-16 腾讯科技(深圳)有限公司 Content share method and device, message treatment method and device
CN109101228A (en) * 2018-08-10 2018-12-28 百度在线网络技术(北京)有限公司 The execution method and apparatus of application program
CN109885360A (en) * 2019-02-28 2019-06-14 北京小米移动软件有限公司 A kind of data processing method, device and storage medium
CN110633432A (en) * 2019-08-19 2019-12-31 深圳汇商通盈科技有限公司 Method, device, terminal equipment and medium for acquiring data
CN115729592A (en) * 2022-11-21 2023-03-03 上海秉匠信息科技有限公司 Page updating method and device, electronic equipment and medium

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070011180A1 (en) * 2003-06-13 2007-01-11 Microsoft Corporation Systems and methods for enhanced stored data verification utilizing pageable pool memory
US20100037150A1 (en) * 2008-08-05 2010-02-11 Accenture Global Services Gmbh Synchronous to Asynchronous Web Page Conversion
CN102137119A (en) * 2011-04-26 2011-07-27 苏州阔地网络科技有限公司 Method and system for synchronously browsing webpage based on webpage
CN102137118A (en) * 2011-04-26 2011-07-27 苏州阔地网络科技有限公司 Method and system for web security synchronous browse based on webpage
CN102750283A (en) * 2011-04-20 2012-10-24 阿里巴巴集团控股有限公司 Massive data synchronization system and method
CN103200146A (en) * 2012-01-04 2013-07-10 中国移动通信集团安徽有限公司 Method and device for data synchronism of terminal and server
CN103617485A (en) * 2013-11-15 2014-03-05 中国航空无线电电子研究所 Uniform authority management and deployment system
CN104866316A (en) * 2015-06-02 2015-08-26 雷虹 Data center middleware system
CN105095360A (en) * 2015-06-25 2015-11-25 小米科技有限责任公司 Method and device for processing user requests for browser
CN105208032A (en) * 2015-09-30 2015-12-30 北京奇虎科技有限公司 Asynchronous login method and device

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070011180A1 (en) * 2003-06-13 2007-01-11 Microsoft Corporation Systems and methods for enhanced stored data verification utilizing pageable pool memory
US20100037150A1 (en) * 2008-08-05 2010-02-11 Accenture Global Services Gmbh Synchronous to Asynchronous Web Page Conversion
CN102750283A (en) * 2011-04-20 2012-10-24 阿里巴巴集团控股有限公司 Massive data synchronization system and method
CN102137119A (en) * 2011-04-26 2011-07-27 苏州阔地网络科技有限公司 Method and system for synchronously browsing webpage based on webpage
CN102137118A (en) * 2011-04-26 2011-07-27 苏州阔地网络科技有限公司 Method and system for web security synchronous browse based on webpage
CN103200146A (en) * 2012-01-04 2013-07-10 中国移动通信集团安徽有限公司 Method and device for data synchronism of terminal and server
CN103617485A (en) * 2013-11-15 2014-03-05 中国航空无线电电子研究所 Uniform authority management and deployment system
CN104866316A (en) * 2015-06-02 2015-08-26 雷虹 Data center middleware system
CN105095360A (en) * 2015-06-25 2015-11-25 小米科技有限责任公司 Method and device for processing user requests for browser
CN105208032A (en) * 2015-09-30 2015-12-30 北京奇虎科技有限公司 Asynchronous login method and device

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108595656A (en) * 2018-04-28 2018-09-28 宁波银行股份有限公司 A kind of processing method and system of data
CN108595656B (en) * 2018-04-28 2022-02-18 宁波银行股份有限公司 Data processing method and system
CN108829528A (en) * 2018-06-11 2018-11-16 腾讯科技(深圳)有限公司 Content share method and device, message treatment method and device
CN109101228A (en) * 2018-08-10 2018-12-28 百度在线网络技术(北京)有限公司 The execution method and apparatus of application program
CN109885360A (en) * 2019-02-28 2019-06-14 北京小米移动软件有限公司 A kind of data processing method, device and storage medium
CN109885360B (en) * 2019-02-28 2022-06-03 北京小米移动软件有限公司 Data processing method, device and storage medium
CN110633432A (en) * 2019-08-19 2019-12-31 深圳汇商通盈科技有限公司 Method, device, terminal equipment and medium for acquiring data
CN115729592A (en) * 2022-11-21 2023-03-03 上海秉匠信息科技有限公司 Page updating method and device, electronic equipment and medium

Also Published As

Publication number Publication date
CN107203576B (en) 2020-06-05

Similar Documents

Publication Publication Date Title
CN107203576A (en) Information synchronization method and device
CN108733991B (en) Webpage application access method and device and storage medium
CN107623690A (en) Login method, equipment and storage medium
US6363479B1 (en) System and method for signing markup language data
CN104519050B (en) Login method and login system
CN107622135A (en) Method and apparatus for display information
CN110930147B (en) Offline payment method and device, electronic equipment and computer-readable storage medium
CN103051603A (en) Information processing system, image processing apparatus, control method, and storage medium
CN104820944A (en) Method and system for bank self-service terminal authentication, and device
CN107295095A (en) The method and apparatus for pushing and showing advertisement
KR20180004224A (en) Payment methods, devices and systems
CN105101122A (en) Verification code inputting method and device
CN101251918A (en) Advertisement content creating verification information system and method
CN107426711A (en) Bind or unbind the method, apparatus and system of cell-phone number
CN105635036B (en) A kind of verification system and method for electronic ID card
CN106408291A (en) Cardless transaction method and system
CN109284599A (en) It the use of portable electronic device is the method and system that user creates strong authentication
US20140172532A1 (en) Optimal utilization of coupons
CN106778290A (en) A kind of application software verification method and system based on wechat platform
CN104767614A (en) Information authentication method and device
CN106682491A (en) Application downloading method and device
CN110022350A (en) The treating method and apparatus of client registers and registration information
CN107656910A (en) Method and apparatus for generating list
CN105791249A (en) Third-party application processing method, device and system
CN105701198A (en) Page validation method and device

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
GR01 Patent grant
GR01 Patent grant