WO2020215211A1 - 一种站点会话终止方法、装置、终端设备及介质 - Google Patents

一种站点会话终止方法、装置、终端设备及介质 Download PDF

Info

Publication number
WO2020215211A1
WO2020215211A1 PCT/CN2019/083911 CN2019083911W WO2020215211A1 WO 2020215211 A1 WO2020215211 A1 WO 2020215211A1 CN 2019083911 W CN2019083911 W CN 2019083911W WO 2020215211 A1 WO2020215211 A1 WO 2020215211A1
Authority
WO
WIPO (PCT)
Prior art keywords
user
page
site
tab
parameter
Prior art date
Application number
PCT/CN2019/083911
Other languages
English (en)
French (fr)
Inventor
吴迪
万振华
Original Assignee
深圳开源互联网安全技术有限公司
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 深圳开源互联网安全技术有限公司 filed Critical 深圳开源互联网安全技术有限公司
Priority to CN201980097493.6A priority Critical patent/CN113966590B/zh
Priority to PCT/CN2019/083911 priority patent/WO2020215211A1/zh
Publication of WO2020215211A1 publication Critical patent/WO2020215211A1/zh

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/40Network security protocols
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F17/00Digital computing or data processing equipment or methods, specially adapted for specific functions

Definitions

  • This application belongs to the field of data processing technology, and in particular relates to a method, device, terminal device, and medium for terminating a site session.
  • the site When a user successfully logs in to the site through a tab, the site will return a user’s identity, and the user terminal will store the identity in a cache such as cookies, and send the identity to the site every time a request is sent to the site Sites, to achieve site authentication and data interaction, because the identity is stored in cookies and other caches, so as long as the user does not clear cookies and other caches, there is no need to repeat login operations, which facilitates user site visits.
  • a cache such as cookies
  • the user terminal will send a user logout request to the site, so that the site will perform the user logout operation to end the session.
  • the browser will reload the tab, and the user terminal will again A request to cancel the logout will be sent to the server to cancel the user logout operation.
  • this method can terminate the session with the site when the user closes the tab, it requires the cooperation of the user terminal and the front and back ends of the site server, which has complex logic and low execution efficiency.
  • the embodiments of the present application provide a site session termination method and terminal device to solve the problem in the prior art that it is difficult to effectively control the immediate termination of the session between the user terminal and the site when the user closes the tab.
  • the first aspect of the embodiments of the present application provides a method for terminating a site session, including:
  • If the operation event for the first tab page is page refreshing, clear the identity identifier in the cache, and when the first tab page reloads the page, copy the first user parameters to the cache ID field within;
  • the operation event for the first tab page is to close the page, clear the identity identifier and the first user parameters in the cache, so that the session between the user terminal and the first visited site is terminated .
  • a second aspect of the embodiments of the present application provides a site session termination device, including:
  • the information backup module is used to obtain the identity of the user that is stored in the user terminal cache and corresponds to the first visited site when the user successfully logs in to the first visited site through the first tab page, and combines the The identity is copied to the first user parameter field in the SessionStorage corresponding to the first tab page;
  • the first event monitoring module is used to monitor the operation event of the user on the first tab page
  • the first information retrieving module is configured to, if the operation event on the first tab page is page refresh, clear the identity identifier in the cache, and when the first tab page is reloaded, the first tab page is reloaded. Copy a user parameter to the identity field in the cache;
  • the first information clearing module is configured to, if the operation event on the first tab page is to close the page, clear the identity identifier in the cache and the first user parameter, so that the user terminal and the first user parameter A session between visiting sites is terminated.
  • a third aspect of the embodiments of the present application provides a terminal device.
  • the terminal device includes a memory and a processor.
  • the memory stores a computer program that can run on the processor.
  • the processor executes the The computer program implements the steps of the method for terminating a site session as described above.
  • a fourth aspect of the embodiments of the present application provides a computer-readable storage medium, including a computer program stored therein, characterized in that, when the computer program is executed by a processor, the steps of the method for terminating a site session as described above are implemented.
  • the embodiment of the present application has the beneficial effect that in the browser, the SessionStorage can only temporarily store related data of a single tab, and the stored data will be deleted as the tab is closed.
  • the identity in the cache is backed up to the SessionStorage tab, and the identity in the cache is cleared whenever an operation event occurs, and when the operation is to refresh the page, that is, when the user does not close the tab, reload
  • the ID in SessionStorage is copied back to the cache, so that the user's ID will not be lost, and the site session can continue to be accessed normally, and when the tab page is closed, the ID in SessionStorage will also be included.
  • FIG. 1 is a schematic diagram of the implementation process of the method for terminating a site session provided by Embodiment 1 of the present application;
  • FIG. 2 is a schematic diagram of the implementation process of the method for terminating a site session provided by the second embodiment of the present application;
  • FIG. 3 is a schematic diagram of the implementation process of the method for terminating a site session provided by Embodiment 3 of the present application;
  • FIG. 4 is a schematic diagram of the implementation process of the method for terminating a site session provided by the fourth embodiment of the present application;
  • FIG. 5 is a schematic diagram of the implementation process of the method for terminating a site session provided by Embodiment 5 of the present application;
  • FIG. 6 is a schematic structural diagram of a site session termination apparatus provided by Embodiment 6 of the present application.
  • FIG. 7 is a schematic diagram of a terminal device provided in Embodiment 7 of the present application.
  • SessionStorage can only temporarily store the relevant data of a single tab, and it will follow the tags.
  • LocalStorage can store the related data of all the tabs that visit the same site at the same time, and will not delete the stored data when the tab is closed or the browser is closed.
  • this embodiment of the application will back up the identity identifier to the SessionStorage of the tab. When the user visits the site normally, the identity in the original cache can still be used.
  • the embodiment of this application directly deletes the identity identifier in the cache, and performs the processing of the identity identifier backed up in SessionStorage according to actual operation events. If the page is refreshed, the embodiment of this application copies the identity identifier backed up in SessionStorage back to the cache Among them, to ensure the user's subsequent normal site visits, if the page is closed, the ID in SessionStorage will be cleared, so that as soon as the user closes the tab, all the IDs in the user terminal are cleared , The user terminal can no longer talk to the site, so that it does not rely on back-end code, does not require server interaction, the logic is simpler, and the more efficient execution of the session is immediately terminated, which effectively controls the user when the user closes the tab The session between the terminal and the site is immediately terminated. The details are as follows:
  • Fig. 1 shows an implementation flow chart of a method for terminating a site session provided by Embodiment 1 of the present application, and the details are as follows:
  • S101 When a user successfully logs in to the first visited site through the first tab page, obtain the identity of the user who is stored in the user terminal cache and corresponds to the first visited site, and copy the identity to the corresponding one of the first tab.
  • the first tab page does not specifically refer to a certain tab page, it can be any tab page where a user successfully logs in to the site.
  • any tab page that a user opens in a browser and successfully logs in to a certain site Both can be used as the first tab page in the embodiments of this application. If the browser contains multiple first tab pages, for each first tab page, the method in the embodiment of the present application will be used for monitoring, and the session with the corresponding site will be terminated when the tab page is closed.
  • the site When a user successfully logs in to a site in a tab, the site will return a user’s identity for subsequent session authentication.
  • the identity can be a random string or a string generated according to certain rules.
  • cookies including but not limited to cookies.
  • users may log in to multiple different sites through different tabs at the same time, that is, multiple identities corresponding to multiple different sites may be stored in the cache at the same time. In this embodiment of the application, only Will read the ID returned by the first tab page to be monitored corresponding to the logged-in site.
  • a user parameter with empty field data will be preset in the SessionStorage of the tab, and after the required identification is read, the identification data will be backed up to one of the fields of the SessionStorage user parameter of the tab. In order to realize the backup storage of the identity in SessionStorage.
  • the monitored operation events mainly include page refresh and page closing.
  • the specific monitoring method is not limited here, and can be set by the technicians according to their needs, including but not limited to, for example, by monitoring the browser beforeUnload event Way to realize the monitoring of operation events.
  • the embodiment of the application will first clear the identity data in the cache, and re-copy the identity in SessionStorage when the page is refreshed Return to the cache to ensure that subsequent users can normally read the identity from the cache and ensure subsequent normal conversations with the site.
  • the embodiment of this application will directly clear the identity data in the cache and SessionStorage, so that there is no valid identity of the visited site in the local storage, so that the session between the user terminal and the site is terminated immediately .
  • the sessionStorage is used to back up the identity, and the tab can be emptied when it is closed. It will not continue to survive for a certain period of time after the tab is closed (even the browser is completely closed). There is no intermediate state in SessionStorage, which realizes the immediate session. termination.
  • the second tab page refers to the tab page that is opened after the first tab page is successfully logged on to the site.
  • the second tab page can directly read the site corresponding to the site in the cache during the session with the site Identification.
  • the identity in the cache may be emptied, and when the first tab is closed, the emptied cache identity will not be restored, so it is very likely that The first tab is closed, causing the second tab to not be able to talk to the site normally. Therefore, this embodiment of the application will detect whether there is identity data backed up in the user parameters of SessionStorage on the second tab, so as to back up the identity separately. And restore to provide the basis.
  • the embodiment of the application will use the session storage in the first tab
  • the identity identifier is shared across tabs and backed up to the SessionStorage of the second tab.
  • the identity in the cache in the first embodiment of the application may be emptied, that is, it may not exist in real time. Therefore, if the identity in the cache is backed up to the second tab SessionStorage, it is very likely to make The backup cannot be completed, so the embodiment of the present application performs cross-tab backup for the identity identifier in the first tab SessionStorage.
  • the method for sharing the identity between Session Storage is not limited here, and can be set by the technical personnel, including but not limited to the method in the third embodiment of the present application.
  • the embodiment of the application is in the second tab SessionStorage
  • the second tab SessionStorage When there is already a backup of the identity in the cache, it is backed up to the cache (if the same identity is already in the cache at this time, you can choose to overwrite or not copy) to ensure that you can access the tags of the same site at the same time In the page, as long as a tab is not closed, there will be a corresponding identification in the cache to ensure a normal conversation with the site.
  • S205 to S207 are the same as S102 to S204 in the first embodiment of this application, except that the corresponding operation is changed from the first tab page to the second tab page. Therefore, for details, please refer to the relevant description in the first embodiment of this application. To repeat.
  • the identities are separately backed up in the SessionStorage of different tabs. Since the backed up data will not change with subsequent changes in the backup source, it will only follow When the user closes the corresponding tab and deletes it, and as long as there is an identity in SessionStorage in a tab, it will be copied into the cache, so that the remaining unclosed tabs can talk to the site normally. When all the tabs accessing the same site are closed, the SessionStorage data of all tabs and the corresponding identities in the cache are cleared, so that there is no valid identity in the user terminal, thus realizing the immediate session termination.
  • this embodiment of the application will set a status parameter and a transfer parameter in the LocalStorage, where the status
  • the parameters are used to inform whether SessionStorage identity sharing is required, and the transfer parameters are used for data transfer during SessionStorage identity sharing, specifically;
  • the embodiment of the present application will first modify the content of the state parameters in LocalStorage, so that the state parameters will change, and will set up a monitoring mechanism for the state parameters.
  • the status parameter changes, the identification data in the SessionStorage of the first tab will be copied to the transfer parameters in the LocalStorage.
  • a monitoring mechanism for the transfer parameters will be set.
  • the second tab will be checked Whether there is a backup ID in SessionStorage? If not, it means that ID backup needs to be performed at this time.
  • the embodiment of this application will copy the changed transfer parameter data to the user parameters in SessionStorage on the second tab to realize Cross-tab SessionStorage backup of identity.
  • the embodiment of the present application will also transfer the data in the parameters to provide a basis for other subsequent data transfer and other operations.
  • the status parameter since the status parameter is only applicable to the change of the identification status to inform whether the identity identification is required to be shared, in this embodiment of the application, the specific value of the status parameter can be some specific data, such as the real-time time when S301 is executed. The value can also be just a simple status label, such as 0 and 1, as long as the data content before and after each modification is different.
  • the embodiment of this application will perform page jump monitoring for each tab separately, and clear the cache and the identity in SessionStorage when jumping to leave the original visited site, because there are only all The session with the site will be terminated only when the cache corresponding to the tab page of the same site and the identity in SessionStorage are cleared (for details, please refer to the relevant descriptions of Embodiments 1 to 3 of this application). Therefore, the embodiment of this application can realize the tag Timely and accurate response to page session termination.
  • the second tab page that is the same as the site visited by the first tab page does not feature one or several tab pages, but the first tab page realizes successful login to the site On the basis of this, the new tabs that will be opened subsequently to visit the same site.
  • the number of second tabs and the time of each second tab creation cannot be estimated. The user's usage situation is determined.
  • FIG. 6 shows a structural block diagram of a site session termination apparatus provided in an embodiment of the present application.
  • the apparatus for terminating a site session illustrated in FIG. 6 may be the subject of execution of the method for terminating a site session provided in the first embodiment.
  • the site session termination device includes:
  • the information backup module 61 is used to obtain the identity of the user that is stored in the user terminal cache and corresponds to the first visited site when the user successfully logs in to the first visited site through the first tab, and then The identity identifier is copied to the first user parameter field in the SessionStorage corresponding to the first tab page.
  • the first event monitoring module 62 is configured to monitor the operation event of the user on the first tab page.
  • the first information retrieving module 63 is configured to, if the operation event for the first tab page is page refresh, clear the identity identifier in the cache, and when the first tab page reloads the page, reset the The first user parameter is copied to the identity field in the cache.
  • the first information clearing module 64 is configured to, if the operation event on the first tab page is to close the page, clear the identity identifier and the first user parameter in the cache, so that the user terminal and the The session between the first visited site is terminated.
  • the site session termination device further includes:
  • the site monitoring module is used to monitor the second visited site corresponding to the second tab page.
  • the parameter detection module is configured to detect whether the second user parameter field in the second tab SessionStorage is empty if the second visited site is the same as the first visited site.
  • the parameter sharing module is configured to copy the first user parameter to the second user parameter field if the second user parameter field is empty.
  • the identity update module is configured to, if the second user parameter field is not empty, copy the second user parameter to the identity field in the cache.
  • the second event monitoring module monitors the operation event of the user on the second tab page.
  • the second information retrieving module is configured to, if the operation event on the second tab page is page refresh, clear the identity identifier in the cache, and when the second tab page reloads the page, reset the first tab page 2.
  • the user parameters are copied to the identity field in the cache.
  • the second information clearing module is configured to clear the identity identifier and the second user parameters in the cache if the operation event on the second tab page is to close the page.
  • the parameter sharing module includes:
  • the first user parameter is copied to the transfer parameter field in the LocalStorage.
  • the site session termination device further includes:
  • the operation event for the first tab page is a page jump, and the jump target site is not the same as the first visited site, clear the identity identifier and the first user parameter in the cache.
  • the site session termination device further includes:
  • the operation event for the second tab page is a page jump, and the target site of the jump is different from the second visited site, the identity identifier and the second user parameter in the cache are cleared.
  • first”, “second”, etc. are used in the text in some embodiments of the present application to describe various elements, these elements should not be limited by these terms. These terms are only used to distinguish one element from another.
  • the first table may be named the second table, and similarly, the second table may be named the first table without departing from the scope of the various described embodiments.
  • the first form and the second form are both forms, but they are not the same form.
  • Fig. 7 is a schematic diagram of a terminal device provided by an embodiment of the present application.
  • the terminal device 7 of this embodiment includes a processor 70 and a memory 71, and the memory 71 stores a computer program 72 that can run on the processor 70.
  • the steps in the foregoing embodiments of the method for terminating a site session are implemented, such as steps 101 to 106 shown in FIG. 1.
  • the processor 70 executes the computer program 72 the functions of the modules/units in the foregoing device embodiments, such as the functions of the modules 61 to 66 shown in FIG. 6, are realized.
  • the terminal device 7 may be a computing device such as a desktop computer, a notebook, a palmtop computer, and a cloud server.
  • the terminal device may include, but is not limited to, a processor 70 and a memory 71.
  • FIG. 7 is only an example of the terminal device 7 and does not constitute a limitation on the terminal device 7. It may include more or less components than shown in the figure, or a combination of certain components, or different components.
  • the terminal device may also include an input sending device, a network access device, a bus, and the like.
  • the so-called processor 70 may be a central processing unit (Central Processing Unit, CPU), it can also be other general-purpose processors, digital signal processors (Digital Signal Processor, DSP), application specific integrated circuits (Application Specific Integrated Circuit, ASIC), ready-made programmable gate array (Field-Programmable Gate Array, FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc.
  • the general-purpose processor may be a microprocessor or the processor may also be any conventional processor or the like.
  • the memory 71 may be an internal storage unit of the terminal device 7, such as a hard disk or a memory of the terminal device 7.
  • the memory 71 may also be an external storage device of the terminal device 7, such as a plug-in hard disk, a smart memory card (Smart Media Card, SMC), and a secure digital (Secure Digital, SD) equipped on the terminal device 7. Card, Flash Card, etc.
  • the memory 71 may also include both an internal storage unit of the terminal device 7 and an external storage device.
  • the memory 71 is used to store the computer program and other programs and data required by the terminal device.
  • the memory 71 can also be used to temporarily store data that has been sent or will be sent.
  • each unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units may be integrated into one unit.
  • the above-mentioned integrated unit can be implemented in the form of hardware or software functional unit.
  • the integrated module/unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer readable storage medium.
  • this application implements all or part of the processes in the above-mentioned embodiments and methods, and can also be completed by instructing relevant hardware through a computer program.
  • the computer program can be stored in a computer-readable storage medium. When the program is executed by the processor, the steps of the foregoing method embodiments can be implemented.
  • the computer program includes computer program code, and the computer program code may be in the form of source code, object code, executable file, or some intermediate forms.
  • the computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, U disk, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (Read-Only Memory, ROM) , Random access memory (Random Access Memory, RAM), electrical carrier signals, telecommunications signals, and software distribution media.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Physics & Mathematics (AREA)
  • Databases & Information Systems (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Mathematical Physics (AREA)
  • Data Mining & Analysis (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer And Data Communications (AREA)

Abstract

本申请提供了一种站点会话终止方法、装置、终端设备及介质,适用于数据处理技术领域,该方法包括:当用户通过第一标签页成功登录第一访问站点时,获取储存在用户终端缓存中,且与第一访问站点对应的用户的身份标识,并将身份标识复制至第一标签页对应的SessionStorage内的第一用户参数字段;若对第一标签页的操作事件为刷新页面,则清空缓存中的身份标识,并在第一标签页重新加载页面时,将第一用户参数复制至缓存内的身份标识字段;若对第一标签页的操作事件为关闭页面,则清空缓存中的身份标识以及第一用户参数,以使得用户终端与第一访问站点之间的会话终止。本申请实施例实现了在用户关闭标签页时,有效控制用户终端与站点的会话立即终止。

Description

一种站点会话终止方法、装置、终端设备及介质 技术领域
本申请属于数据处理技术领域,尤其涉及一种站点会话终止方法、装置、终端设备及介质。
背景技术
当用户通过标签页在站点登录成功时,站点会返回一个用户的身份标识,用户终端将该身份标识储存在cookie等缓存中,并在每次向站点发送请求时,将该身份标识一同发送至站点,以实现对站点的身份验证和数据交互,由于身份标识是储存在cookie等缓存之中的,从而使得用户只要没有清除cookie等缓存,就无需重复登录操作,方便了用户的站点访问。
对于一些比较特殊的场景,例如一些安全性要求较高的系统,会需要在用户关闭标签页时立即终止用户终端与站点的会话(若有多个标签页都是访问同一站点,则需要在所有访问该站点的标签页均关闭时立即终止会话),为了实现用户关闭标签页时立即终止与站点的会话,现有技术中会监听浏览器beforeUnload事件(beforeUnload事件对应的是关闭标签页面或者刷新),当监听到beforeUnload事件用户终端就会发送用户退出请求给站点,使得站点执行用户退出登录操作以结束会话,若beforeUnload事件对应的是刷新,浏览器则会重新加载标签页,此时用户终端又会再发一条取消退出的请求给服务器,以取消用户退出操作。这种方法虽然可以实现在用户关闭标签页时与站点的会话终止,但需要用户终端和站点服务器的前后端共同配合,逻辑复杂且执行效率低下。
因此,现有技术难以在用户关闭标签页时,有效控制用户终端与站点的会话立即终止。
技术问题
有鉴于此,本申请实施例提供了一种站点会话终止方法及终端设备,以解决现有技术中难以在用户关闭标签页时,有效控制用户终端与站点的会话立即终止的问题。
技术解决方案
本申请实施例的第一方面提供了一种站点会话终止方法,包括:
当用户通过第一标签页成功登录第一访问站点时,获取储存在用户终端缓存中,且与所述第一访问站点对应的所述用户的身份标识,并将所述身份标识复制至所述第一标签页对应的SessionStorage内的第一用户参数字段;
监测所述用户对所述第一标签页的操作事件;
若对所述第一标签页的操作事件为刷新页面,则清空所述缓存中的身份标识,并在所述第一标签页重新加载页面时,将所述第一用户参数复制至所述缓存内的身份标识字段;
若对所述第一标签页的操作事件为关闭页面,则清空所述缓存中的身份标识以及所述第一用户参数,以使得所述用户终端与所述第一访问站点之间的会话终止。
本申请实施例的第二方面提供了一种站点会话终止装置,包括:
信息备份模块,用于当用户通过第一标签页成功登录第一访问站点时,获取储存在用户终端缓存中,且与所述第一访问站点对应的所述用户的身份标识,并将所述身份标识复制至所述第一标签页对应的SessionStorage内的第一用户参数字段;
第一事件监测模块,用于监测所述用户对所述第一标签页的操作事件;
第一信息回迁模块,用于若对所述第一标签页的操作事件为刷新页面,则清空所述缓存中的身份标识,并在所述第一标签页重新加载页面时,将所述第一用户参数复制至所述缓存内的身份标识字段;
第一信息清空模块,用于若对所述第一标签页的操作事件为关闭页面,则清空所述缓存中的身份标识以及所述第一用户参数,以使得所述用户终端与所述第一访问站点之间的会话终止。
本申请实施例的第三方面提供了一种终端设备,所述终端设备包括存储器、处理器,所述存储器上存储有可在所述处理器上运行的计算机程序,所述处理器执行所述计算机程序时实现如上所述的站点会话终止方法的步骤。
本申请实施例的第四方面提供了一种计算机可读存储介质,包括:存储有计算机程序,其特征在于,所述计算机程序被处理器执行时实现如上所述的站点会话终止方法的步骤。
有益效果
本申请实施例与现有技术相比存在的有益效果是:在浏览器中,SessionStorage仅能临时储存单个标签页的相关数据,且会随着标签页的关闭删除储存的数据。本申请实施例中通过将缓存中的身份标识备份至标签页SessionStorage之中,只要出现操作事件就清空缓存中的身份标识,且当操作为刷新页面,即用户不是关闭标签页时,在重新加载页面时又将SessionStorage中的身份标识复制回缓存之中,从而使得用户的身份标识不会被丢失,可以继续正常进行站点会话访问,而当关闭标签页面时,SessionStorage中的身份标识也会一并删除,从而使得用户终端中所有的身份标识都被清空,用户终端无法再与站点进行会话,从而实现了不依赖后端代码,无需服务器配合交互,逻辑更为简单执行效率更高的会话立即终止效果,实现了在用户关闭标签页时,有效控制用户终端与站点的会话立即终止。
附图说明
为了更清楚地说明本申请实施例中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动性的前提下,还可以根据这些附图获得其他的附图。
图1是本申请实施例一提供的站点会话终止方法的实现流程示意图;
图2是本申请实施例二提供的站点会话终止方法的实现流程示意图;
图3是本申请实施例三提供的站点会话终止方法的实现流程示意图;
图4是本申请实施例四提供的站点会话终止方法的实现流程示意图;
图5是本申请实施例五提供的站点会话终止方法的实现流程示意图;
图6是本申请实施例六提供的站点会话终止装置的结构示意图;
图7是本申请实施例七提供的终端设备的示意图。
本发明的实施方式
以下描述中,为了说明而不是为了限定,提出了诸如特定系统结构、技术之类的具体细节,以便透彻理解本申请实施例。然而,本领域的技术人员应当清楚,在没有这些具体细节的其它实施例中也可以实现本申请。在其它情况中,省略对众所周知的系统、装置、电路以及方法的详细说明,以免不必要的细节妨碍本申请的描述。
为了说明本申请所述的技术方案,下面通过具体实施例来进行说明。
为了便于理解本申请,此处先对本申请实施例进行简要介绍,浏览器对于Storage事件有SessionStorage和LocalStorage两种离线储存方式,其中SessionStorage仅能临时储存单个标签页的相关数据,且会随着标签页的关闭删除储存的数据,LocalStorage能同时储存访问同一站点的所有标签页的相关数据,且不会随着标签页关闭或者浏览器关闭而删除储存的数据。为了实现关闭标签页时立即终止会话,本申请实施例会将身份标识备份至标签页的SessionStorage,在用户正常访问站点时仍可以继续使用原缓存中的身份标识,当用户进行标签页的刷新或关闭时,本申请实施例则会直接删除缓存中的身份标识,并根据实际的操作事件来进行SessionStorage内备份的身份标识处理,若是刷新页面,本申请实施例会将SessionStorage内备份的身份标识复制回缓存之中,以保证用户后续正常的站点访问,若是关闭页面,则会直接将SessionStorage内的身份标识一并清空,从而使得只要用户一关闭标签页,从而使得用户终端中所有的身份标识都被清空,用户终端无法再与站点进行会话,从而实现了不依赖后端代码,无需服务器配合交互,逻辑更为简单执行效率更高的会话立即终止效果,实现了在用户关闭标签页时,有效控制用户终端与站点的会话立即终止。详述如下:
图1示出了本申请实施例一提供的站点会话终止方法的实现流程图,详述如下:
S101,当用户通过第一标签页成功登录第一访问站点时,获取储存在用户终端缓存中,且与第一访问站点对应的用户的身份标识,并将身份标识复制至第一标签页对应的SessionStorage内的第一用户参数字段。
其中,第一标签页并非特指某一个标签页,其可以是任意一个用户成功登陆站点的标签页,结合实际应用而言,凡是用户在浏览器中打开的成功登陆某一站点的标签页,均可以作为本申请实施例中的第一标签页。若浏览器中包含多个第一标签页,则对于每个第一标签页而言,均会使用本申请实施例中的方法进行监控,并在关闭标签页时终止与对应站点的会话。
当用户在一个标签页中成功登陆某一站点后,站点会返回一个用户的身份标识用于后续会话认证,该身份标识既可以是一段随机的字符串,也可以是根据一定规则生成的字符串,具体需根据实际应用情况确定。对于接收到的身份标识,本申请实施例会将其储存在用户终端的本地缓存之中,其中具体的缓存位置可由技术人员根据实际需求设定,包括但不限于如cookie中。其中,应当说明地,由于用户可能会同时通过不同的标签页登陆多个不同站点,即在缓存中可能会同时储存多个不同站点分别对应的多个身份标识,在本申请实施例中,仅会读取所需监控的第一标签页对应登陆的站点返回的身份标识。
本申请实施例中,会在标签页的SessionStorage中预先设置一个字段数据为空的用户参数,并在读取到所需的身份标识之后,将身份标识数据备份至标签页SessionStorage用户参数的字段之中,从而实现中SessionStorage中对身份标识的备份储存。
S102,监测用户对第一标签页的操作事件。
在本申请实施例中,监测的操作事件主要包括刷新页面和关闭页面,其中具体的监测方法此处不予限定,可由技术人员根据需求自行设定,包括但不限于如通过监听浏览器beforeUnload事件的方式来实现对操作事件的监测。
S103,若对第一标签页的操作事件为刷新页面,则清空缓存中的身份标识,并在第一标签页重新加载页面时,将第一用户参数复制至缓存内的身份标识字段。
当操作事件为刷新标签页时,说明用户只是想刷新网页而不是终止会话,此时本申请实施例会先将缓存中的身份标识数据清空,并会在页面刷新时重新将SessionStorage内的身份标识复制回缓存之中,以保证后续用户可以正常从缓存中读取身份标识,保障后续与站点的正常会话。
S104,若对第一标签页的操作事件为关闭页面,则清空缓存中的身份标识以及第一用户参数,以使得用户终端与第一访问站点之间的会话终止。
当操作事件为关闭标签页时,本申请实施例会直接将缓存和SessionStorage内的身份标识数据均进行清空,从而使得本地储存中没有该访问站点的有效身份标识,实现用户终端与站点的会话立即终止。
在本申请实施例中,利用sessionStorage备份身份标识,标签页关闭即可清空,不会当标签页关闭(甚至浏览器完全关闭)后还会持续存活一定时间,SessionStorage没有中间状态,实现了会话立即终止。
作为本申请实施例二,考虑到实际应用中,用户可能会在多个标签页中访问同一站点,由于所有访问同一站点的标签页,都是直接使用缓存中的用户身份标识来与站点进行数据交互会话,因此,此时若仅根据本申请实施例一中方法对各个标签页进行处理,会导致这些访问同一站点的标签页中,只要有一个标签页关闭了,就会使得剩下的所有标签页都没有了可用的身份标识,从而使得会话被误终止,为了防止这种情况发生,如图2所示,包括:
S201,监测第二标签页对应的第二访问站点。
在本申请实施例中,第二标签页是指在第一标签页成功登陆站点之后才打开的标签页。
S202,若第二访问站点与第一访问站点相同,检测第二标签页SessionStorage内的第二用户参数字段是否为空。
当两个标签页访问的站点相同时,说明标签页与站点会话时所需的身份标识也是一致的,此时第二标签页在与站点会话时可以直接读取缓存中存有的站点对应的身份标识。但在本申请实施例一中,由于缓存中的身份标识可能会被清空,且当第一标签页被关闭时,清空后的缓存身份标识还不会被恢复,因此此时极有可能出现由于第一标签页被关闭,导致第二标签页无法正常与站点会话的情况,因此本申请实施例会检测第二标签页SessionStorage的用户参数内,是否备份有身份标识数据,以为后续对身份标识独立备份和恢复提供基础。
S203,若第二用户参数字段为空,将第一用户参数复制至第二用户参数字段。
若第二标签页的中用于备份身份标识的用户参数字段数据为空,说明还未对第二标签页进行过SessionStorage的身份标识备份,此时本申请实施例会将第一标签页SessionStorage内的身份标识跨标签页共享备份至第二标签页的SessionStorage内。其中,由于本申请实施例一中缓存内的身份标识可能会被清空,即不一定会实时存在,因此若采用将缓存中的身份标识备份至第二标签页SessionStorage内的方式,极有可能使得备份无法完成,因此本申请实施例会对第一标签页SessionStorage内的身份标识进行跨标签页的备份。其中,对SessionStorage之间的身份标识共享方法此处不予限定,可由技术人员自行设定,包括但不限于如本申请实施例三的方法。
S204,若第二用户参数字段不为空,将第二用户参数复制至缓存中的身份标识字段。
由于实际应用中若第一标签页被关闭了,会直接导致缓存内没有对应的身份标识,从而使得用户通过第二标签页也无法正常与站点会话,因此本申请实施例在第二标签页SessionStorage内已经有了身份标识的备份时,将其备份至缓存之中(若此时缓存中已经有了相同的身份标识,则可以选择覆盖或者不复制),从而保证在同时访问同一个站点的标签页之中,只要有一个标签页没有被关闭,缓存中就会有对应的身份标识,以保证与站点的正常会话。
S205,监测用户对第二标签页的操作事件。
S206,若对第二标签页的操作事件为刷新页面,则清空缓存中的身份标识,并在第二标签页重新加载页面时,将第二用户参数复制至缓存内的身份标识字段。
S207,若对第二标签页的操作事件为关闭页面,清空缓存中的身份标识以及第二用户参数。
S205至S207的原理与本申请实施例一中S102至S204相同,仅是操作对应由第一标签页改为了第二标签页,因此具体可参考本申请实施例一中的相关说明,此处不予赘述。
本申请实施例二针对多个标签页中访问同一站点的情况,将身份标识在不同标签页SessionStorage内分别进行备份,由于备份的数据并不会随着备份源后续的变化而变化,只会随着用户关闭对应标签页而删除,且只要一个标签页中SessionStorage内有身份标识,就会将其复制进缓存之中,从而保使得剩下未被关闭的标签页可以正常与站点会话,而当访问同一站点的所有标签页均被关闭时,由于所有标签页的SessionStorage数据以及对应的缓存中的身份标识都被清空了,从而使得用户终端内没有了有效的身份标识,进而实现了会话的立即终止。
做本申请实施例三,由于SessionStorage之间不能直接共享数据,因此为了实现本申请实施例二中的身份标识跨SessionStorage共享,本申请实施例会基于LocalStorage进行数据转移,如图3所示,包括:
S301,若第二用户参数为空,修改第一标签页和第二标签页共同对应的LocalStorage内的状态参数。
S302,当状态参数发生变化时,将第一用户参数复制至LocalStorage内的转移参数字段。
S303,当转移参数发生变化,且第二用户参数字段为空时,将变化后的转移参数复制至第二用户参数字段,并清空转移参数。
对于访问同一站点的第一标签页和第二标签页,其具有共用的LocalStorage,为了实现两者SessionStorage中身份标识的共享,本申请实施例会在LocalStorage中设置一个状态参数和一个转移参数,其中状态参数适用于告知是否需要进行SessionStorage身份标识共享,转移参数用于SessionStorage身份标识共享时的数据中转,具体而言;
当第二标签页SessionStorage内用户参数为空,即没有备份身份标识时,本申请实施例首先会修改LocalStorage中状态参数的内容,使得状态参数发生变化,并会设置对状态参数监控机制,若发现状态参数发生变化,就会将第一标签页SessionStorage内身份标识数据复制到LocalStorage内的转移参数,同时,还会设置对转移参数监控机制,当发现转移参数发生变化时,会检测第二标签页SessionStorage中是否有备份身份标识,若没有,说明此时是需要进行身份标识备份的,因此本申请实施例会将变化后的转移参数数据,复制至第二标签页SessionStorage中用户参数中,以实现对身份标识的跨标签页SessionStorage备份。与此同时,在完成备份之后,本申请实施例还会情况转移参数中的数据,以为后续的其他数据转移等操作提供基础。其中,由于状态参数仅适用于标识状态的变化,以告知是否需要身份标识共享,因此在本申请实施例中,状态参数具体的取值,既可以是一些特定的数据,如执行S301的实时时刻值,也可以仅仅只是一个简单的状态标签,如0和1,只需保证每次修改前后的数据内容不相同即可。
作为本申请实施例四,考虑到对标签页的操作也有可能是页面跳转,而当跳转的目标站点不是原访问站点时,也是一种形式的离开站点,对于一些安全性要求较高的场合,若要求只要没有标签页访问某一站点,此时也需要在跳转至其他站点之后立即终止与原站点的会话,因此在本申请实施例一至三的基础上,如图4所示,包括:
S105,若对第一标签页的操作事件为页面跳转,且跳转的目标站点与第一访问站点不相同,清空缓存中的身份标识以及第一用户参数。
本申请实施例中,若检测到在标签页内有页面跳转操作,且跳转的目标站点与原本登录成功的访问站点不同,即需要离开原访问站点时,就会直接将缓存和SessionStorage中的身份标识清空,以实现实时会话终止。
作为本申请实施例五,考虑到对标签页的操作也有可能是页面跳转,而当跳转的目标站点不是原访问站点时,也是一种形式的离开站点,对于一些安全性要求较高的场合,若要求只要没有标签页访问某一站点,此时也需要在跳转至其他站点之后立即终止与原站点的会话,因此在本申请实施例一至三的基础上,对于有多个标签页同时访问同一站点的情况,如图5所示,包括:
S208,若对第二标签页的操作事件为页面跳转,且跳转的目标站点与第二访问站点不相同,清空缓存中的身份标识以及第二用户参数。
当对同一站点有多个标签页访问时,本申请实施例对于每一个标签页都会分别进行页面跳转监测,并在跳转离开原访问站点时清空缓存和SessionStorage中的身份标识,由于只有所有访问同一站点的标签页对应的缓存和SessionStorage中的身份标识均被清空时,才会终止与站点的会话(详见本申请实施例一至三的相关说明),因此本申请实施例可以实现对标签页会话终止的及时准确响应。
应当特别说明地,在本申请实施例一至五中,与第一标签页访问站点相同的第二标签页并不是特征一个或者几个标签页,而是在第一标签页实现对站点的登陆成功的基础上,后续继续打开的新的访问相同站点的所有标签页,在实际应用中,第二标签页的数量以及每个第二标签页创建的时间,都是无法预估的,需根据实际用户使用情况确定,本申请实施例一至五所需实现的,是所有这些访问同一站点的标签页(即第一标签页和第二标签页的集合)均被关闭后,立即终止用户终端与站点的会话,而在此之前,只要没有全部被关闭,用户终端与站点的会话都应当被正常保留,即需要保证缓存中留有可用的站点对应的身份标识数据。
相对另一种用于解决关闭标签页后立即终止对话的一种现有技术:直接将身份标识储存于各个标签页的SessionStorage之中,在进行于站点的对话时,再从SessionStorage中提取身份标识进行认证。
由于SessionStorage之间不能数据共享,而LocalStorage内的数据又不会随着标签页的关闭而删除,从而导致了现有技术中若直接将身份标识储存在SessionStorage之中,此时用户每打开一个新的标签页,都会要求用户进行一次登录操作,操作十分繁琐不便,若直接将身份标识直接储存在LocalStorage之中,又无法在标签页关闭时及时删除身份标识,导致会话无法正常到期。
因此相对这种做法,本申请实施例一至五中,无需对原本缓存中储存身份标识的机制进行修改,只需要在原本机制的基础上通过SessionStorage备份身份标识,并在不同的操作情况下进行对应的身份标识数据清空和转移备份等操作,使得用户既不需要在每个标签页中进行重复登录操作,又可以实现在对同一站点进行访问的所有标签页均关闭时,立即结束用户终端与站点的对话,逻辑简单,执行效率高且无需对现有机制进行过多的修改。
对应于上文实施例的方法,图6示出了本申请实施例提供的站点会话终止装置的结构框图,为了便于说明,仅示出了与本申请实施例相关的部分。图6示例的站点会话终止装置可以是前述实施例一提供的站点会话终止方法的执行主体。
参照图6,该站点会话终止装置包括:
信息备份模块61,用于当用户通过第一标签页成功登录第一访问站点时,获取储存在用户终端缓存中,且与所述第一访问站点对应的所述用户的身份标识,并将所述身份标识复制至所述第一标签页对应的SessionStorage内的第一用户参数字段。
第一事件监测模块62,用于监测所述用户对所述第一标签页的操作事件。
第一信息回迁模块63,用于若对所述第一标签页的操作事件为刷新页面,则清空所述缓存中的身份标识,并在所述第一标签页重新加载页面时,将所述第一用户参数复制至所述缓存内的身份标识字段。
第一信息清空模块64,用于若对所述第一标签页的操作事件为关闭页面,则清空所述缓存中的身份标识以及所述第一用户参数,以使得所述用户终端与所述第一访问站点之间的会话终止。
进一步地,该站点会话终止装置,还包括:
站点监测模块,用于监测第二标签页对应的第二访问站点。
参数检测模块,用于若所述第二访问站点与所述第一访问站点相同,检测所述第二标签页SessionStorage内的第二用户参数字段是否为空。
参数共享模块,用于若所述第二用户参数字段为空,将所述第一用户参数复制至所述第二用户参数字段。
标识更新模块,用于若所述第二用户参数字段不为空,将所述第二用户参数复制至所述缓存中的身份标识字段。
第二事件监测模块,监测所述用户对所述第二标签页的操作事件。
第二信息回迁模块,用于若对所述第二标签页的操作事件为刷新页面,则清空所述缓存中的身份标识,并在所述第二标签页重新加载页面时,将所述第二用户参数复制至所述缓存内的身份标识字段。
第二信息清空模块,用于若对所述第二标签页的操作事件为关闭页面,清空所述缓存中的身份标识以及所述第二用户参数。
进一步地,参数共享模块,包括:
若所述第二用户参数为空,修改所述第一标签页和所述第二标签页共同对应的LocalStorage内的状态参数。
当所述状态参数发生变化时,将所述第一用户参数复制至所述LocalStorage内的转移参数字段。
当所述转移参数发生变化,且所述第二用户参数字段为空时,将变化后的所述转移参数复制至所述第二用户参数字段,并清空所述转移参数。
进一步地,该站点会话终止装置,还包括:
若对所述第一标签页的操作事件为页面跳转,且跳转的目标站点与所述第一访问站点不相同,清空所述缓存中的身份标识以及所述第一用户参数。
进一步地,该站点会话终止装置,还包括:
若对所述第二标签页的操作事件为页面跳转,且跳转的目标站点与所述第二访问站点不相同,清空所述缓存中的身份标识以及所述第二用户参数。
本申请实施例提供的站点会话终止装置中各模块实现各自功能的过程,具体可参考前述图1所示实施例一的描述,此处不再赘述。
应理解,上述实施例中各步骤的序号的大小并不意味着执行顺序的先后,各过程的执行顺序应以其功能和内在逻辑确定,而不应对本申请实施例的实施过程构成任何限定。
还应理解的是,虽然术语“第一”、“第二”等在文本中在一些本申请实施例中用来描述各种元素,但是这些元素不应该受到这些术语的限制。这些术语只是用来将一个元素与另一元素区分开。例如,第一表格可以被命名为第二表格,并且类似地,第二表格可以被命名为第一表格,而不背离各种所描述的实施例的范围。第一表格和第二表格都是表格,但是它们不是同一表格。
图7是本申请一实施例提供的终端设备的示意图。如图7所示,该实施例的终端设备7包括:处理器70、存储器71,所述存储器71中存储有可在所述处理器70上运行的计算机程序72。所述处理器70执行所述计算机程序72时实现上述各个站点会话终止方法实施例中的步骤,例如图1所示的步骤101至106。或者,所述处理器70执行所述计算机程序72时实现上述各装置实施例中各模块/单元的功能,例如图6所示模块61至66的功能。
所述终端设备7可以是桌上型计算机、笔记本、掌上电脑及云端服务器等计算设备。所述终端设备可包括,但不仅限于,处理器70、存储器71。本领域技术人员可以理解,图7仅仅是终端设备7的示例,并不构成对终端设备7的限定,可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件,例如所述终端设备还可以包括输入发送设备、网络接入设备、总线等。
所称处理器70可以是中央处理单元(Central Processing Unit,CPU),还可以是其他通用处理器、数字信号处理器(Digital Signal Processor,DSP)、专用集成电路(Application Specific Integrated Circuit,ASIC)、现成可编程门阵列(Field-Programmable Gate Array,FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件等。通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。
所述存储器71可以是所述终端设备7的内部存储单元,例如终端设备7的硬盘或内存。所述存储器71也可以是所述终端设备7的外部存储设备,例如所述终端设备7上配备的插接式硬盘,智能存储卡(Smart Media Card,SMC),安全数字(Secure Digital,SD)卡,闪存卡(Flash Card)等。进一步地,所述存储器71还可以既包括所述终端设备7的内部存储单元也包括外部存储设备。所述存储器71用于存储所述计算机程序以及所述终端设备所需的其他程序和数据。所述存储器71还可以用于暂时地存储已经发送或者将要发送的数据。
另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。
所述集成的模块/单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请实现上述实施例方法中的全部或部分流程,也可以通过计算机程序来指令相关的硬件来完成,所述的计算机程序可存储于一计算机可读存储介质中,该计算机程序在被处理器执行时,可实现上述各个方法实施例的步骤。其中,所述计算机程序包括计算机程序代码,所述计算机程序代码可以为源代码形式、对象代码形式、可执行文件或某些中间形式等。所述计算机可读介质可以包括:能够携带所述计算机程序代码的任何实体或装置、记录介质、U盘、移动硬盘、磁碟、光盘、计算机存储器、只读存储器(Read-Only Memory,ROM)、随机存取存储器(Random Access Memory,RAM)、电载波信号、电信信号以及软件分发介质等。
以上所述实施例仅用以说明本申请的技术方案,而非对其限制;尽管参照前述实施例对本申请进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使对应技术方案的本质脱离本申请各实施例技术方案的精神和范围,均应包含在本申请的保护范围之内。

Claims (10)

  1. 一种站点会话终止方法,其特征在于,包括:
    当用户通过第一标签页成功登录第一访问站点时,获取储存在用户终端缓存中,且与所述第一访问站点对应的所述用户的身份标识,并将所述身份标识复制至所述第一标签页对应的SessionStorage内的第一用户参数字段;
    监测所述用户对所述第一标签页的操作事件;
    若对所述第一标签页的操作事件为刷新页面,则清空所述缓存中的身份标识,并在所述第一标签页重新加载页面时,将所述第一用户参数复制至所述缓存内的身份标识字段;
    若对所述第一标签页的操作事件为关闭页面,则清空所述缓存中的身份标识以及所述第一用户参数,以使得所述用户终端与所述第一访问站点之间的会话终止。
  2. 如权利要求1所述的站点会话终止方法,其特征在于,还包括:
    监测第二标签页对应的第二访问站点;
    若所述第二访问站点与所述第一访问站点相同,检测所述第二标签页SessionStorage内的第二用户参数字段是否为空;
    若所述第二用户参数字段为空,将所述第一用户参数复制至所述第二用户参数字段;
    若所述第二用户参数字段不为空,将所述第二用户参数复制至所述缓存中的身份标识字段;
    监测所述用户对所述第二标签页的操作事件;
    若对所述第二标签页的操作事件为刷新页面,则清空所述缓存中的身份标识,并在所述第二标签页重新加载页面时,将所述第二用户参数复制至所述缓存内的身份标识字段;
    若对所述第二标签页的操作事件为关闭页面,清空所述缓存中的身份标识以及所述第二用户参数。
  3. 如权利要求2所述的站点会话终止方法,其特征在于,所述若所述第二用户参数字段为空,将所述第一用户参数复制至所述第二用户参数字段,包括:
    若所述第二用户参数为空,修改所述第一标签页和所述第二标签页共同对应的LocalStorage内的状态参数;
    当所述状态参数发生变化时,将所述第一用户参数复制至所述LocalStorage内的转移参数字段;
    当所述转移参数发生变化,且所述第二用户参数字段为空时,将变化后的所述转移参数复制至所述第二用户参数字段,并清空所述转移参数。
  4. 如权利要求1所述的站点会话终止方法,其特征在于,还包括:
    若对所述第一标签页的操作事件为页面跳转,且跳转的目标站点与所述第一访问站点不相同,清空所述缓存中的身份标识以及所述第一用户参数。
  5. 如权利要求2所述的站点会话终止方法,其特征在于,还包括:
    若对所述第二标签页的操作事件为页面跳转,且跳转的目标站点与所述第二访问站点不相同,清空所述缓存中的身份标识以及所述第二用户参数。
  6. 一种站点会话终止装置,其特征在于,包括:
    信息备份模块,用于当用户通过第一标签页成功登录第一访问站点时,获取储存在用户终端缓存中,且与所述第一访问站点对应的所述用户的身份标识,并将所述身份标识复制至所述第一标签页对应的SessionStorage内的第一用户参数字段;
    第一事件监测模块,用于监测所述用户对所述第一标签页的操作事件;
    第一信息回迁模块,用于若对所述第一标签页的操作事件为刷新页面,则清空所述缓存中的身份标识,并在所述第一标签页重新加载页面时,将所述第一用户参数复制至所述缓存内的身份标识字段;
    第一信息清空模块,用于若对所述第一标签页的操作事件为关闭页面,则清空所述缓存中的身份标识以及所述第一用户参数,以使得所述用户终端与所述第一访问站点之间的会话终止。
  7. 如权利要求6所述的站点会话终止装置,其特征在于,还包括:
    站点监测模块,用于监测第二标签页对应的第二访问站点;
    参数检测模块,用于若所述第二访问站点与所述第一访问站点相同,检测所述第二标签页SessionStorage内的第二用户参数字段是否为空;
    参数共享模块,用于若所述第二用户参数字段为空,将所述第一用户参数复制至所述第二用户参数字段;
    标识更新模块,用于若所述第二用户参数字段不为空,将所述第二用户参数复制至所述缓存中的身份标识字段;
    第二事件监测模块,监测所述用户对所述第二标签页的操作事件;
    第二信息回迁模块,用于若对所述第二标签页的操作事件为刷新页面,则清空所述缓存中的身份标识,并在所述第二标签页重新加载页面时,将所述第二用户参数复制至所述缓存内的身份标识字段;
    第二信息清空模块,用于若对所述第二标签页的操作事件为关闭页面,清空所述缓存中的身份标识以及所述第二用户参数。
  8. 如权利要求7所述的站点会话终止装置,其特征在于,参数共享模块,包括:
    若所述第二用户参数为空,修改所述第一标签页和所述第二标签页共同对应的LocalStorage内的状态参数;
    当所述状态参数发生变化时,将所述第一用户参数复制至所述LocalStorage内的转移参数字段;
    当所述转移参数发生变化,且所述第二用户参数字段为空时,将变化后的所述转移参数复制至所述第二用户参数字段,并清空所述转移参数。
  9. 一种终端设备,其特征在于,所述终端设备包括存储器、处理器,所述存储器上存储有可在所述处理器上运行的计算机程序,所述处理器执行所述计算机程序时实现如权利要求1至5任一项所述方法的步骤。
  10. 一种计算机可读存储介质,所述计算机可读存储介质存储有计算机程序,其特征在于,所述计算机程序被处理器执行时实现如权利要求1至5任一项所述方法的步骤。
PCT/CN2019/083911 2019-04-23 2019-04-23 一种站点会话终止方法、装置、终端设备及介质 WO2020215211A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201980097493.6A CN113966590B (zh) 2019-04-23 2019-04-23 一种站点会话终止方法、装置、终端设备及介质
PCT/CN2019/083911 WO2020215211A1 (zh) 2019-04-23 2019-04-23 一种站点会话终止方法、装置、终端设备及介质

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2019/083911 WO2020215211A1 (zh) 2019-04-23 2019-04-23 一种站点会话终止方法、装置、终端设备及介质

Publications (1)

Publication Number Publication Date
WO2020215211A1 true WO2020215211A1 (zh) 2020-10-29

Family

ID=72941289

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/083911 WO2020215211A1 (zh) 2019-04-23 2019-04-23 一种站点会话终止方法、装置、终端设备及介质

Country Status (2)

Country Link
CN (1) CN113966590B (zh)
WO (1) WO2020215211A1 (zh)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114629673A (zh) * 2021-08-20 2022-06-14 重庆数智逻辑科技有限公司 页面控制方法、装置、电子设备及计算机可读存储介质
WO2023092580A1 (zh) * 2021-11-29 2023-06-01 京东方科技集团股份有限公司 页面显示方法、装置、存储介质及电子设备

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104407937A (zh) * 2014-11-19 2015-03-11 北京奇虎科技有限公司 浏览器中加载数据的方法及浏览器
CN105389393A (zh) * 2015-12-21 2016-03-09 北京奇虎科技有限公司 浏览器推荐列表中浏览器显示信息的调整方法及装置
CN105740244A (zh) * 2014-12-08 2016-07-06 阿里巴巴集团控股有限公司 一种提供会话快捷消息的方法及设备
US20170097990A1 (en) * 2014-03-03 2017-04-06 Michael L. Hamm Text-sql relational database
CN108737541A (zh) * 2018-05-18 2018-11-02 成都九洲迪飞科技有限责任公司 一种web会话管理系统及管理方法

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP6397312B2 (ja) * 2014-11-06 2018-09-26 キヤノン株式会社 ネットワークシステム、及び、ネットワークシステムの制御方法
CN105979394A (zh) * 2015-12-04 2016-09-28 乐视致新电子科技(天津)有限公司 智能电视的浏览器操作方法及智能电视
CN107391768B (zh) * 2017-09-12 2021-07-02 广州酷狗计算机科技有限公司 网页数据处理方法、装置、设备及计算机可读存储介质
CN109635210B (zh) * 2018-11-15 2021-10-29 腾讯科技(深圳)有限公司 行为数据的上报方法、装置、设备及存储介质

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20170097990A1 (en) * 2014-03-03 2017-04-06 Michael L. Hamm Text-sql relational database
CN104407937A (zh) * 2014-11-19 2015-03-11 北京奇虎科技有限公司 浏览器中加载数据的方法及浏览器
CN105740244A (zh) * 2014-12-08 2016-07-06 阿里巴巴集团控股有限公司 一种提供会话快捷消息的方法及设备
CN105389393A (zh) * 2015-12-21 2016-03-09 北京奇虎科技有限公司 浏览器推荐列表中浏览器显示信息的调整方法及装置
CN108737541A (zh) * 2018-05-18 2018-11-02 成都九洲迪飞科技有限责任公司 一种web会话管理系统及管理方法

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114629673A (zh) * 2021-08-20 2022-06-14 重庆数智逻辑科技有限公司 页面控制方法、装置、电子设备及计算机可读存储介质
WO2023092580A1 (zh) * 2021-11-29 2023-06-01 京东方科技集团股份有限公司 页面显示方法、装置、存储介质及电子设备

Also Published As

Publication number Publication date
CN113966590A (zh) 2022-01-21
CN113966590B (zh) 2023-04-14

Similar Documents

Publication Publication Date Title
US9165136B1 (en) Supervising execution of untrusted code
US20190272260A1 (en) Remote Durable Logging for Journaling File Systems
US10956383B2 (en) Device backup and wipe
CN107463369A (zh) 一种虚拟桌面的接入设备控制方法与装置
US10031948B1 (en) Idempotence service
CN108255542B (zh) 一种虚拟机的串口并口管控方法与装置
US20210105608A1 (en) Subscription to dependencies in smart contracts
US8353014B2 (en) Dynamic dual permissions-based data capturing and logging
CN117195302A (zh) 包括用于限制插件应用配方的指令的计算机可读介质
WO2020215211A1 (zh) 一种站点会话终止方法、装置、终端设备及介质
TWI594133B (zh) 檔處理系統及方法
US8751568B1 (en) Systems and methods for data loss prevention
CN112104663A (zh) 一种用于管理登录用户和用户设备的方法与设备
US20200394085A1 (en) Smart contract information redirect to updated version of smart contract
CN116582365B (zh) 网络流量的安全控制方法、装置及计算机设备
CN113010376A (zh) 一种对存储训练数据的云存储系统的监测方法及装置
US8498622B2 (en) Data processing system with synchronization policy
DE102020113808A1 (de) Systeme und verfahren zum managen von endpunktsicherheitszuständen unter verwendung passiver datenintegritätsattestationen
WO2020247115A1 (en) Subscription to edits of blockchain transaction
CN116360696A (zh) 分布式块存储系统、介质及其电子设备
US11630809B2 (en) Method and system for using micro objects
US8656066B2 (en) Monitoring input/output operations to specific storage locations
US10999310B2 (en) Endpoint security client embedded in storage drive firmware
CN110162946B (zh) 移动存储管控方法及装置
US20240061909A1 (en) Systems and methods for managing software provisioning based on adjusted usage conditions of software items

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 19926060

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 25.02.2022)

122 Ep: pct application non-entry in european phase

Ref document number: 19926060

Country of ref document: EP

Kind code of ref document: A1