CN111125595B - Multi-page control method and device, electronic equipment and storage medium - Google Patents

Multi-page control method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN111125595B
CN111125595B CN201911235285.6A CN201911235285A CN111125595B CN 111125595 B CN111125595 B CN 111125595B CN 201911235285 A CN201911235285 A CN 201911235285A CN 111125595 B CN111125595 B CN 111125595B
Authority
CN
China
Prior art keywords
page
controller
closing
current page
current
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
CN201911235285.6A
Other languages
Chinese (zh)
Other versions
CN111125595A (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.)
Netease Media Technology Beijing Co Ltd
Original Assignee
Netease Media Technology Beijing 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 Netease Media Technology Beijing Co Ltd filed Critical Netease Media Technology Beijing Co Ltd
Priority to CN201911235285.6A priority Critical patent/CN111125595B/en
Publication of CN111125595A publication Critical patent/CN111125595A/en
Application granted granted Critical
Publication of CN111125595B publication Critical patent/CN111125595B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/958Organisation or management of web site content, e.g. publishing, maintaining pages or automatic linking
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/451Execution arrangements for user interfaces
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Abstract

The application discloses a multi-page control method, a device, electronic equipment and a storage medium, wherein the method comprises the following steps: and responding to triggering operation of a multi-page closing control on a current page, calling a multi-page controller connected with the current page, and sending a closing instruction to a page connected with the multi-page controller through the multi-page controller so as to close the page connected with the multi-page controller, wherein the pages are associated with all the pages connected with the multi-page controller. The application discloses a multi-page control method, a device, electronic equipment and a storage medium, which enable a user to rapidly close pages belonging to a certain website under the condition of opening a plurality of pages of a plurality of websites, avoid tedious and repeated closing actions one by one, reduce the cost of repeated operation of the user, save time and improve user experience.

Description

Multi-page control method and device, electronic equipment and storage medium
Technical Field
The present disclosure relates to the field of internet technologies, and in particular, to a method and apparatus for controlling multiple pages, an electronic device, and a storage medium.
Background
This section is intended to provide a background or context for embodiments of the present application that are recited in the claims. The description herein is not admitted to be prior art by inclusion in this section.
When a user accesses a website or a webpage in a browser, a plurality of pages of a plurality of websites are often opened, for example, the user often opens detailed pages of various commodities when shopping on a shopping website, often opens pages corresponding to a plurality of news when browsing information websites, the sequence and distribution of the plurality of pages belonging to different websites are disordered, and when the user needs to close part of the pages, the user needs to close one by one manually, or the user can also quickly close all pages except the current page through a 'close other pages' button provided in a browser window, or quickly close the plurality of pages positioned on the right side of the current page through a 'close right page' button.
Disclosure of Invention
However, the order and distribution of the pages belonging to different websites are disordered, for example, the pages of the same website may be distributed in different browser windows, or the pages (tags) of different websites may be alternately arranged in the same browser window. Therefore, when a user needs to close all pages of a certain website, the user still needs to manually close one by one, and the operation is complex.
In view of the foregoing, there is a great need for an improved method for improving the convenience of closing pages belonging to a website.
In one aspect, an embodiment of the present application provides a multi-page control method, including:
responding to triggering operation of a multi-page closing control on the current page;
and calling a multi-page controller connected with the current page, and sending a closing instruction to a page connected with the multi-page controller through the multi-page controller so as to close the page connected with the multi-page controller, wherein all the pages connected with the multi-page controller are associated.
In one aspect, an embodiment of the present application provides a multi-page control apparatus, including:
the response module is used for responding to the triggering operation of the multi-page closing control on the current page;
and the calling module is used for calling the multi-page controller connected with the current page, and sending a closing instruction to the page connected with the multi-page controller through the multi-page controller so as to close the page connected with the multi-page controller, wherein all the pages connected with the multi-page controller are associated.
In one aspect, an embodiment of the present application provides an electronic device including a memory, a processor, and a computer program stored on the memory and executable on the processor, where the processor implements steps of any of the methods described above when the processor executes the computer program.
In one aspect, an embodiment of the present application provides a computer-readable storage medium having stored thereon computer program instructions which, when executed by a processor, implement the steps of any of the methods described above.
According to the multi-page control method, the device, the electronic equipment and the storage medium, a user can rapidly close pages belonging to a certain website under the condition of opening a plurality of pages of a plurality of websites, tedious and repeated closing actions one by one are avoided, the cost of repeated operation of the user is reduced, time is saved, and user experience is improved.
Drawings
The above, as well as additional purposes, features, and advantages of exemplary embodiments of the present application will become readily apparent from the following detailed description when read in conjunction with the accompanying drawings. Several embodiments of the present application are illustrated by way of example, and not by way of limitation, in the figures of the accompanying drawings, in which:
FIG. 1 is a schematic diagram of a user opening multiple pages belonging to different websites simultaneously through a browser;
fig. 2 is an application scenario schematic diagram of a multi-page control method provided in an embodiment of the present application;
FIG. 3 is a flowchart illustrating a multi-page control method according to an embodiment of the present disclosure;
FIG. 4 is a schematic diagram of a user closing multiple pages belonging to the same website via a multiple page close control;
FIG. 5 is a flowchart illustrating a multi-page control method according to an embodiment of the present disclosure;
FIG. 6 is a flowchart illustrating a multi-page control method according to an embodiment of the present disclosure;
FIG. 7 is a flow chart of establishing a connection between any page opened by a user and a multi-page controller according to an embodiment of the present application;
FIG. 8 is a schematic structural diagram of a multi-page control device according to an embodiment of the present disclosure;
fig. 9 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
The principles and spirit of the present application will be described below with reference to several exemplary embodiments. It should be understood that these embodiments are presented merely to enable one skilled in the art to better understand and practice the present application and are not intended to limit the scope of the present application in any way. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.
Those skilled in the art will appreciate that embodiments of the present application may be implemented as a system, apparatus, device, method, or computer program product. Accordingly, the present disclosure may be embodied in the following forms, namely: complete hardware, complete software (including firmware, resident software, micro-code, etc.), or a combination of hardware and software.
In this document, it should be understood that any number of elements in the drawings is for illustration and not limitation, and that any naming is used only for distinction and not for any limitation.
The principles and spirit of the present application are explained in detail below with reference to several representative embodiments thereof.
Summary of The Invention
The inventors of the present application have found that, in general, the order and distribution of the pages belonging to different websites that are opened by a user are disordered, for example, referring to fig. 1, the pages of the same website may be distributed in different browser windows, or the pages of different websites may be alternately arranged in the same browser window. The "close other pages" button and the "close right pages" button in the browser window cannot distinguish the pages of different websites, and only all pages except the current page or the pages to the right of the current page can be closed. Therefore, under the above situation, when the user needs to close all pages of a certain website, the user still needs to manually close one by one, and the operation is complicated.
To solve the above problems, the present inventors have considered that when a user opens a page in a browser, a page controller is created for a plurality of associated pages, connections between the plurality of associated pages and the page controller are respectively established, and a page close control of the page controller can be displayed on each associated page, so that the user can quickly close the plurality of associated pages by clicking the page close control in any of the associated pages. The specific multi-page control method comprises the following steps: and responding to the triggering operation of the multi-page closing control on the current page, calling the multi-page controller connected with the current page, and sending a closing instruction to the page connected with the multi-page controller through the multi-page controller so as to close the page connected with the multi-page controller.
Having described the basic principles of the present application, various non-limiting embodiments of the present application are specifically described below.
Application scene overview
Referring to fig. 2, an application scenario schematic diagram of a multi-page control method provided in an embodiment of the present application is shown. The application scene comprises a terminal device 201 and a background server 202, wherein the terminal device 201 and the background server 202 are connected through a communication network. Terminal device 201 includes, but is not limited to, desktop computers, mobile phones, mobile computers, tablet computers, media players, smart wearable devices, smart televisions, and like electronic devices. The background server 202 may be a server, a server cluster formed by a plurality of servers, or a cloud computing center. The background server 202 is a server that can provide a web browsing server to the terminal device 201. The terminal device 201 is provided with a browser, a user can initiate a webpage acquisition request to the background server 202 through the browser, the background server 202 feeds back the responsive webpage content to the terminal device 201, and the terminal device 201 displays the received webpage content.
Exemplary method
The multi-page control method according to the exemplary embodiments of the present application will be described below in conjunction with the above application scenario. It should be noted that the above application scenario is only shown for the convenience of understanding the spirit and principles of the present application, and embodiments of the present application are not limited in any way in this respect. Rather, embodiments of the present application may be applied to any scenario where applicable.
Referring to fig. 3, the multi-page control method provided in the embodiment of the present application may be applied to the terminal device 201 shown in fig. 2, and specifically may include the following steps:
s301, responding to triggering operation of the multi-page closing control on the current page.
In particular implementations, the triggering operation includes, but is not limited to, clicking, long press multi-page closing control, and the like. Each page with which the multi-page controller has established a connection displays a corresponding multi-page close control, and the multi-page controller can be used for monitoring and responding to trigger events (including clicking events, long-press events and the like) for the multi-page close control generated in any page with which the multi-page controller has established a connection.
In particular implementations, a user may open one or more browser windows through a browser, and each browser window may contain one or more pages therein. The current page refers to a page currently browsed by the user.
S302, calling a multi-page controller connected with the current page, and sending a closing instruction to the page connected with the multi-page controller through the multi-page controller so as to close the page connected with the multi-page controller, wherein all the pages connected with the multi-page controller are associated.
Wherein all pages associated with establishing a connection with the multi-page controller belong to the same website. In the implementation, a corresponding multi-page controller can be built for each website, all pages which are opened by a user and belong to a certain website are connected with the multi-page controller corresponding to the website, and the multi-page controller can uniformly broadcast information to all pages connected with the multi-page controller. In addition, a multi-page closing control corresponding to the multi-page controller connected with the page is displayed in each page. The user can trigger the corresponding multi-page controller to send a closing instruction to all pages connected with the multi-page controller by clicking the multi-page closing control so as to close the pages connected with the multi-page controller.
Referring to fig. 4, the user opens 4 pages P belonging to the website a through the browser A1 、P A2 、P A3 And P A4 Also open 3 pages P belonging to website B B1 、P B2 And P B3 The browser establishes a multi-page controller C for website A 1 Respectively page P A1 、P A2 、P A3 And P A4 Build and Multi-Page controller C 1 Connection between each other and respectively at page P A1 、P A2 、P A3 And P A4 Corresponding position in (a) shows the multi-page controller C 1 A corresponding multi-page close control 401; simultaneously, a multi-page controller C is established for the website B 2 Respectively page P B1 、P B2 And P B3 Build and Multi-Page controller C 2 Connection between each other and respectively at page P B1 、P B2 And P B3 Corresponding position in (a) shows the multi-page controller C 2 A corresponding multi-page close control 402. Suppose that the user is currently browsing page P A3 And wants to close all pages of website a (including page P A1 、P A2 、P A3 And P A4 ) The user can click on page P A3 The multi-page close control 401 displayed above triggers the multi-page controller C within the browser 1 To page P A1 、P A2 、P A3 And P A4 Send close command, page P A1 、P A2 、P A3 And P A4 And executing the action of closing the page after receiving the closing instruction. Thus, the user can quickly close all pages belonging to the website A through the multi-page closing control, and keep pages belonging to the website B.
According to the multi-page control method provided by the embodiment of the application, a user can rapidly close the pages belonging to a certain website under the condition of opening a plurality of pages of a plurality of websites, so that tedious and repeated closing actions one by one are avoided, the cost of repeated operation of the user is reduced, the time is saved, and the user experience is improved.
In particular, to meet more operational demands of users, the multi-page close control includes closing all page controls and closing other page controls. And closing all page controls to close all pages connected with the corresponding multi-page controller, and closing other page controls to close other pages except the current page in all pages connected with the corresponding multi-page controller.
For this purpose, in one possible implementation manner, the multi-page control method of the embodiment of the present application further includes the following steps: after the current page receives the closing instruction, if the triggering operation is determined to be aimed at closing all page controls, closing the current page; if the trigger operation is determined to be aimed at closing other page controls, the current page is not closed.
Taking fig. 5 as an example, the multi-page control method in the above embodiment is specifically described. The other pages shown in fig. 5 are pages associated with the current page. After clicking the multi-page closing control in the current page, the user responds to the triggering operation of the multi-page closing control on the current page, calls the multi-page controller connected with the current page, and sends a closing instruction to the page connected with the called multi-page controller. After the current page receives the closing instruction sent by the multi-page controller, judging whether the multi-page closing control aimed at by the triggering operation is a closing control of all the pages, if so, executing the closing instruction to close the current page, and if not, not closing the current page. And after receiving the closing instruction sent by the multi-page controller, the other pages execute the closing instruction to close the pages respectively.
When the multi-page closing control aimed at by the triggering operation is a closing command, the closing command sent by the multi-page controller is a first closing command; when the multi-page closing control aimed at by the triggering operation is the closing of other page controls, the closing instruction sent by the multi-page controller is a second closing instruction. In this way, the current page can judge whether the multi-page closing control aimed at by the triggering operation is to close all page controls by judging whether the first closing instruction or the second closing instruction is received.
In specific implementation, the current page can also cache the type of the multi-page closing control aimed at by the triggering operation, and after the current page receives the closing instruction, whether the multi-page closing control aimed at by the triggering operation is all the page controls is judged according to the cached type of the multi-page closing control aimed at by the triggering operation.
In another possible implementation manner, referring to fig. 6, the multi-page control method in the embodiment of the present application includes the following steps:
s601, responding to triggering operation of a multi-page closing control on a current page.
S602, when the multi-page closing control aimed at by the triggering operation is a closing control of all pages, calling the multi-page controller connected with the current page, and sending a closing instruction to all pages connected with the multi-page controller through the multi-page controller so as to close all pages connected with the multi-page controller.
And S603, when the multi-page closing control aimed at by the triggering operation is a closing other page control, calling the multi-page controller connected with the current page, and sending closing instructions to other pages except the current page in all pages connected with the multi-page controller through the multi-page controller so as to close the other pages connected with the multi-page controller.
In practice, after a page is closed, the connection between the page and the multi-page controller is deleted. When all pages connected to a certain multi-page controller are closed, the multi-page controller can be deleted. Of course, the multi-page controller may be maintained for a certain period of time, or deleted after the browser is closed.
Through setting all page controls to be closed and other page controls to be closed, various modes for rapidly closing related pages are provided for a user, so that the user can close all pages belonging to the same website by clicking all page controls to be closed, and can keep a currently browsed page and close other pages related to the current page by clicking other page controls to be closed. When a user opens a plurality of pages of a plurality of websites, all pages or part of pages of a certain website can be quickly closed by closing all page controls or closing other page controls, so that tedious and repeated closing actions one by one are avoided, the cost of repeated operation of the user is reduced, the time is saved, and the user experience is improved.
Referring to fig. 7, on the basis of any of the above embodiments, the connection between any page opened by the user and the multi-page controller may be established as follows:
s701, responding to an operation of opening a page, and acquiring a website identifier to which the page belongs.
In particular implementations, the website is identified as a primary domain name of the website. Wherein the primary domain name is also called top-level domain name, such as baidu.
S702, judging whether a multi-page controller corresponding to the website identification of the page exists, if so, executing step S704, and if not, executing step S703.
S703, creating a corresponding multi-page controller for the website identification of the page, and executing step S704.
S704, establishing connection for the page and the multi-page controller corresponding to the website identification of the page.
And S705, displaying a multi-page closing control corresponding to the multi-page controller on the page.
In specific implementation, the corresponding multi-page controller can be created for the website identifier of the webpage opened by the user by any one of the following modes:
in the first way, a sharedWorker (sharing thread) is created in the browser and used as a multi-page controller corresponding to the website identifier of the current page.
The SharedWorker is a technology implemented in a browser and used for communicating among a plurality of pages, and a shared thread can be created by the SharedWorker, namely, a unique thread is created in the life cycle of a page connected with the shared thread by using the same SharedWorker, sharedWorker by using different pages, and the thread is also ended when all the pages connected with the SharedWorker are closed by using the same thread together by a plurality of pages connected with the SharedWorker.
For this purpose, a shared thread SharedWorker for multiple pages can be created at the browser end, and the shared SharedWorker is used as a multiple page controller. And when the ShareWorker monitors a trigger event of the multi-page closing control in any page connected with the ShareWorker, triggering the ShareWorker to broadcast a closing instruction to all pages connected with the ShareWorker.
In the second mode, a localtorage is created in the browser, and is used as a multi-page controller corresponding to the website identifier of the current page, and a closing instruction state is stored in the localtorage.
Accordingly, a connection may be established for the current page and its corresponding multi-page controller by: and adding a monitoring onstore event and a storage event on a window object of the current page.
The Web Storage API has a set of event notification mechanisms built therein, and when the content of the Storage space Localstorage changes (including adding, modifying, deleting data), the Storage event or onstore event is automatically triggered and sent to all interested listeners.
Therefore, in implementation, a multi-page shared storage space Localstorage can be created at the browser end, and then a multi-page controller corresponding to the website identifier of the current page is used, and a monitoring onstore event and a storage event, namely a monitoring onstore event and a storage event of each page connected with the storage space Localstorage, are directly added on the window object, so that communication among a plurality of pages is realized. The Localstorage is used as a multi-page controller and used for storing a closing instruction state, the initial closing instruction state is not closed, after a multi-page closing control in any page connected with the Localstorage is triggered, the Localstorage responds to the triggering operation to modify the closing instruction state into closing, a storage event with the modified closing instruction state is generated, and each page connected with the Localstorage can monitor the storage event, so that a closing instruction is obtained.
And in a third mode, sending a creation request to the background server so that the background server creates the website identifier of the current page to create a corresponding multi-page controller.
The first two ways are to create a multi-page controller in the browser, and the third way is to create a multi-page controller in the background server.
Accordingly, a connection may be established for the current page and its corresponding multi-page controller by: and establishing a WebSocket connection for the current page and the multi-page controller in the background server, or establishing a connection with the multi-page controller in the background server in an ajax polling mode.
The WebSocket mode is a mode of a B/S structure, and all pages are connected with a corresponding multi-page controller in a background server through WebSocket connection. All associated pages may be connected to the same multi-page controller through session (session control). The multi-page controller deployed on the background server performs the same functions and services as the multi-page controller deployed in the browser.
The ajax polling mode is also a mode of a B/S structure, the communication principle is similar to that of WebSocket, namely, the multi-page controller is deployed on a background server, and all pages are connected with the corresponding multi-page controller in the background server through the ajax polling mode.
Exemplary apparatus
Having described the method of the exemplary embodiments of the present application, a description will next be given of the multi-page control apparatus of the exemplary embodiments of the present application.
Fig. 8 is a schematic structural diagram of a multi-page control device 80 according to an embodiment of the present application. In one embodiment, the multi-page control device 80 includes: a response module 801 and a call module 802.
A response module 801, configured to respond to a triggering operation for a multi-page close control on a current page.
And a calling module 802, configured to call the multi-page controller that establishes a connection with the current page, and send a closing instruction to the page that establishes a connection with the multi-page controller through the multi-page controller, so as to close the page that establishes a connection with the multi-page controller, where all the pages that establish a connection with the multi-page controller are associated.
Optionally, the multiple page close control includes closing all page controls and closing other page controls.
The multi-page control device 80 of the embodiment of the present application further includes a closing module 803, configured to close the current page if it is determined that the triggering operation is directed to closing all page controls after the current page receives the closing instruction; if the trigger operation is determined to be aimed at closing other page controls, the current page is not closed.
Optionally, all pages associated with establishing a connection with the multi-page controller belong to the same website.
Optionally, the multi-page control device 80 of the embodiment of the present application further includes: an acquisition module 804, a connection creation module 805, a multi-page controller creation module 806, and a control display module 807.
The obtaining module 804 is configured to obtain, in response to an operation of opening the current page, a website identifier to which the current page belongs.
The connection creation module 805 is configured to, when there is a multi-page controller corresponding to the website identifier to which the current page belongs, establish a connection between the current page and the multi-page controller.
The multi-page controller creation module 806 is configured to create, when there is no multi-page controller corresponding to the website identifier of the current page, a corresponding multi-page controller for the website identifier of the current page.
The connection creation module 805 is further configured to establish a connection for the current page and the multi-page controller corresponding to the website identifier to which the current page belongs.
The control display module 807 is configured to display, on the current page, a multi-page close control corresponding to a multi-page controller of the website identifier to which the current page belongs.
Optionally, the web site to which the web site belongs is identified as a primary domain name of the web site.
Optionally, the multi-page controller creation module 806 is specifically configured to create a SharedWorker in the browser, where the SharedWorker is used as the multi-page controller corresponding to the website identifier of the current page.
Optionally, the multi-page controller creation module 806 is specifically configured to create a localtorage in the browser, where the localtorage is stored with a closing instruction state as a multi-page controller corresponding to the website identifier of the current page.
Accordingly, the connection creation module 805 is specifically configured to establish a connection for the current page and the multi-page controller by adding the listening onstore event and the storage event to the window object of the current page.
Optionally, the multi-page controller creation module 806 is specifically configured to send a creation request to the background server, so that the background server creates the corresponding multi-page controller of the website identifier pair of the current page.
Accordingly, the connection creation module 805 is specifically configured to: and establishing a WebSocket connection for the current page and the multi-page controller in the background server, or establishing a connection with the multi-page controller in the background server in an ajax polling mode.
The multi-page control device provided in the embodiment of the present application and the multi-page control method adopt the same inventive concept, and can achieve the same beneficial effects, and are not described herein again.
Based on the same inventive concept as the multi-page control method, the embodiment of the application also provides an electronic device, which can be a desktop computer, a portable computer, a smart phone, a tablet computer, a personal digital assistant (Personal Digital Assistant, PDA), a server, and the like. As shown in fig. 9, the electronic device 90 may include a processor 901 and a memory 902.
The processor 901 may be a general purpose processor such as a Central Processing Unit (CPU), digital signal processor (Digital Signal Processor, DSP), application specific integrated circuit (Application Specific Integrated Circuit, ASIC), field programmable gate array (Field Programmable Gate Array, FPGA) or other programmable logic device, discrete gate or transistor logic, discrete hardware components, and may implement or perform the methods, steps, and logic blocks disclosed in embodiments of the present application. The general purpose processor may be a microprocessor or any conventional processor or the like. The steps of a method disclosed in connection with the embodiments of the present application may be embodied directly in a hardware processor for execution, or in a combination of hardware and software modules in the processor for execution.
The memory 902 is a non-volatile computer-readable storage medium that can be used to store non-volatile software programs, non-volatile computer-executable programs, and modules. The Memory may include at least one type of storage medium, which may include, for example, flash Memory, hard disk, multimedia card, card Memory, random access Memory (Random Access Memory, RAM), static random access Memory (Static Random Access Memory, SRAM), programmable Read-Only Memory (Programmable Read Only Memory, PROM), read-Only Memory (ROM), charged erasable programmable Read-Only Memory (Electrically Erasable Programmable Read-Only Memory, EEPROM), magnetic Memory, magnetic disk, optical disk, and the like. The memory is any other medium that can be used to carry or store desired program code in the form of instructions or data structures and that can be accessed by a computer, but is not limited to such. The memory 902 of the present embodiment may also be circuitry or any other device capable of implementing a memory function for storing program instructions and/or data.
Exemplary program product
The embodiment of the application provides a computer readable storage medium for storing computer program instructions for the electronic device, which contains a program for executing the multi-page control method.
The computer storage media described above can be any available media or data storage device that can be accessed by a computer, including, but not limited to, magnetic storage (e.g., floppy disks, hard disks, magnetic tape, magneto-optical disks (MOs), etc.), optical storage (e.g., CD, DVD, BD, HVD, etc.), and semiconductor storage (e.g., ROM, EPROM, EEPROM, nonvolatile storage (NAND FLASH), solid State Disk (SSD)), etc.
In some possible implementations, the various aspects of the present application may also be implemented as a computer program product comprising program code for causing a server device to perform the steps of the multi-page control method according to the various exemplary embodiments of the present application as described in the section "exemplary method" above in this specification, when the computer program product is run on the server device.
The computer program product may employ any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. The readable storage medium can be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the foregoing. More specific examples (a non-exhaustive list) of the readable storage medium would include the following: an electrical connection having one or more wires, a portable disk, a hard disk, random Access Memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
A computer program product for multi-page control according to embodiments of the present application may employ a portable compact disc read-only memory (CD-ROM) and include program code and may run on a server device. However, the program product of the present application is not limited thereto, and in this document, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
The readable signal medium may include a data signal propagated in baseband or as part of a carrier wave with readable program code embodied therein. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination of the foregoing. A readable signal medium may also be any readable medium that is not a readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.
Program code embodied on a readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
Program code for carrying out operations of the present application may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, C++ or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computing device, partly on a remote computing device, or entirely on the remote computing device or server. In the case of remote computing devices, the remote computing device may be connected to the user computing device through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computing device (e.g., connected via the Internet using an Internet service provider).
It should be noted that although several units or sub-units of the apparatus are mentioned in the above detailed description, such a division is merely exemplary and not mandatory. Indeed, the features and functions of two or more of the elements described above may be embodied in one element in accordance with embodiments of the present application. Conversely, the features and functions of one unit described above may be further divided into a plurality of units to be embodied.
Furthermore, although the operations of the methods of the present application are depicted in the drawings in a particular order, this is not required to or suggested that these operations must be performed in this particular order or that all of the illustrated operations must be performed in order to achieve desirable results. Additionally or alternatively, certain steps may be omitted, multiple steps combined into one step to perform, and/or one step decomposed into multiple steps to perform.
While the spirit and principles of this application have been described with reference to several particular embodiments, it is to be understood that this application is not limited to the disclosed particular embodiments nor does it imply that features in the various aspects are not useful in combination, nor are they intended to be in any way useful for the convenience of the description. The application is intended to cover various modifications and equivalent arrangements included within the spirit and scope of the appended claims.

Claims (16)

1. A multi-page control method, comprising:
responding to triggering operation of a multi-page closing control on the current page;
invoking a multi-page controller connected with the current page, and sending a closing instruction to a page connected with the multi-page controller through the multi-page controller so as to close the page connected with the multi-page controller, wherein all the pages connected with the multi-page controller are associated;
before the response to the triggering operation of the multi-page close control on the current page, the method further comprises:
responding to the operation of opening the current page, and acquiring the website identification of the current page;
if a multi-page controller corresponding to the website identifier of the current page exists, establishing connection for the current page and the multi-page controller, otherwise, establishing a corresponding multi-page controller for the website identifier of the current page, and establishing connection for the current page and the multi-page controller;
and displaying a multi-page closing control corresponding to the multi-page controller on the current page.
2. The method of claim 1, wherein the multi-page close control comprises closing all page controls and closing other page controls;
after the current page receives the closing instruction, the method further comprises the following steps:
if the triggering operation is determined to be aimed at closing all page controls, closing the current page;
and if the triggering operation is determined to be aimed at closing other page controls, not closing the current page.
3. The method of claim 1, wherein all pages associated with establishing a connection with the multi-page controller belong to the same web site.
4. The method of claim 1, wherein the web site is identified as a primary domain name of the web site.
5. The method according to claim 1, wherein the creating a corresponding multi-page controller for the website identifier of the current page specifically comprises:
and creating a ShareWorker in the browser as a multi-page controller corresponding to the website identifier of the current page.
6. The method according to claim 1, wherein the creating a corresponding multi-page controller for the website identifier of the current page specifically comprises:
creating a localtorage in a browser, wherein the localtorage is used as a multi-page controller corresponding to a website identifier of the current page, and a closing instruction state is stored in the localtorage;
the establishing connection between the current page and the multi-page controller specifically includes:
and adding a monitoring onstore event and a storage event on the window object of the current page.
7. The method according to claim 1, wherein the creating a corresponding multi-page controller for the website identifier of the current page specifically comprises:
sending a creation request to a background server so that the background server creates a multi-page controller corresponding to the website identifier of the current page;
establishing connection for the current page and the multi-page controller, wherein the connection comprises the following steps:
and establishing a WebSocket connection between the current page and the multi-page controller in the background server, or establishing a connection between the current page and the multi-page controller in the background server in an ajax polling mode.
8. A multi-page control apparatus, comprising:
the response module is used for responding to the triggering operation of the multi-page closing control on the current page;
the calling module is used for calling the multi-page controller connected with the current page, and sending a closing instruction to the page connected with the multi-page controller through the multi-page controller so as to close the page connected with the multi-page controller, wherein all the pages connected with the multi-page controller are associated;
the apparatus further comprises:
the acquisition module is used for responding to the operation of opening the current page and acquiring the website identification of the current page;
the connection creation module is used for establishing connection between the current page and the multi-page controller when the multi-page controller corresponding to the website identifier of the current page exists;
the multi-page controller creation module is used for creating a corresponding multi-page controller for the website identifier of the current page when the multi-page controller corresponding to the website identifier of the current page does not exist;
the connection creation module is further configured to create a connection for the current page and a multi-page controller corresponding to the website identifier to which the current page belongs;
and the control display module is used for displaying a multi-page closing control corresponding to the multi-page controller of the website identifier of the current page on the current page.
9. The apparatus of claim 8, wherein the multi-page close control comprises closing all page controls and closing other page controls;
the device further comprises a closing module, which is used for closing the current page if the triggering operation is determined to be aimed at closing all page controls after the current page receives the closing instruction; and if the triggering operation is determined to be aimed at closing other page controls, not closing the current page.
10. The apparatus of claim 8, wherein all pages associated with establishing a connection with the multi-page controller belong to the same website.
11. The apparatus of claim 8, wherein the web site is identified as a primary domain name of the web site.
12. The apparatus of claim 8, wherein the multi-page controller creation module is specifically configured to create a SharedWorker in a browser as the multi-page controller corresponding to the website identifier of the current page.
13. The apparatus of claim 8, wherein the multi-page controller creation module is specifically configured to create a localtorage in a browser, where the localtorage is stored with a closing instruction state, as a multi-page controller corresponding to a website identifier to which the current page belongs;
the connection creation module is specifically configured to create a connection for the current page and the multi-page controller by adding a listening onstore event and a storage event to a window object of the current page.
14. The apparatus of claim 8, wherein the multi-page controller creation module is specifically configured to send a creation request to a background server, so that the background server creates a corresponding multi-page controller for the website identifier pair to which the current page belongs;
the connection creation module is specifically configured to: and establishing a WebSocket connection between the current page and the multi-page controller in the background server, or establishing a connection between the current page and the multi-page controller in the background server in an ajax polling mode.
15. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the processor implements the steps of the method of any one of claims 1 to 7 when the computer program is executed by the processor.
16. A computer readable storage medium having stored thereon computer program instructions, which when executed by a processor, implement the steps of the method of any of claims 1 to 7.
CN201911235285.6A 2019-12-05 2019-12-05 Multi-page control method and device, electronic equipment and storage medium Active CN111125595B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911235285.6A CN111125595B (en) 2019-12-05 2019-12-05 Multi-page control method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911235285.6A CN111125595B (en) 2019-12-05 2019-12-05 Multi-page control method and device, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN111125595A CN111125595A (en) 2020-05-08
CN111125595B true CN111125595B (en) 2023-06-27

Family

ID=70497547

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911235285.6A Active CN111125595B (en) 2019-12-05 2019-12-05 Multi-page control method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN111125595B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112199148B (en) * 2020-10-15 2023-03-10 Tcl通讯(宁波)有限公司 Information processing method, device, storage medium and terminal
CN112422662A (en) * 2020-11-09 2021-02-26 广州锦行网络科技有限公司 Method for overall scheduling of website global polling request
CN116827933B (en) * 2023-08-30 2023-11-10 中航金网(北京)电子商务有限公司 Control method and device of cloud server, electronic equipment and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101477558A (en) * 2009-01-15 2009-07-08 腾讯科技(深圳)有限公司 Browser label management method and multi-page browsing system
CN103853846A (en) * 2014-03-25 2014-06-11 可牛网络技术(北京)有限公司 Method and system for closing pages in browser
CN105930046A (en) * 2016-04-01 2016-09-07 乐视控股(北京)有限公司 Method and apparatus for deleting browser pages
WO2018115441A1 (en) * 2016-12-22 2018-06-28 Ve Global Uk Limited Web access enhancement

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101477558A (en) * 2009-01-15 2009-07-08 腾讯科技(深圳)有限公司 Browser label management method and multi-page browsing system
CN103853846A (en) * 2014-03-25 2014-06-11 可牛网络技术(北京)有限公司 Method and system for closing pages in browser
CN105930046A (en) * 2016-04-01 2016-09-07 乐视控股(北京)有限公司 Method and apparatus for deleting browser pages
WO2018115441A1 (en) * 2016-12-22 2018-06-28 Ve Global Uk Limited Web access enhancement

Also Published As

Publication number Publication date
CN111125595A (en) 2020-05-08

Similar Documents

Publication Publication Date Title
TWI690812B (en) Method, device and client for dynamic layout of page elements
CN111125595B (en) Multi-page control method and device, electronic equipment and storage medium
WO2019157894A1 (en) Application page display method and apparatus, storage medium and electronic device
US9503499B1 (en) Concealing latency in display of pages
US9009334B1 (en) Remote browsing session management
WO2019157880A1 (en) Method and device for generating link for application page, storage medium, and electronic apparatus
US20170364210A1 (en) Method and Apparatus for Displaying Content on Same Screen, and Terminal Device
US10109079B2 (en) Method and apparatus for processing tab in graphical interface
JP2020504865A (en) Application data processing method, apparatus, and storage medium
CN111800462B (en) Micro service instance processing method, micro service instance processing device, computer equipment and storage medium
WO2019157860A1 (en) Method and device for launching application interface, storage medium, and electronic apparatus
US20230394223A1 (en) Page jumping method, apparatus, and device, and storage medium and program product
CN104965848A (en) Front-end resource loading method and apparatus
CN110730384B (en) Webpage control method and device, terminal equipment and computer storage medium
WO2020200173A1 (en) Document input content processing method and apparatus, electronic device, and storage medium
US20150222664A1 (en) Conflict resolution in extension induced modifications to web requests and web page content
WO2021190129A1 (en) Method and device for page processing, electronic device, and computer-readable storage medium
US20220366066A1 (en) Display method, display device, and electronic device
US20230007059A1 (en) Information switching and sharing method, device, electronic apparatus, and storage medium
US20130151850A1 (en) Auto File Locker
CN112269959A (en) Display content control method and device, readable medium and electronic equipment
CN109254781B (en) Method and equipment for installing application on user equipment
US20140157104A1 (en) Dynamic sharing and updating of a web page
CN112256372B (en) Information processing method and device and electronic equipment
WO2014040480A1 (en) Method and system for restoring closed webpages

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
CB03 Change of inventor or designer information
CB03 Change of inventor or designer information

Inventor after: Song Jungang

Inventor after: Jia Yulong

Inventor after: Xiao Huiqin

Inventor after: Sun Lei

Inventor after: Lv Ming

Inventor after: Li Wei

Inventor after: Wu Chao

Inventor after: Sun Yingyuan

Inventor after: Zeng Xianglin

Inventor after: Jiao Wenbin

Inventor after: Gou Yanqing

Inventor after: Li Mu

Inventor after: Zhang Junfeng

Inventor after: Zhang Jiaming

Inventor after: Li Yanhong

Inventor after: Wang Hui

Inventor after: Peng Zhilong

Inventor after: Wang Feilong

Inventor after: Gui Cong

Inventor before: Song Jungang

Inventor before: Jia Yulong

Inventor before: Xiao Huiqin

Inventor before: Sun Lei

Inventor before: Lv Ming

Inventor before: Li Wei

Inventor before: Wu Chao

Inventor before: Sun Yingyuan

Inventor before: Zeng Xianglin

Inventor before: Jiao Wenbin

Inventor before: Gou Yanqing

Inventor before: Li Mu

Inventor before: Zhang Junfeng

Inventor before: Zhang Jiaming

Inventor before: Li Yanhong

Inventor before: Wang Hui

Inventor before: Peng Zhilong

Inventor before: Wang Feilong

Inventor before: Gui Cong

GR01 Patent grant
GR01 Patent grant