CN104580406B - A kind of method and apparatus of synchronous logging state - Google Patents

A kind of method and apparatus of synchronous logging state Download PDF

Info

Publication number
CN104580406B
CN104580406B CN201410815961.8A CN201410815961A CN104580406B CN 104580406 B CN104580406 B CN 104580406B CN 201410815961 A CN201410815961 A CN 201410815961A CN 104580406 B CN104580406 B CN 104580406B
Authority
CN
China
Prior art keywords
information
login sessions
locally applied
web page
module
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.)
Active
Application number
CN201410815961.8A
Other languages
Chinese (zh)
Other versions
CN104580406A (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 Baidu Netcom Science and Technology Co Ltd
Original Assignee
Beijing Baidu Netcom Science and 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 Baidu Netcom Science and Technology Co Ltd filed Critical Beijing Baidu Netcom Science and Technology Co Ltd
Priority to CN201410815961.8A priority Critical patent/CN104580406B/en
Publication of CN104580406A publication Critical patent/CN104580406A/en
Priority to PCT/CN2015/087219 priority patent/WO2016101635A1/en
Application granted granted Critical
Publication of CN104580406B publication Critical patent/CN104580406B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/08Network architectures or network communication protocols for network security for authentication of entities
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/10Network architectures or network communication protocols for network security for controlling access to devices or network resources
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L65/00Network arrangements, protocols or services for supporting real-time applications in data packet communication
    • H04L65/40Support for services or applications

Abstract

The present invention provides a kind of method and apparatus of synchronous logging state, and when web page is loaded, the execution module on the web page sends the request for obtaining login sessions information to local http service module;After local http service module receives the request, it determines locally applied where login sessions information, from the login sessions information of the locally applied acquisition currently logged on user where login sessions information, the login sessions information that will acquire returns to the execution module on web page;Execution module on web page carries out automated log on using login sessions information.Locally applied logging state can be synchronized on other locally applied loaded pages by the present invention, as long as being in logging state there are locally applied in intelligent terminal, so automated log on can be realized with the locally applied web page for belonging to same Accounting system domain name when user opens in an intelligent terminal, user's operation is reduced, user experience is promoted.

Description

A kind of method and apparatus of synchronous logging state
[technical field]
The present invention relates to computer application technology, in particular to a kind of method and apparatus of synchronous logging state.
[background technique]
Current most of Large-Scale Interconnected net service providers both provided the web app clothes of (network application) to intelligent terminal Business also provides the service of native app (locally applied).Wherein web app is operate on network and standard browser, base The application for realizing specific function is developed in web technologies, native app is answering for the operating system based on intelligent terminal With.Such as Baidu company provide discussion bar, know be web app product, Baidu mobile phone bodyguard is the product of native app, Many products are both there is web app there is also native app, such as Baidu map, Baidu's video etc. either web The product of app is also possible to the product of native app.
Based on features described above, user is when using the different product of same service provider, usually using same account, but It needs to log in respectively on each product respectively, this obviously brings trouble and inconvenience to user's operation, therefore trend is intended to It is enough so that user is when using the different product of same service provider, can automatic synchronization logging state to different product.
What is had been carried out at present is in stepping between the different product of same services provider in the same native app Record state synchronized, such as user is in Baidu's mobile phone browser after logon account, so that it may by logging state be synchronized to it is all The web page for the Baidu's product line opened in Baidu's mobile phone browser.Its implementation is browser by the login sessions of user Information is recorded in user's cookie file corresponding to the system domain name for the user account, so that when under the domain name Web page when being loaded in the browser, login sessions information can be obtained directly from cookie, utilizes the login meeting It talks about information and carries out automated log on.Since majority operation system is for security consideration, can all be separately maintained for each application process A independent cookie data, the cookie data of different application process is unable to intercommunication, therefore cannot achieve native The logging state of app is synchronized on the page that other native app are loaded.
[summary of the invention]
In view of this, the present invention provides a kind of method and apparatus of synchronous logging state, in order to realize native The logging state of app is synchronized on the page that other native app are loaded.
Specific technical solution is as follows:
A kind of method of synchronous logging state, this method comprises:
When web page is loaded, the execution module on the web page, which sends to obtain to local http service module, logs in meeting Talk about the request of information;
After local http service module receives the request for obtaining login sessions information, where determining login sessions information It is locally applied, from the login sessions information of the locally applied acquisition currently logged on user where login sessions information, will acquire Login sessions information returns to the execution module on the web page;
Execution module on the web page carries out automated log on using the login sessions information.
A preferred embodiment according to the present invention, this method further include: the local where the local http service module After starting, the local http service module is initialized so that the local http service module listens to preset local network Network port;
Execution module on the web page sends the request packet for obtaining login sessions information to local http service module Include: the execution module on the web page sends the acquisition login sessions information to the preset local network port Request.
A preferred embodiment according to the present invention, locally applied where the determining login sessions information include:
The application identification information that the local http service module includes according to the request for obtaining login sessions information, Determine that the application identification information is corresponding locally applied.
A preferred embodiment according to the present invention, it is locally applied where the determining login sessions information further include:
If the request for obtaining login sessions information does not include the application identification information, the local http clothes Module of being engaged in determines locally applied where login sessions information according to preset configuration information.
A preferred embodiment according to the present invention, the request for obtaining login sessions information include JS call back function letter Breath;
It includes: to utilize acquisition that the login sessions information that will acquire, which returns to the execution module on the web page, Login sessions information and the JS call back function information, which generate, executes code, and the execution code is returned to the web page On execution module;
It includes: the Web page that execution module on the web page, which carries out automated log on using the login sessions information, Execution module on face executes the execution code to complete automated log on.
A preferred embodiment according to the present invention, before locally applied where the determining login sessions information, also Include:
Whether local http service module judges the refer source address of the request for obtaining login sessions information pre- If domain name within the scope of, if it is, locally applied where continuing to execute the determining login sessions information;Otherwise, refuse It responds the execution module on the web page or the execution module on the web page returns to the information of instruction mistake.
A preferred embodiment according to the present invention is currently stepped in the locally applied acquisition where the information from login sessions Before the login sessions information for employing family further include:
The local http service module locally applied is by what calling system interface judged where login sessions information It is no to be already installed on local, if so, currently being logged in described in continuing to execute from the locally applied acquisition where login sessions information The login sessions information of user;Otherwise, the execution module on Xiang Suoshu web page returns to the information of instruction mistake.
A preferred embodiment according to the present invention, the locally applied acquisition where the information from login sessions currently log in The login sessions information of user includes:
If the locally applied local with where the login sessions information where the local http service module is answered With being the same application, then the local http service module is same locally applied to being located at by way of intra process communication Conversation information maintenance module sends request, and obtains the login sessions of the currently logged on user of conversation information maintenance module return Information;Alternatively,
If the locally applied local with where the login sessions information where the local http service module is answered With application is different, then the local http service module is by way of interprocess communication to the login sessions information institute It is locally applied in conversation information maintenance module send request, and obtain the conversation information maintenance module return currently step on Employ the login sessions information at family.
A preferred embodiment according to the present invention, this method further include:
After execution module automated log on the web page, logging state information and login sessions information are stored in In locally applied cookie where web page.
A preferred embodiment according to the present invention, the execution module on the web page are sent out to local http service module Before the request for sending acquisition login sessions information, further includes:
Judge in the locally applied cookie in the web page place with the presence or absence of corresponding login sessions information, if It is to be logged in using corresponding login sessions information in the locally applied cookie where the web page;Otherwise it executes It is described that the request for obtaining login sessions information is sent to local http service module.
The present invention also provides a kind of device of synchronous logging state, which includes:
Execution module on web page, for sending and obtaining to local http service module when web page is loaded The request of login sessions information;Automated log on is carried out using the login sessions information that local http service module returns;
Local http service module determines login sessions information after receiving the request for obtaining login sessions information Place it is locally applied, will from the login sessions information of the locally applied acquisition currently logged on user where login sessions information The login sessions information of acquisition returns to the execution module on the web page.
A preferred embodiment according to the present invention, the local http service module, for by the locally applied first of place After beginningization, preset local network port is listened to;
Execution module on the web page is specifically used for sending the acquisition to the preset local network port The request of login sessions information.
A preferred embodiment according to the present invention, the local http service module is where determining login sessions information When locally applied, specifically for according to the request application identification information that includes for obtaining login sessions information, described in determination Application identification information is corresponding locally applied.
A preferred embodiment according to the present invention, the local http service module log in if being also used to the acquisition The request of session information does not include the application identification information and determines login sessions information institute then according to preset configuration information It is locally applied.
A preferred embodiment according to the present invention, the local http service module are returned in the login sessions information that will acquire It is specific to execute when back to execution module on the web page: to utilize the login sessions information obtained and acquisitions login meeting It talks about the JS call back function information for including in the request of information and generates execution code, the execution code is returned into the Web page Execution module on face;
Execution module on the web page, specifically for executing the execution code to complete automated log on.
A preferred embodiment according to the present invention, local http service module are also used to determining login sessions information institute It is locally applied before, judge it is described obtain login sessions information request refer source address whether in preset domain In name range, if it is, locally applied where continuing to execute the determining login sessions information;Otherwise, institute is refused to respond It states the execution module on web page or the execution module on the web page returns to the information of instruction mistake.
A preferred embodiment according to the present invention, the local http service module is from the sheet where login sessions information The login sessions information that ground application obtains currently logged on user is also used to before, judges that login sessions are believed by calling system interface Whether the locally applied of breath place is already installed on local, if so, continuing to execute described from the sheet where login sessions information Ground application obtains the login sessions information of currently logged on user;Otherwise, it is wrong to return to instruction for the execution module on Xiang Suoshu web page Information accidentally.
A preferred embodiment according to the present invention, the device further include conversation information maintenance module;
The local http service module is from the locally applied acquisition currently logged on user's where login sessions information It is specific to execute: if the locally applied and login sessions where the local http service module when login sessions information Locally applied where information is the same application, then by way of intra process communication to being located at same locally applied session Maintenance of information module sends request, and obtains the login sessions letter of the currently logged on user of conversation information maintenance module return Breath;Alternatively, if the locally applied local with where the login sessions information where the local http service module is answered With application is different, then to the session in locally applied where the login sessions information by way of interprocess communication Maintenance of information module sends request, and obtains the login sessions letter of the currently logged on user of conversation information maintenance module return Breath;
The conversation information maintenance module, after receiving the request that the local http service module is sent, to institute State the login sessions of locally applied middle currently logged on user where local http service module returns to the conversation information maintenance module Information.
A preferred embodiment according to the present invention, the execution module on the web page, is also used to after automated log on, Logging state information and login sessions information are stored in the locally applied cookie where web page.
A preferred embodiment according to the present invention, the execution module on the web page are also used to take to local http Before module of being engaged in sends the request for obtaining login sessions information, judge be in locally applied cookie where the web page No there are corresponding login sessions information, if so, using corresponding in the locally applied cookie where the web page Login sessions information is logged in;Otherwise it executes described send to local http service module and obtains asking for login sessions information It asks.
As can be seen from the above technical solutions, the logging state of native app can be synchronized to other by the present invention On the loaded page of native application, as long as there are native app to be in logging state in intelligent terminal, then working as user Opening can be realized with the native app web page for belonging to same Accounting system domain name in an intelligent terminal steps on automatically Record reduces user's operation, promotes user experience.
[Detailed description of the invention]
Fig. 1 is structure drawing of device provided in an embodiment of the present invention;
Fig. 2 is method flow diagram provided in an embodiment of the present invention.
[specific embodiment]
To make the objectives, technical solutions, and advantages of the present invention clearer, right in the following with reference to the drawings and specific embodiments The present invention is described in detail.
Apparatus structure provided by the invention is introduced first in order to facilitate understanding, as shown in fig. 1, which can be with It include: execution module, local http service module and the log-on message maintenance module on web page.
Wherein the execution module on web page can be realized using Javascript, be responsible for when web page is loaded, The request for obtaining login sessions information is sent to local http service module.The login meeting returned using local http service module Login of the information realization on web page is talked about, and further login sessions information can be stored in where the web page In the cookie of native app.
Local http service module is built in some native app, is responsible for receiving the execution module on web page The request of the acquisition login sessions information of transmission, determines the native app where the login sessions information, and to login sessions Native app where information sends the request for obtaining login sessions information;Obtain the native where login sessions information The login sessions information that app is returned, and the login sessions information that will acquire returns to the execution module on web page.
Log-on message maintenance module is built in native app for safeguarding login sessions information, and local http is answered to take The request for module of being engaged in returns to the login sessions information of currently logged on user to local http service module.
Above-mentioned log-on message maintenance module and local http service module can be positioned at the same native app, can also be with Positioned at different native app, the above-mentioned web page containing execution module can be answered in any native that can load web page It is loaded, can be loaded in the native app where above-mentioned log-on message maintenance module with interior, it can also be in above-mentioned local Native app where http service module is loaded, and can also be loaded in any other native app.
Method provided by the invention is described in detail below with reference to Fig. 2.Fig. 2 is method provided in an embodiment of the present invention Flow chart, as shown in Figure 2, this method may comprise steps of:
In 201, the native app for being built-in with local http service module after actuation, initializes local http service Module is to listen to preset local network port.
This step is pre- the step of first carrying out, after initializing local http service module, local http service module energy It is enough that a preset local network port is listened to, receive the http request for being sent to the local network port.
In 202, when there is some native app (such as mobile phone browser) to load web page, holding on web page Row module sends the http request for obtaining login sessions information to preset local network port.The http request, which may include, steps on The application identification information (i.e. the identification information of target application) where session information is recorded, can also include JS call back function information.
Wherein the application identification information where login sessions information is set in execution module in advance, a service The web page of provider correspond to login sessions information where native app be also same service provider other products, I.e. account uses identical system domain name, in this application mark where login sessions information can be arranged in execution module in advance Know information.For example, answering where can presetting login sessions information in the execution module on the web page of Baidu map With the identification information for the native app that the identification information for the native app that identification information is Baidu map or Baidu are known Deng.The application identification information can include but is not limited to the packet name or packet signature information of application, in addition, application identities letter here Breath can be one, be also possible to more than one application identification information.
In addition, in this step, after loading web page, the execution module on web page can first determine whether the Web page Corresponding login sessions information whether is had existed in the cookie of native app where face, it, can be with if had existed Directly logged in using the login sessions information in cookie.If it does not, being sent again to preset local network port Obtain the http request of login sessions information.
In 203, local http service module listens to above-mentioned http request from preset local network port.
In 204, local http service module judges the legitimacy of http request, if it is legitimate request, continues to execute 205;If it is illegal request, then the information of instruction mistake is directly refused to respond or returns.
Whether the refer (source address) that http request can be verified in this step judges within the scope of preset domain name The legitimacy of http request, if within the scope of the no longer preset domain name of the refer of http request, it is determined that the http request is non- Method, if within the scope of preset domain name, it is determined that the http request is legal.Above-mentioned domain name range can be pre-set at local It, can also be in such a way that cloud issues configuration information to the domain name range in local http service module in http service module It is configured.
The setting of domain name range synchronizes the application range of this method typically to limitation logging state in this step, It can be not limited, therefore this step is an optional step.
In 205, the native app where determining the login sessions information that the http request obtains (determines that target is answered With).
If directly determining the application identities comprising the application identification information where login sessions information in http request The corresponding native app of information.If not including the application identification information where login sessions information in http request, this Ground http service module can determine the native app where login sessions information according to preset configuration information.
The configuration information here preset at can be the native app information of default, i.e., answers if do not included in http request With identification information, local http service module is just using the native app of default as the native where login sessions information app.For example, Baidu mobile phone assistant, which can be set, in Baidu company is used as default native app, once the http request received In without specified target application, then using Baidu mobile phone assistant as target application.It can will always be in logging state, or make The native app for using the higher native app of rate as default is configured in local http service module.
In 206, local http service module judges that the native app determined in 205 is by calling system interface It is no to be already installed on local, if so, executing 207;Otherwise, the information of instruction mistake is returned.
In 207, local http service module, which sends to obtain to the native app where login sessions information, logs in meeting Talk about the request of information.
If the native app and native app where login sessions information where the http service module of local is The same app, then local http service module sent by the way of intra process communication obtain login sessions information request to Native app where login sessions information.If the native app and login sessions where the http service module of local believe Native app where breath is different app, then local http service module sends acquisition by the way of interprocess communication The request of login sessions information is to the native app where login sessions information.The mode of interprocess communication can use but not It is limited to the mode of pipeline, the mode of shared drive, mode of socket etc..
In 208, log-on message maintenance module receives acquisition and logs in the native app where login sessions information After the request of session information, the login sessions information of currently logged on user is returned into local http service module.
Local http service module can send the request to the default end of the native app where login sessions information Mouthful, log-on message maintenance module can receive the request by the default port.
If the determination of log-on message maintenance module is currently at the state of being not logged in, the information of instruction mistake can be returned. In addition, in order to guarantee that safety, the login sessions information of return can carry out encryption and return in the form of encrypting string.
In 209, local http service module is generated to log in and be executed using login sessions information and JS call back function information Code will log in execution code and return to the execution module on web page.
Execution module on local http service module and web page is using shapes such as JSONP, web socket (socket) Formula carries out http interaction.
In 210, the execution module on web page executes the login received and executes code, completes to utilize login sessions Information automated log on, and login sessions information is stored in the cookie of web page place native app.
After execution module on web page receives login execution code, the code is executed automatically.Execute the process of code The relevant treatment logic logged on web page exactly is completed using login sessions information, including is obtained from login sessions information Account information, such as user name, password etc. are taken, inputs account information on web page to request to log in.
After automated log on, logging state information and login sessions information can store the native where web page It provides login sessions information in the cookie of app, when for the native app as target application to use, also for next time at this When loading the web page of same service provider in native app, i.e., the system domain famous prime minister of account is meanwhile, it is capable to directly use Login sessions information in the cookie of the native app is logged in.
In addition, may be multiple in the native app where the login sessions information determined in 205, then locally Http service module may receive the login sessions information that multiple native app are returned.If the multiple login sessions returned Account information is identical in information, then generates execution code using one of login sessions information and return on web page Execution module.But there is also it is other a possibility that, that is, account information is different in multiple login sessions information for returning , such as there are two the app that Baidu's account log in Liao Liangge Baidu product respectively for possibility in mobile phone, then local http is serviced Module can use multiple login sessions information and JS call back function information generates to log in and executes code.The login executes code and exists During being executed by the execution module on web page, the account information in multiple login sessions information can be supplied to user It is selected for user, and the account information according to user's selection carries out automated log on.Certainly, local http service module can also be adopted In other ways, such as from multiple login sessions information one is selected to execute code to generate to log in.
It cites an actual example below, when user opens the web page of Baidu map on a web browser, if browser local Cookie does not have the corresponding login sessions information of the account domain name of Baidu map, then the execution module on the web page is to default Local network port send the http request for obtaining login sessions information, in the http request comprising JS call back function information and Target application identification information, wherein target application identification information may include the native app of Baidu map packet name information, The packet name information of the native app of the packet name information and Baidu music of the native app of Baidu's discussion bar.
Assuming that local http service module is built in the native app of Baidu's discussion bar, then local http service module Above-mentioned http request can be got by listening to preset local network port.Assuming that the offer of the http request is legal, according to According to target application identification information therein, to native app of locally-installed Baidu map, the native of Baidu music Session maintenance module in the native app of app and Baidu's discussion bar sends the request for obtaining login sessions information.Wherein to The native app of Baidu map and the native app of Baidu music send request by the way of interprocess communication.
Each session maintenance module judges whether this native app is in logging state respectively, if being in logging state, Execution code then, which is generated, using corresponding login sessions information and JS call back function returns to local http service module.By local Http service module returns to the execution module on the web page of Baidu map, which executes above-mentioned execution code, complete At automated log on.As long as there is a target application to be in logging state, it will be able to return and execute code by the execution on web page Module automated log on.
Here, if local http service module receives multiple login sessions information, and the account in login sessions information Family information is different, then can use multiple login sessions information and generate execution code.Execution module on web page is somebody's turn to do in execution During executing code, user's selection can be allowed which account information to carry out automated log on, and the account selected according to user using Family information carries out automated log on.
As it can be seen that if user has used the native app of service provider to log in an intelligent terminal, that The web page that same service provides is opened in other native app can carry out automated log on.
In several embodiments provided by the present invention, it should be understood that disclosed device and method can pass through it Its mode is realized.For example, the apparatus embodiments described above are merely exemplary, for example, the division of the unit, only Only a kind of logical function partition, there may be another division manner in actual implementation.
The unit as illustrated by the separation member may or may not be physically separated, aobvious as unit The component shown may or may not be physical unit, it can and it is in one place, or may be distributed over multiple In network unit.It can select some or all of unit therein according to the actual needs to realize the mesh of this embodiment scheme 's.
It, can also be in addition, the functional units in various embodiments of the present invention may be integrated into 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 hardware adds SFU software functional unit.
The above-mentioned integrated unit being realized in the form of SFU software functional unit can store and computer-readable deposit at one In storage media.Above-mentioned SFU software functional unit is stored in a storage medium, including some instructions are used so that a computer It is each that equipment (can be personal computer, server or the network equipment etc.) or processor (processor) execute the present invention The part steps of embodiment the method.And storage medium above-mentioned includes: USB flash disk, mobile hard disk, read-only memory (Read- Only Memory, ROM), random access memory (Random Access Memory, RAM), magnetic or disk etc. it is various It can store the medium of program code.
The foregoing is merely illustrative of the preferred embodiments of the present invention, is not intended to limit the invention, all in essence of the invention Within mind and principle, any modification, equivalent substitution, improvement and etc. done be should be included within the scope of the present invention.

Claims (16)

1. a kind of method of synchronous logging state, which is characterized in that this method comprises:
After locally applied starting where local http service module, the local http service module is initialized so that described Ground http service module listens to preset local network port;
When web page is loaded, the execution module on the web page sends to obtain to the preset local network port to be logged in The request of session information;
After local http service module receives the request for obtaining login sessions information, the request according to the login sessions information The application identification information for including or preset configuration information, determine it is locally applied where login sessions information, from logging in meeting The login sessions information of the locally applied acquisition currently logged on user where information is talked about, the login sessions information that will acquire returns to Execution module on the web page;
Execution module on the web page carries out automated log on using the login sessions information.
2. the method according to claim 1, wherein the application that the request according to the login sessions information includes Identification information or preset configuration information, determine where login sessions information locally applied includes:
If the request for obtaining login sessions information does not include the application identification information, the local http services mould Block determines locally applied where login sessions information according to preset configuration information.
3. the method according to claim 1, wherein the request for obtaining login sessions information includes JS readjustment Function information;
It includes: to utilize the login obtained that the login sessions information that will acquire, which returns to the execution module on the web page, Session information and the JS call back function information, which generate, executes code, and the execution code is returned on the web page Execution module;
It includes: on the web page that execution module on the web page, which carries out automated log on using the login sessions information, Execution module execute the execution code to complete automated log on.
4. the method according to claim 1, wherein locally applied where the determining login sessions information Before, further includes:
Whether local http service module judges the refer source address of the request for obtaining login sessions information preset Within the scope of domain name, if it is, locally applied where continuing to execute the determining login sessions information;Otherwise, it refuses to respond Execution module on the web page or the execution module on the web page return to the information of instruction mistake.
5. the method according to claim 1, wherein being obtained in locally applied where the information from login sessions Before taking the login sessions information of currently logged on user further include:
The local http service module by calling system interface judge where login sessions information it is locally applied whether Through being mounted on local, if so, continuing to execute described from the locally applied acquisition currently logged on user where login sessions information Login sessions information;Otherwise, the execution module on Xiang Suoshu web page returns to the information of instruction mistake.
6. according to claim 1 to method described in 5 any claims, which is characterized in where the information from login sessions It is locally applied obtain currently logged on user login sessions information include:
If locally applied where with the login sessions information locally applied where the local http service module is The same application, then the local http service module is by way of intra process communication to positioned at same locally applied session Maintenance of information module sends request, and obtains the login sessions letter of the currently logged on user of conversation information maintenance module return Breath;Alternatively,
If locally applied where with the login sessions information locally applied where the local http service module is Different applications, then the local http service module is by way of interprocess communication to where the login sessions information Conversation information maintenance module in locally applied sends request, and the current login for obtaining conversation information maintenance module return is used The login sessions information at family.
7. according to claim 1 to method described in 5 any claims, which is characterized in that this method further include:
After execution module automated log on the web page, logging state information and login sessions information are stored in Web page In locally applied cookie where face.
8. the method according to the description of claim 7 is characterized in that the execution module on the web page takes to local http Module of being engaged in is sent before the request for obtaining login sessions information, further includes:
Judge in the locally applied cookie in the web page place with the presence or absence of corresponding login sessions information, if so, making It is logged in login sessions information corresponding in the locally applied cookie where the web page;Otherwise described in executing The request for obtaining login sessions information is sent to local http service module.
9. a kind of device of synchronous logging state, which is characterized in that the device includes:
Local http service module listens to preset local network port after the locally applied initialization by place;
Execution module on web page, for being obtained to the preset local network port transmission when web page is loaded Take the request of login sessions information;Automated log on is carried out using the login sessions information that local http service module returns;
Local http service module is believed after being also used to receive the request for obtaining login sessions information according to the login sessions The application identification information or preset configuration information that the request of breath includes, determine it is locally applied where login sessions information, From the login sessions information of the locally applied acquisition currently logged on user where login sessions information, the login sessions that will acquire are believed Breath returns to the execution module on the web page.
10. device according to claim 9, which is characterized in that the local http service module, if being specifically used for institute The request for obtaining login sessions information is stated not comprising the application identification information, then according to preset configuration information, determines and logs in It is locally applied where session information.
11. device according to claim 9, which is characterized in that the local http service module is in the login that will acquire It is specific to execute when session information returns to the execution module on the web page: to utilize the login sessions information that obtains and described It obtains the JS call back function information for including in the request of login sessions information and generates execution code, the execution code is returned to Execution module on the web page;
Execution module on the web page, specifically for executing the execution code to complete automated log on.
12. device according to claim 9, which is characterized in that local http service module is also used to determining login meeting Talk about information where it is locally applied before, judge it is described acquisition login sessions information request refer source address whether Within the scope of preset domain name, if it is, locally applied where continuing to execute the determining login sessions information;Otherwise, it refuses Lost art answers the execution module on the web page or the execution module on the web page to return to the information of instruction mistake.
13. device according to claim 9, which is characterized in that the local http service module is believed from login sessions It is also used to before the login sessions information of locally applied acquisition currently logged on user where ceasing, is judged by calling system interface Whether locally applied where login sessions information is already installed on local, described believes from login sessions if so, continuing to execute The login sessions information of locally applied acquisition currently logged on user where ceasing;Otherwise, the execution module on Xiang Suoshu web page Return to the information of instruction mistake.
14. according to device described in any claim of claim 9 to 13, which is characterized in that the device further includes session information dimension Protect module;
The local http service module is in the login from the locally applied acquisition currently logged on user where login sessions information It is specific to execute: if the locally applied and login sessions information where the local http service module when session information The locally applied of place is the same application, then to positioned at same locally applied session information by way of intra process communication Maintenance module sends request, and obtains the login sessions information of the currently logged on user of conversation information maintenance module return;Or Person, if locally applied where the locally applied and login sessions information where the local http service module is not With application, then to the session information dimension in locally applied where the login sessions information by way of interprocess communication It protects module and sends request, and obtain the login sessions information of the currently logged on user of conversation information maintenance module return;
The conversation information maintenance module, after receiving the request that the local http service module is sent, to described The login sessions information of locally applied middle currently logged on user where ground http service module returns to the conversation information maintenance module.
15. according to device described in any claim of claim 9 to 13, which is characterized in that the execution mould on the web page Block is also used to after automated log on, logging state information and login sessions information is stored in locally applied where web page Cookie in.
16. device according to claim 15, which is characterized in that the execution module on the web page, be also used to Before local http service module sends the request for obtaining login sessions information, judge that the web page place is locally applied It whether there is corresponding login sessions information in cookie, if so, using locally applied where the web page Corresponding login sessions information is logged in cookie;Otherwise it executes described send to local http service module and obtains login The request of session information.
CN201410815961.8A 2014-12-23 2014-12-23 A kind of method and apparatus of synchronous logging state Active CN104580406B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201410815961.8A CN104580406B (en) 2014-12-23 2014-12-23 A kind of method and apparatus of synchronous logging state
PCT/CN2015/087219 WO2016101635A1 (en) 2014-12-23 2015-08-17 Method, apparatus and device for synchronizing login status, and computer storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410815961.8A CN104580406B (en) 2014-12-23 2014-12-23 A kind of method and apparatus of synchronous logging state

Publications (2)

Publication Number Publication Date
CN104580406A CN104580406A (en) 2015-04-29
CN104580406B true CN104580406B (en) 2019-11-26

Family

ID=53095564

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410815961.8A Active CN104580406B (en) 2014-12-23 2014-12-23 A kind of method and apparatus of synchronous logging state

Country Status (2)

Country Link
CN (1) CN104580406B (en)
WO (1) WO2016101635A1 (en)

Families Citing this family (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104580406B (en) * 2014-12-23 2019-11-26 北京百度网讯科技有限公司 A kind of method and apparatus of synchronous logging state
CN106572068A (en) * 2015-10-13 2017-04-19 阿里巴巴集团控股有限公司 Account synchronous login method and device
CN105610938B (en) * 2015-12-24 2019-02-15 广州爱九游信息技术有限公司 Logging state synchronous method and system
CN105791324B (en) 2016-05-12 2019-12-06 腾讯科技(深圳)有限公司 Account login method and device
CN107995245B (en) * 2016-10-27 2019-03-15 腾讯科技(深圳)有限公司 A kind of method and terminal of resource-sharing
CN106790269B (en) * 2017-02-15 2020-09-29 东软集团股份有限公司 Recovery method and device for overtime login of application program
US10812465B2 (en) 2017-09-20 2020-10-20 Hisense Mobile Communications Technology Co., Ltd. Method for logging into account on mobile device, mobile device, and non-transitory computer readable storage medium
CN110650129B (en) * 2017-09-20 2022-02-18 青岛海信移动通信技术股份有限公司 Account login method and device and computer readable storage medium
CN109040072B (en) * 2018-08-06 2021-03-12 武汉斗鱼网络科技有限公司 Method, system, server and storage medium for client to authorize login of webpage
CN109375960B (en) * 2018-09-29 2021-10-01 郑州云海信息技术有限公司 Copyright information loading method and device
CN109547237A (en) * 2018-11-02 2019-03-29 航天信息股份有限公司 A kind of monitoring system and method for web application
CN111353142A (en) * 2019-02-15 2020-06-30 鸿合科技股份有限公司 User information sharing method and device and electronic equipment
CN109981781B (en) * 2019-03-27 2021-08-06 深圳市网心科技有限公司 Data processing method and system, electronic device and storage medium
CN110224924B (en) * 2019-05-21 2021-04-09 腾讯科技(深圳)有限公司 State updating method and device, storage medium and electronic device
CN112069476B (en) * 2020-09-16 2022-07-12 杭州安恒信息技术股份有限公司 Login state detection method, device, equipment and readable storage medium
CN114827158A (en) * 2021-01-18 2022-07-29 网宿科技股份有限公司 Configuration information loading method, system and server

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101369272A (en) * 2007-08-17 2009-02-18 徐萍 Auto-filling system and method for auto-filling registration or login information
CN101504616A (en) * 2009-03-23 2009-08-12 金蝶软件(中国)有限公司 Method and apparatus for login of Windows application program through Web application
CN102495855A (en) * 2011-11-21 2012-06-13 奇智软件(北京)有限公司 Automatic login method and device
CN102638454A (en) * 2012-03-14 2012-08-15 武汉理工大学 Plug-in type SSO (single signon) integration method oriented to HTTP (hypertext transfer protocol) identity authentication protocol
CN102882903A (en) * 2011-07-12 2013-01-16 腾讯科技(深圳)有限公司 Method and system for acquiring multi-site application information
CN102984218A (en) * 2012-11-12 2013-03-20 北京奇虎科技有限公司 Browser and login method thereof and login system thereof

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102065141B (en) * 2010-12-27 2014-05-07 广州欢网科技有限责任公司 Method and system for realizing single sign-on of cross-application and browser
US8881250B2 (en) * 2011-06-17 2014-11-04 Ebay Inc. Passporting credentials between a mobile app and a web browser
CN104519050B (en) * 2014-11-14 2019-03-12 百度在线网络技术(北京)有限公司 Login method and login system
CN104580406B (en) * 2014-12-23 2019-11-26 北京百度网讯科技有限公司 A kind of method and apparatus of synchronous logging state
CN104735066B (en) * 2015-03-18 2018-10-16 百度在线网络技术(北京)有限公司 A kind of single-point logging method of object web page application, device and system

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101369272A (en) * 2007-08-17 2009-02-18 徐萍 Auto-filling system and method for auto-filling registration or login information
CN101504616A (en) * 2009-03-23 2009-08-12 金蝶软件(中国)有限公司 Method and apparatus for login of Windows application program through Web application
CN102882903A (en) * 2011-07-12 2013-01-16 腾讯科技(深圳)有限公司 Method and system for acquiring multi-site application information
CN102495855A (en) * 2011-11-21 2012-06-13 奇智软件(北京)有限公司 Automatic login method and device
CN102638454A (en) * 2012-03-14 2012-08-15 武汉理工大学 Plug-in type SSO (single signon) integration method oriented to HTTP (hypertext transfer protocol) identity authentication protocol
CN102984218A (en) * 2012-11-12 2013-03-20 北京奇虎科技有限公司 Browser and login method thereof and login system thereof

Also Published As

Publication number Publication date
CN104580406A (en) 2015-04-29
WO2016101635A1 (en) 2016-06-30

Similar Documents

Publication Publication Date Title
CN104580406B (en) A kind of method and apparatus of synchronous logging state
US10506440B2 (en) Method and apparatus for detecting tethering in a communications network
CN105099984B (en) The method and apparatus of account intercommunication between a kind of APP
CN105682093A (en) Wireless network access method and access device, and client
JP6522159B2 (en) Voice communication processing method and system, electronic device, and storage medium
CN105450581B (en) The method and apparatus of permission control
CN104660409B (en) The method of system login and certificate server cluster under cluster environment
US9363663B2 (en) Method and apparatus for providing cellphone service from any device
CN110061993B (en) Log generation method and device containing public network exit address and access equipment
CN106302042A (en) The control method of smart machine, device and server
CN104796408B (en) Login method is broadcast live in single-point and entering device is broadcast live in single-point
WO2017080231A1 (en) Method of accessing wireless network and device utilizing same
CN105323243A (en) Method and device for secure voice communication based on instant messaging
CN108600234A (en) A kind of auth method, device and mobile terminal
US9680814B2 (en) Method, device, and system for registering terminal application
CN110730446A (en) Login method, terminal and computer storage medium
CN111049831A (en) Generation control method and device of user hidden identifier and terminal
CN103476025B (en) Progress management method, progress management system and mobile terminal
CN103947173A (en) Method and system for managing the communication between two users
EP3079329B1 (en) Terminal application registration method, device and system
CN107645474A (en) Log in the method for open platform and log in the device of open platform
CN109327455A (en) A kind of access method of NAS device, device, equipment and readable storage medium storing program for executing
CN109981558B (en) Authentication method, equipment and system of intelligent household equipment
RU2641724C2 (en) Method and home gateway for implementation of voice messages functions
CN110781481A (en) Single sign-on method, client, server, and storage medium

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant