WO2015024262A1 - 一种网页页面处理方法及设备 - Google Patents

一种网页页面处理方法及设备 Download PDF

Info

Publication number
WO2015024262A1
WO2015024262A1 PCT/CN2013/082209 CN2013082209W WO2015024262A1 WO 2015024262 A1 WO2015024262 A1 WO 2015024262A1 CN 2013082209 W CN2013082209 W CN 2013082209W WO 2015024262 A1 WO2015024262 A1 WO 2015024262A1
Authority
WO
WIPO (PCT)
Prior art keywords
page
resource
operation instruction
resources
media stream
Prior art date
Application number
PCT/CN2013/082209
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 CN201380002074.2A priority Critical patent/CN104995619B/zh
Priority to ES13887588.5T priority patent/ES2680220T3/es
Priority to PCT/CN2013/082209 priority patent/WO2015024262A1/zh
Priority to EP13887588.5A priority patent/EP2871582B1/en
Priority to EP18168768.2A priority patent/EP3410313B1/en
Priority to US14/584,962 priority patent/US10929497B2/en
Publication of WO2015024262A1 publication Critical patent/WO2015024262A1/zh

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/958Organisation or management of web site content, e.g. publishing, maintaining pages or automatic linking
    • 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/957Browsing optimisation, e.g. caching or content distillation

Definitions

  • the Internet has become an indispensable part of people's lives. People can communicate with friends through the Internet, or obtain information through the Internet, and can watch videos through the Internet. People generally use the browser to implement the above technologies.
  • the browser can support many operations, such as: forward, backward, refresh, close, etc., and these operations can be achieved by clicking on the virtual buttons displayed on the browser or the keys on the keyboard.
  • an embodiment of the present invention provides a webpage page processing method, including:
  • the operation instruction may include an instruction to replace the page
  • the first resource included in the first page is controlled to be in a connected state, where the first resource is a resource that needs to be reserved in advance.
  • the first page includes:
  • a page, transaction page, and registration page that contain resources for real-time transmission.
  • the acquiring the second resource according to the operation instruction, and displaying the second resource includes: updating, according to the operation instruction, a resource other than the real-time transmitted resource in the first page, in combination with the first aspect
  • the operation instruction is the refresh operation instruction
  • the first page is a page real-time communication page
  • the page real-time communication includes:
  • the acquiring the second resource according to the operation instruction, and displaying the second resource includes: updating, according to the operation instruction, the media stream session connection object and the media stream in the first page a resource, and displaying the acquired resource in the first page, the handle A video element or an audio element assigned to the first page.
  • the operation instruction is an operation instruction for establishing a hyperlink; and the controlling the first page includes The first resource remains connected, including:
  • the acquiring the second resource according to the operation instruction, and displaying the second resource includes: acquiring, according to the operation instruction, a page resource of a resource connection corresponding to the operation instruction, and adding a page for the page resource for Open the parameter value of the page resource in the new tab and open the page resource in the new tab.
  • an embodiment of the present invention provides a communications device, including: a receiving unit and a control unit, where:
  • the receiving unit is configured to receive an operation instruction about the first page, where the operation instruction may include an instruction to replace the page;
  • the control unit is configured to control, according to the operation instruction, that the first resource included in the first page is kept in a connected state, where the first resource is a resource that is reserved in advance.
  • the device further includes:
  • an acquiring unit configured to acquire a second resource according to the operation instruction, and display the second resource, where the second resource is different from the first resource.
  • the first page includes:
  • a page, transaction page, and registration page that contain resources for real-time transmission.
  • the operation instruction is retracted, the operation instruction is refreshed, the operation instruction for establishing a hyperlink, or the operation instruction is closed.
  • the operation instruction is the back operation instruction, and the control unit is further configured to control the first All resources of the page remain connected;
  • the obtaining unit is further configured to: obtain, according to the operation instruction, a page resource of a page address of a running time in a window history list of a browser running the first page, and display the page resource Source.
  • the operation instruction is the refresh operation instruction
  • the first page is a resource that includes real-time transmission
  • the control unit is further configured to control, by the control unit, the resource of the real-time transmission of the first page to be in a connected state;
  • the obtaining unit is further configured to update resources in the first page other than the real-time transmitted resource according to the operation instruction, and display the updated resource and the real-time transmission in the first page. resource of.
  • the operation instruction is the refresh operation instruction
  • the first page is a page real-time communication page
  • the media stream object of the page real-time communication page is a resource that is transmitted in real time
  • the control unit is further configured to control the media stream session connection object and the media stream object of the first page to remain in a connected state, and save the The media stream corresponds to the handle of the buffer area;
  • the obtaining unit is further configured to update resources in the first page other than the media stream session connection object and the media stream according to the operation instruction, and display the acquired in the first page. a resource, assigning the handle to a video element or an audio element of the first page.
  • the operation instruction is an operation instruction for establishing a hyperlink; and the control unit is further configured to control the All resources of the first page remain in a connected state;
  • the obtaining unit is further configured to acquire, according to the operation instruction, a page resource of the resource connection corresponding to the operation instruction, and add a parameter value for opening the page resource in the new label in the page of the page resource, and in the new label Open the page resource in .
  • an embodiment of the present invention provides a communication device, including: a network interface, a memory, and a communication bus, and a processor coupled to the network interface and the memory by using the communication bus, where the memory is used for storing A set of program code, the processor is configured to invoke a program stored in the memory, and perform the following operations:
  • the operation instruction may include an instruction to replace the page;
  • the first resource included in the first page is controlled to be in a connected state, where the first resource is a resource that is reserved in advance.
  • the processor is further configured to perform the following operations after performing an operation of controlling the first resource included in the first page to remain in a connected state:
  • the first page includes:
  • a page, transaction page, and registration page that contain resources for real-time transmission.
  • the operation instruction is retracted, the operation instruction is refreshed, the operation instruction for establishing a hyperlink, or the operation instruction is closed.
  • the operation instruction is the back operation instruction, and the processor performs control on the first page
  • the operation of the included first resource remains in a connected state, including:
  • the operation instruction is the refresh operation instruction
  • the first page is a resource that includes real-time transmission
  • the operation performed by the processor to control the first resource included in the first page to remain in a connected state including:
  • the resource for controlling real-time transmission of the first page remains in a connected state
  • the operation instruction is the refresh operation instruction
  • the first page is a page real-time communication page
  • the media stream object of the page real-time communication page is a real-time transmission resource
  • the operation performed by the processor to control the first resource included in the first page to remain in a connected state includes:
  • the operation instruction is an operation instruction for establishing a hyperlink
  • the first page contains the first resource to remain in the connected state, including:
  • the operation instruction about the first page is received, wherein the operation instruction may include an instruction to replace the page to control the first resource included in the first page to remain in a connected state.
  • the first resource is not disconnected, that is, the first resource is maintained in the real-time update state, so that the embodiment of the present invention can improve the robustness of the browsing page.
  • FIG. 1 is a schematic flowchart of a webpage page processing method according to an embodiment of the present invention
  • FIG. 2 is a schematic flowchart of another webpage page processing method according to an embodiment of the present invention
  • FIG. 4 is a schematic flowchart diagram of another method for processing a webpage according to an embodiment of the present invention.
  • FIG. 5 is a schematic structural diagram of a communication device according to an embodiment of the present invention
  • FIG. 6 is a schematic structural diagram of another communication device according to an embodiment of the present invention.
  • Figure ⁇ is a schematic structural diagram of another communication device according to an embodiment of the present invention.
  • FIG. 8 is a schematic structural diagram of another communication device according to an embodiment of the present disclosure.
  • FIG. 9 is a schematic structural diagram of another communication device according to an embodiment of the present invention. detailed description
  • the resource may be an information resource defined by an Internet standard (for example, the W3C standard) for composing a webpage, and includes various network data objects or monthly services that can be marked with a URI.
  • Resources can be represented in a variety of ways ("A network data object or service that can be identified by a URI, as defined in section 3.2. Resources may be available in m ltiple representations (eg multiple languages, data formats, size, and resolutions )
  • Resources can also be page source code files, such as: Hypertext Markup Language (HTML) resource files, Cascading Style Sheet (CSS) resource files, and JavaScript resource files.
  • HTML Hypertext Markup Language
  • CSS Cascading Style Sheet
  • the foregoing resource may further include at least one element, where the element may specifically be a resource element constituting a resource and may be independently presented to the user, for example, a text, an image, or a note.
  • An element is a component of a tree structure defined by the definition of a document type. It is identified in the document instance by some descriptive symbol, usually the start character and End character.
  • the first resource is a video resource, that is, the communication device always receives the video resource, and displays the video resource, for example:
  • a resource is an audio or video communication resource, that is, the communication device always receives the audio or video communication resource sent by the server, and simultaneously transmits the video resource collected by the communication device to the server, that is, the audio or video communication is always maintained; for example:
  • the resource is all resources of the first page, that is, the communication device is always connected to the first page, and it can also be understood that the communication device always opens the first page.
  • the communication device is a device that implements the method provided by the embodiment of the present invention.
  • the communication device may be any device that can open a page, such as a mobile phone, a computer, a tablet computer, or the like.
  • 1 is a schematic flowchart of a method for processing a web page according to an embodiment of the present invention. As shown in FIG. 1, the method includes:
  • the operation instruction about the first page input by the user may be received, for example, an operation instruction input by the user by clicking the touch screen of the communication device, an operation instruction input by the user through the external device, such as an external device such as a mouse, a keyboard, a touch device, or the like.
  • the operation instruction about the first page may be an operation instruction input on the first page, or input on an interface input on the browser such as a window bar or a toolbar of the browser displaying the first page. Operation instructions.
  • the instruction for replacing the page may specifically be used to replace another page with the first page, where the other page may be a blank page, a historical browsing page, a refreshed page, or a newly opened page. Wait.
  • the first resource included in the first page is controlled to be in a connected state, where the first resource is a resource that is reserved in advance.
  • the first resource included in the first page is controlled to be in a connected state, that is, the first resource is kept in the connected state.
  • the first resource may be pre-specified and needs to be reserved corresponding to the operation instruction.
  • resource of. Specifically, the first resource included in the first page is further controlled to be in a connected state.
  • the embodiment may respond to the step 101 receiving an operation instruction, and when the transaction page and the registration page do not respond to the operation instruction received in step 101,
  • the embodiments described in the following embodiments please refer to the embodiments described in the following embodiments.
  • This embodiment can be applied to a communication device such as a communication device such as a mobile phone, a computer, or a tablet computer. That is, these communication devices can implement the above method.
  • the operation instruction about the first page is received, wherein the operation instruction may include an instruction to replace the page to control the first resource included in the first page to remain in a connected state.
  • the first resource is not disconnected, that is, the first resource is maintained in the real-time update state, so that the embodiment of the present invention can improve the robustness of the browsing page.
  • 2 is a schematic flowchart of a method for processing a web page according to an embodiment of the present invention. As shown in FIG. 1, the method includes:
  • the operation instruction about the first page input by the user may be received, for example, an operation instruction input by the user by clicking the touch screen of the communication device, an operation instruction input by the user through the external device, such as an external device such as a mouse, a keyboard, a touch device, or the like.
  • the operation instruction about the first page may be an operation instruction input on the first page, or input on an interface input on the browser such as a window bar or a toolbar of the browser displaying the first page. Operation instructions.
  • the instruction for replacing the page may specifically be used to replace another page with the first page, where the other page may be a blank page, a historical browsing page, a refreshed page, or a newly opened page. Wait.
  • the first resource included in the first page is controlled to be in a connected state, that is, the first resource is kept in the connected state.
  • the first resource included in the first page is controlled to be in a connected state, that is, the first resource is kept in the connected state.
  • 203. Acquire a second resource according to the operation instruction, and display the second resource, where the second resource is different from the first resource.
  • the foregoing second resource may be a resource for displaying on the first page, that is, step 103 displays the second resource in the first page, because the element of the first resource is in a connected state, that is, when step 103 is displayed, the first
  • the page displays both the first resource and the second resource.
  • the first resource is an audio or video communication resource
  • the first page displays the audio or video communication
  • displays the acquired second resource for example, the second resource is the text, image, or button on the first page. 3 ⁇ 4 and other resources.
  • the second resource may also be that the first page includes a page resource corresponding to the hyperlink, that is, the first page is kept in the connected state, and the first page includes the page resource corresponding to the hyperlink, and the page resource is displayed.
  • This embodiment can be applied to a communication device such as a communication device such as a mobile phone, a computer, or a tablet computer. That is, these communication devices can implement the above method.
  • the operation instruction about the first page is received, where the operation instruction may include an instruction to replace the page, and the first resource included in the first page is kept in a connected state, and is obtained according to the operation instruction. a second resource, and displaying the second resource. That is, when the second resource is displayed, the first resource is not disconnected, that is, when the second resource is displayed, the first resource is maintained in the real-time update state, so that the embodiment of the present invention can improve the robustness of the browsing page.
  • FIG. 3 is a schematic flowchart of another web page processing method according to an embodiment of the present invention. As shown in FIG. 3, the method includes:
  • an operation instruction input by a user by clicking a touch screen of a communication device an operation instruction input by a user through an external device, such as an external device such as a mouse, a keyboard, or a touch device.
  • the operation instruction about the first page may be an operation instruction input on the first page, or input on an interface input on the browser such as a window bar or a toolbar of the browser displaying the first page. Operation instructions.
  • the instruction for replacing the page may specifically be used to replace another page with the first page, where the other page may be a blank page, a historical browsing page, and a refresh Page or newly opened page, etc.
  • the above operation instructions may specifically include:
  • the operation instruction is retracted, the operation instruction is refreshed, the operation instruction for establishing a hyperlink, or the operation instruction is closed.
  • the back operation command may be an operation instruction such as the user clicking the back button of the browser, or the user clicking the back button of the keyboard (for example, a Backspace button); the refresh operation command may click the refresh button of the browser or the user clicks the keyboard.
  • the above refresh button (for example: F5 button).
  • the operation instruction for establishing the hyperlink may be an operation instruction for the user to click the hyperlink resource on the first page, for example: clicking the resource label of the resource such as the image hyperlink resource, the text hyperlink resource or the video hyperlink resource on the first page 3 ⁇ 4.
  • the above-mentioned shutdown operation instruction may specifically be a click-close operation command of 3 ⁇ 4.
  • the first page may include:
  • a page, transaction page, and registration page that contain resources for real-time transmission.
  • a page containing resources for real-time transmission can include:
  • Web Real-Time Communication (WebRTC) page page containing video, page containing audio, page containing game, etc.
  • the trading page can include:
  • a page containing payment functions a page for selecting items, such as an online support page or an online shopping page.
  • the registration page can include:
  • a page for interactive user information For example: The page the user registered.
  • Control that the first resource included in the first page is kept in a connected state, where the first resource is a resource that needs to be reserved in advance.
  • the operation instruction is the back operation instruction
  • the controlling the first resource included in the first page to be in a connected state may include:
  • Controlling that all resources of the first page remain in a connected state; that is, the first resource is all resources of the first page, and controlling all resources of the first page to remain in a connected state may be, without closing the first page, that is, The first page is continued to be opened, and no change operation is performed on the first page.
  • the first page may be the above-mentioned page including the resource transmitted in real time, the transaction page, and the registration page.
  • Step 303 can include:
  • the page address is www.baidu.com, that is, the page is opened and the page is displayed.
  • the operation instruction may further be the operation instruction for establishing a hyperlink
  • the controlling the first resource included in the first page to be in a connected state may include: controlling the All the resources of a page are kept in a connected state; that is, the first resource is all resources of the first page, and all the resources of the first page are controlled to be in a connected state, and the first page is not closed, and the first page is continued to be opened.
  • the first page may be the above-mentioned page including the resource transmitted in real time, the transaction page, and the registration page.
  • Step 303 can include:
  • the page resource of the resource connection corresponding to the operation instruction may be a page corresponding to the resource of the page, where the operation instruction for establishing the hyperlink may be: clicking the resource label of the first page, that is, the page may be specifically Clicking the resource label of the first page to obtain the obtained page resource, and the above-mentioned elements of all the resources of the first page are connected, so that the operation refers to adding the page corresponding to the page resource for use in the new label.
  • the parameter value of the page resource is opened, so that the page corresponding to the page resource can be opened in the new tab, that is, the browser opens the first page and the page corresponding to the page resource at this time.
  • the parameter value used to open the page resource in the new tag may specifically be "_blank," the parameter value.
  • the operation instruction is the refresh operation instruction
  • the first page is a page that includes a resource that is transmitted in real time, that is, the first resource is a resource that is transmitted in real time, for example, a WebRTC page.
  • the page containing the video, the page containing the audio, the page containing the game, and the like, and the controlling the first resource included in the first page to remain in the connected state may include:
  • the resource for controlling real-time transmission of the first page remains in a connected state; for example: controlling audio or video communication resources, video resources, audio resources, and game resources to remain in a connected state, that is, the first page can also perform audio or video communication, Play video, video audio or run a game.
  • Step 303 can include:
  • Updating the resource in the first page except the first resource may be: receiving a resource other than the real-time transmitted resource in the first page sent by the server where the first page is located, and receiving the server The sent resource is updated to the first page.
  • the UI interface of the page such as: text, images, frames, buttons, etc.
  • the operation instruction is the refresh operation instruction
  • the first page is a WebRTC page
  • the media stream (eg, a Media Stream) object of the WebRTC page is a real-time transmission resource.
  • the controlling the first resource included in the first page to be in a connected state may include:
  • Controlling a media stream session connection object e.g., peer-to-peer connection Peer Connection
  • a media stream session connection object e.g., peer-to-peer connection Peer Connection
  • the media stream session connection object may specifically be a communication account of the other party in the real-time communication, and the media stream object may specifically be a communication platform (for example, a server) for transmitting the media stream.
  • Controlling the media stream session connection object of the first page and the media stream object to remain in a connected state may be a connection relationship with the media stream session connection object, and maintaining the media stream object transmission with the media stream session connection object , that is, audio or video communication has been ongoing.
  • the media stream session may be connected to a related session description protocol (SDP) parameter of the object media stream object, an IP port number, a corresponding coding resource, and a corresponding decoding resource and a handle of the corresponding buffer of the media stream. .
  • SDP session description protocol
  • the media stream session connection object may specifically include the session information for controlling the establishment and transmission of the media stream.
  • the media stream object may specifically include: the actually transmitted audio and video media stream content.
  • Media A Streaming Session Connection Object (RTC Peer connection object), wherein the Media Stream Session Connection Object is defined in the WebRTC standard as follows:
  • a Media Stream Session Connection Object has an associated Interactive Connection Establishment (ICE) Proxy, media stream session connection signaling status, ICE collection status, and ICE connection status.
  • ICE Interactive Connection Establishment
  • one media stream session connection object has two associated stream collections.
  • One is a local stream set, which represents the media stream sent by the current media stream session connection object, and the other is a remote stream set, which represents the media stream from the far end that the current media stream session connection object is receiving.
  • An RTCPeerConnection object has two associated stream sets. A local streams set, representing streams that are currently sent, and a remote streams set, representing streams that are currently received with The RTCPeerConnection object.
  • the stream sets are initialized to empty sets when the RTCPeerConnection object is created ).
  • the Media Stream Object is defined in the WebRTC standard as follows: Each media stream object contains zero or more tracks, specifically audio tracks and video tracks. All tracks in the media stream object are synchronized at render time. Between different media streams, there is no need to synchronize (each MediaStream object can contain zero or more tracks, in particular audio and video tracks. All tracks in a MediaStream are intended to be synchronized when rendered. Different MediaStreams do not need to be synchronized ) .
  • Step 303 can include:
  • the resource in the first page except the media stream session connection object and the media stream may specifically be part or all resources in the first page except the media stream session connection object and the media stream.
  • the resources in the first page except the media stream session connection object and the media stream may specifically include: HTML resource files, CSS resource files, JavaScript resource files, and press 3 ⁇ 4, where 3 ⁇ 4 can include the disconnect button, the call button, the hangup button, and the like.
  • Assigning the handle to the video element or audio element of the first page may be a webkitURL.createObjectURL(stream) method assigning a handle of the buffer to the video element or audio element of the first page, the first page
  • the video element or audio element also displays the media stream object described above.
  • the operation instruction is the refresh operation instruction
  • the first page is a transaction page and a registration page
  • the controlling the first resource included in the first page remains as a connection.
  • Status including:
  • All the resources of the first page are controlled to be in a connected state; and the step 303 is not included in the embodiment, that is, when the operation instruction is received, and the first page is a transaction page and a registration page, the operation received in step 301 is not performed.
  • the instruction makes any response.
  • the operation instruction is an operation instruction for closing a page
  • the controlling the first resource included in the first page to be in a connected state includes:
  • Step 303 can include:
  • a prompt message for prompting whether to close the first page is acquired according to the operation instruction.
  • the prompt message may be obtained by using the following program code:
  • the above prompt message may include the words "Your operation may cause the current call to be interrupted, whether to close," and the prompt message may further include a button for closing the first page, and the prompt message A button for canceling the above operation command may also be included.
  • the button for closing the first page the first page is closed, and when the user clicks the button for canceling the above operation command, the button continues to be opened. First page.
  • the above program code may specifically be a javascript code.
  • “window” can be a browser window object;
  • "onbeforeunload” can be an event handler in a window object. Used to trigger when the page is closed or refreshed, "function() ⁇ return 'XXX'; ⁇ " can be a function that returns a string hint.
  • the function of the entire program code is to pop up a text prompt box when the user closes or refreshes the page.
  • the method may further include:
  • step 304 Determine whether the first page is a page that needs to provide robustness. If yes, execute step 301; if no, end the process.
  • the page that needs to provide robustness may include:
  • a page, transaction page, and registration page that contain resources for real-time transmission.
  • the determining whether the first page is a page that needs to provide robustness may include: determining whether the code of the new RTC Peer Connection (configuration) is included in the JavaScript resource file of the first page and in the HTML resource file. If yes, it is determined that the first page is a WebRTC page, and the WebRTC page is a page that includes a resource transmitted in real time, that is, the first page is determined to be a page that needs to provide robustness.
  • the method may further include:
  • Determining whether the first page starts audio or video communication and if so, entering a page robustness mode, and if not, continuing to perform a step of determining whether the first page begins audio or video communication.
  • the determining that the first page starts audio or video communication may include:
  • the above "addstream” event, the above “addstream(), method, and the above “datachannel” event are all known events or methods of the Internet standard (for example, the W3C standard).
  • determining whether the first page is a page that needs to provide robustness may include:
  • determining whether the first page is a page that needs to provide robustness may include:
  • the determining whether the first page is a page that needs to provide robustness may include: determining whether the html tag and the code of the online registration are included in the JavaScript resource file of the first page and the HTML resource file, and if yes, determining The first page is an online registration page, that is, the first page is determined to be a registration page;
  • the determining whether the first page is a page that needs to provide robustness may include: determining whether the first page of the JavaScript resource file and the HTML resource file contain the online game registration identifier or other page application (Web Application) The registration identifier, if yes, determines that the first page is an online game page or an online application page, that is, the first page is determined to be a page containing resources for real-time transmission.
  • step 201 after entering the page robustness mode, step 201 can be performed.
  • the various embodiments described on the basis of the above embodiments focus on how the received operation instructions are the backward operation instruction, the refresh operation instruction, the operation instruction for establishing the hyperlink, and the closing operation instruction. Controlling that the first resource included in the first page remains in a connected state, and acquiring a second resource according to the operation instruction, and displaying the second resource.
  • These implementations can improve the robustness of the browsing page.
  • the following is an embodiment of the device of the present invention, and an embodiment of the device of the present invention is used to perform an embodiment of the method of the present invention.
  • the method implemented in the second embodiment and the third embodiment for the convenience of description, only the parts related to the embodiment of the present invention are shown. The specific technical details are not disclosed.
  • FIG. 5 is a schematic structural diagram of a communication device according to an embodiment of the present invention. As shown in FIG. 5, the method includes: a receiving unit 31 and a control unit 32, where:
  • the receiving unit 31 is configured to receive an operation instruction about the first page, where the operation instruction may include an instruction to replace the page.
  • the receiving unit 31 may be an operation instruction for receiving a user about the first page, for example, an operation instruction input by the user by clicking a touch screen of the communication device, an operation instruction input by the user through the external device, such as an external device such as a mouse, a keyboard, or a touch device.
  • the operation instruction about the first page may be an operation instruction input on the first page, or input on an interface input on the browser such as a window bar or a toolbar of the browser displaying the first page. Operation instructions.
  • the instruction for replacing the page may specifically be used to replace another page with the first page, where the other page may be a blank page, a historical browsing page, a refreshed page, or a newly opened page. Wait.
  • the control unit 32 is configured to control the first resource included in the first page to be in a connected state, where the first resource is a resource that is reserved in advance.
  • the first resource included in the first page is controlled to be in a connected state, that is, the first resource is kept in the connected state.
  • the receiving unit 31 may be responsive to the operation command, or may not respond to the receiving unit 31 receiving the operation command.
  • the embodiment may respond to the receiving unit 31 receiving the operation instruction, when the transaction page and the registration page do not make an operation instruction to the receiving unit 31.
  • the embodiments described in the following embodiments please refer to the embodiments described in the following embodiments.
  • the device provided in this embodiment may be a communication device such as a mobile phone, a computer, or a tablet computer. That is, these communication devices can implement the above scheme.
  • FIG. 6 is a schematic structural diagram of a communication device according to an embodiment of the present invention. As shown in FIG. 6, the method includes: a receiving unit 41, a control unit 42, and an obtaining unit 43, where:
  • the receiving unit 41 is configured to receive an operation instruction about the first page, where the operation instruction may include an instruction to replace the page.
  • the receiving unit 41 may be specifically configured to receive an operation instruction about the first page input by the user, for example, an operation instruction input by the user by clicking a touch screen of the communication device, an operation instruction input by the user through the external device, such as a mouse, a keyboard, a touch device. Wait for external devices.
  • the operation instruction about the first page may be an operation instruction input on the first page, or input on an interface input on the browser such as a window bar or a toolbar of the browser displaying the first page. Operation instructions.
  • the instruction for replacing the page may specifically be used to replace another page with the first page, where the other page may be a blank page, a historical browsing page, a refreshed page, or a newly opened page. Wait.
  • the control unit 42 is configured to control, according to the operation instruction, that the first resource included in the first page is kept in a connected state, where the first resource is a resource that is reserved in advance.
  • the first resource included in the first page is controlled to be in a connected state, that is, the first resource is kept in the connected state.
  • the obtaining unit 43 is configured to acquire a second resource according to the operation instruction, and display the second resource, where the second resource is different from the first resource.
  • the second resource may be a resource for displaying on the first page, that is, the obtaining unit 43 displays the second resource in the first page, because the element of the first resource is in a connected state, that is, when the obtaining unit 43 displays
  • the first page displays both the first resource and the second resource.
  • the first resource is an audio or video communication resource, that is, the first page displays the audio or video communication
  • the acquired second resource is displayed, for example, the second resource is a text, an image, or a button on the first page.
  • the second resource may also be that the first page includes a page resource corresponding to the hyperlink, that is, the first page is kept in a connected state, and the first page includes a page resource corresponding to the hyperlink, and the page resource is displayed.
  • the communication device provided by this embodiment may be other communication devices such as a mobile phone, a computer, a tablet computer, and the like.
  • the operation instruction about the first page is received, where the operation instruction may include an instruction to replace the page, and the first resource included in the first page is controlled to remain in a connected state, according to the operation instruction.
  • Obtaining a second resource and displaying the second resource That is, when the second resource is displayed, the first resource is not disconnected, that is, when the second resource is displayed, the first resource is maintained in the real-time update state at the same time, so that the embodiment of the present invention can improve the robustness of the browsing page.
  • FIG. 7 is a schematic structural diagram of another communication device according to an embodiment of the present invention. As shown in FIG. 7, the method includes: a receiving unit 51, a control unit 52, and an obtaining unit 53, where:
  • the receiving unit 51 is configured to receive an operation instruction about the first page, where the operation instruction may include an instruction to replace the page.
  • an operation instruction input by a user by clicking a touch screen of a communication device an operation instruction input by a user through an external device, such as an external device such as a mouse, a keyboard, or a touch device.
  • the operation instruction about the first page may be an operation instruction input on the first page, or input on an interface input on the browser such as a window bar or a toolbar of the browser displaying the first page. Operation instructions.
  • the instruction for replacing the page may specifically be used to replace another page with the first page, where the other page may be a blank page, a historical browsing page, a refreshed page, or a newly opened page. Wait.
  • the above operation instructions may specifically include:
  • the operation instruction is retracted, the operation instruction is refreshed, the operation instruction for establishing a hyperlink, or the operation instruction is closed.
  • the back operation command may be an operation instruction such as the user clicking the back button of the browser, or the user clicking the back button of the keyboard (for example, a Backspace button); the refresh operation command may click the refresh button of the browser or the user clicks the keyboard.
  • the above refresh button (for example: F5 button).
  • the operation instruction for establishing the hyperlink may be an operation instruction for the user to click the hyperlink resource on the first page, for example: clicking the resource label of the resource such as the image hyperlink resource, the text hyperlink resource or the video hyperlink resource on the first page 3 ⁇ 4.
  • the above-mentioned shutdown operation instruction may specifically be a click-close operation command of 3 ⁇ 4.
  • the first page may include:
  • a page, transaction page, and registration page that contain resources for real-time transmission can include:
  • the trading page can include:
  • a page containing payment functions a page for selecting items, such as an online support page or an online shopping page.
  • the registration page can include:
  • a page for interactive user information For example: The page the user registered.
  • the control unit 52 is configured to control, according to the operation instruction, that the first resource included in the first page is kept in a connected state, where the first resource is a resource that is reserved in advance.
  • the obtaining unit 53 is configured to acquire a second resource according to the operation instruction, and display the second resource, where the second resource is different from the first resource.
  • the operation instruction is the back operation instruction
  • the control unit 52 is further configured to control all resources of the first page to be in a connected state; that is, the first resource is the first page. All the resources of the first page are controlled, and the first page is not closed, and the first page is not opened, and the first page is not changed.
  • the obtaining unit 53 is further configured to acquire, according to the operation instruction, a page resource of a running time latest page address in a window history (window.history) list of a browser running the first page, and display the page resource.
  • a window history window.history
  • the page address is www.baidu.com, that is, the page is opened and the page is displayed.
  • the operation instruction may further be an operation instruction for establishing a hyperlink
  • the control unit 52 may further be configured to control all resources of the first page to remain in a connected state;
  • the resource is the resource of the first page, and all the resources of the first page are controlled to be in the connected state.
  • the first page may be closed, and the first page may be the resource including the real-time transmission. Pages, trading pages and registration pages.
  • the obtaining unit 53 is further configured to obtain, according to the operation instruction, a page resource of the resource connection corresponding to the operation instruction, and add a parameter value for opening the page resource in the new label in the page of the page resource, and the new label is Open the page resource in .
  • the page resource of the resource connection corresponding to the operation instruction may be a page corresponding to the resource of the page, where the operation instruction for establishing the hyperlink may be: clicking the resource label of the first page, that is, the page may be specifically Clicking the resource label of the first page to obtain the obtained page resource, and the above-mentioned elements of all the resources of the first page are connected, so that the operation refers to adding the page corresponding to the page resource for use in the new label.
  • the parameter value of the page resource is opened, so that the page corresponding to the page resource can be opened in the new tab, that is, the browser opens the first page and the page corresponding to the page resource at this time.
  • the parameter value used to open the page resource in the new tag may be specifically “_blank,” the parameter value.
  • the operation instruction is the refresh operation instruction
  • the first page is a page that includes a resource that is transmitted in real time, that is, the first resource is a resource that is transmitted in real time, for example, a WebRTC page.
  • the page containing the video, the page containing the audio, the page containing the game, and the like, the control unit 52 can also be used to control the real-time transmission of the first page to remain in a connected state; for example: controlling audio or video communication resources, video Resources, audio resources, and game resources remain connected, ie the first page can also be used for audio or video communication, playing video, video audio, or running games.
  • the obtaining unit 53 is further configured to update, according to the operation instruction, a resource in the first page other than the real-time transmitted resource, and display the updated resource and the real-time transmission in the first page. resource of. Some or all resources other than resources transmitted in real time. Updating a resource in the first page other than the real-time transmitted resource may be: receiving a resource other than the real-time transmitted resource in the first page sent by a server where the first page is located, and The resources sent by the server are updated to the first page.
  • the foregoing all resources except the real-time transmitted resource may include:
  • the UI interface of the page such as: text, images, frames, buttons, etc.
  • the operation instruction is the refresh operation instruction
  • the first page is a WebRTC page
  • the media stream (media stream) object of the WebRTC page is a real-time transmission resource
  • the control unit 52 can also be used to control the media stream session connection pair of the first page And the media stream object remains in a connected state, and saves a handle of the buffer corresponding to the media stream.
  • the media stream session connection object may specifically be a communication account of the other party in the real-time communication
  • the media stream object may specifically be a communication platform (for example, a server) for transmitting the media stream.
  • Controlling the media stream session connection object of the first page and the media stream object to remain in a connected state may be a connection relationship with the media stream session connection object, and maintaining the media stream object transmission with the media stream session connection object , that is, audio or video communication has been ongoing.
  • the media stream session may be connected to an associated SDP parameter, an IP port number, a corresponding encoding resource, and a corresponding decoding resource of the target media stream object and a handle of the corresponding buffer area of the media stream.
  • the media stream session connection object may specifically include the session information for controlling the establishment and transmission of the media stream, and the media stream object may specifically include: the actually transmitted audio and video media stream content.
  • the obtaining unit 53 may be further configured to update resources in the first page other than the media stream session connection object and the media stream, and display the acquired resource in the first page, where A handle is assigned to the video element or audio element of the first page.
  • the resource in the first page except the media stream session connection object and the media stream may specifically be part or all resources in the first page except the media stream session connection object and the media stream.
  • the resources in the first page except the media stream session connection object and the media stream may specifically include:
  • HTML resource files CSS resource files, JavaScript resource files, and press 3 ⁇ 4, where 3 ⁇ 4 can include the disconnect button, the call button, the hangup button, and so on.
  • Assigning the handle to the video element or audio element of the first page may be a webkitURL.createObjectURL(stream) method assigning a handle of the buffer to the video element or audio element of the first page, the first page
  • the video element or audio element also displays the media stream object described above.
  • the control unit 52 may further be configured to control all resources of the first page.
  • the connection state is maintained; and the acquisition unit 53 may not be included in the embodiment, that is, when the operation instruction is received, and the first page is a transaction page and a registration page, no response is made to the first.
  • the operation instruction is an operation instruction for closing a page, and the control unit 52 is further configured to control all resources of the first page to remain in a connected state;
  • the obtaining unit 53 can also be used to obtain a prompt message for prompting whether to close the first page.
  • the prompt message may be obtained by using the following program code:
  • the above prompt message may include the words "Your operation may cause the current call to be interrupted, whether to close," and the prompt message may further include a button for closing the first page, and the prompt message A button for canceling the above operation command may also be included.
  • the button for closing the first page the first page is closed, and when the user clicks the button for canceling the above operation command, the button continues to be opened. First page.
  • Window can be a browser window object;
  • onbeforeunload can be an event handler in the window object, used to trigger when the page is closed or refreshed, "function() ⁇ return 'XXX'; ⁇ " can be A function that returns a string hint message.
  • the function of the entire program code is to pop up a text prompt box when the user closes or refreshes the page.
  • the communications device may further include: a determining unit 54, configured to determine whether the first page is a page that needs to provide robustness; and the receiving unit 51 is further configured to: When the determining unit 54 determines that the first page is a page that needs to provide robustness, it receives an operation instruction regarding the first page.
  • the page that needs to provide robustness may include:
  • a page, transaction page, and registration page that contain resources for real-time transmission.
  • the determining whether the first page is a page that needs to provide robustness may include: determining whether the code of the new RTC Peer Connection (configuration) is included in the JavaScript resource file of the first page and in the HTML resource file. If yes, it is determined that the first page is a WebRTC page, and the WebRTC page is a page that includes a resource transmitted in real time, that is, the first page is determined to be a page that needs to provide robustness.
  • the determining unit 54 is further configured to determine whether the first page is a page that needs to provide robustness, and if yes, determine whether the first page starts to perform audio or video communication;
  • the receiving unit 51 is further configured to receive an operation instruction regarding the first page when the determining unit 54 determines that the first page starts audio or video communication.
  • the determining that the first page starts audio or video communication may include:
  • the non-media data channel has been established; that is, the first page is determined to begin audio or video communication.
  • the above "addstream” event, the above “addstream(), method, and the above “datachannel” event are all known events or methods of the Internet standard (for example, the W3C standard).
  • determining whether the first page is a page that needs to provide robustness may include:
  • determining whether the first page is a page that needs to provide robustness may include:
  • the determining whether the first page is a page that needs to provide robustness may include: determining whether the first page of the JavaScript resource file and the HTML resource file are included in the package Include the online registration html tag and code, and if so, determine that the first page is an online registration page, that is, the first page is determined to be a registration page;
  • the determining whether the first page is a page that needs to provide robustness may include: determining whether the first page of the JavaScript resource file and the HTML resource file include the online game registration identifier or the page application (Web Application) The registration identifier, if yes, determines that the first page is an online game page or an online application page, that is, the first page is determined to be a page containing resources transmitted in real time.
  • FIG. 9 is a schematic structural diagram of another communication device according to an embodiment of the present invention. As shown in FIG. 9, a network interface 61, a memory 62, and a communication bus 63, and the network interface 61 and the communication bus 63 are provided.
  • the memory 62 is coupled to a processor 64, which is used to store a set of program codes.
  • the network interface 61 can optionally include a Wi-Fi interface as well as other wireless interfaces.
  • Memory 62 may include high speed RAM memory and may also include non-volatile memory, such as at least one disk memory.
  • the memory 62 can optionally include at least one memory device located remotely from the aforementioned processor 64.
  • memory 62 stores the following elements, executable modules or data structures, or a subset of them, or their extension set:
  • the operating system 621 includes various system programs for implementing various basic services and processing hardware-based tasks;
  • the application module 622 includes various applications such as a device control service program and a device identification service program, and is used to implement various application services.
  • the processor 64 is configured to invoke a program stored in the memory 62, and perform the following operations: receiving an operation instruction about the first page; where the operation instruction may include performing a page Replacement instruction;
  • the first resource included in the first page is controlled to be in a connected state, where the first resource is a resource that needs to be reserved in advance.
  • the foregoing may be an operation instruction for receiving a first page by the user, for example, an operation instruction input by the user by clicking a touch screen of the communication device, an operation instruction input by the user through an external device, such as a mouse, a keyboard, a touch device, or the like.
  • External devices such as a mouse, a keyboard, a touch device, or the like.
  • the operation instruction about the first page may be an operation instruction input on the first page, or input on an interface input on the browser such as a window bar or a toolbar of the browser displaying the first page. Operation instructions.
  • the instruction for replacing the page may specifically be used to replace another page with the first page, where the other page may be a blank page, a historical browsing page, a refreshed page, or a newly opened page. Wait.
  • the first resource included in the first page is controlled to be in a connected state, that is, the first resource is kept in the connected state.
  • the embodiment may respond to receiving the operation instruction, and when the transaction page and the registration page do not respond to the received operation instruction, please refer to the following. Embodiments described in the examples.
  • an operation instruction about the first page is received, where the operation instruction may include an instruction to replace the page to control the first resource included in the first page to remain in a connected state.
  • the first resource is not disconnected, that is, the first resource is maintained in the real-time update state, so that the embodiment of the present invention can improve the robustness of the browsing page.
  • processor 64 can also perform the following operations:
  • the operation instruction may include an instruction to replace the page
  • the first resource controlling, by the first resource, the first resource that is included in the first page to be in a connected state, where the first resource is a resource that needs to be reserved in advance;
  • the acquiring the second resource may be specifically sending the second resource to the server through the network interface 61.
  • the source request message receives the second resource sent by the server through the network interface 61.
  • the operation instruction about the first page may be an operation instruction input on the first page, or input on an interface for inputting on a browser such as a window bar or a toolbar of the browser displaying the first page. Operation instructions.
  • the instruction for replacing the page may specifically be used to replace another page with the first page, where the other page may be a blank page, a historical browsing page, a refreshed page, or a newly opened page. Wait.
  • the foregoing second resource may be a resource for displaying on the first page, that is, the processor 64 displays the second resource in the first page, because the element of the first resource is in a connected state, that is, when the processor 64 displays
  • the first page displays both the first resource and the second resource.
  • the first resource is an audio or video communication resource
  • the first page displays the audio or video communication
  • displays the acquired second resource for example, the second resource is the text, image, or button on the first page. 3 ⁇ 4 and other resources.
  • the second resource may also be that the first page includes a page resource corresponding to the hyperlink, that is, the first page is kept in a connected state, and the first page includes a page resource corresponding to the hyperlink, and the page resource is displayed.
  • the operation instruction about the first page is received, where the operation instruction may include an instruction to replace the page, and the first resource included in the first page is maintained in a connected state, and the first instruction is obtained according to the operation instruction.
  • Two resources, and the second resource is displayed. In this way, when the second resource is displayed, the first resource is not disconnected, that is, when the second resource is displayed, the first resource is maintained in the real-time update state at the same time, so that the embodiment of the present invention can improve the robustness of the browsing page.
  • processor 64 can also be configured to perform the following operations:
  • the first resource controlling, by the first resource, the first resource that is included in the first page to be in a connected state, where the first resource is a resource that needs to be reserved in advance;
  • the operation instruction about the first page may be an operation instruction input on the first page, or input on the browser such as a window bar or a toolbar of a browser displaying the first page.
  • the instruction for replacing the page may specifically be used to replace another page with the first page, wherein the other page may be a blank page, a historical browsing page, a refreshed page, or a newly opened page.
  • the operation instruction may specifically include: a backward operation instruction, a refresh operation instruction, an operation instruction for establishing a hyperlink, or a shutdown operation instruction.
  • the back operation command may be an operation instruction such as the user clicking the back button of the browser, or the user clicking the back button of the keyboard (for example, a Backspace button); the refresh operation command may click the refresh button of the browser or the user clicks the keyboard.
  • the above refresh button (for example: F5 button).
  • the operation instruction for establishing the hyperlink may be an operation instruction for the user to click the hyperlink resource on the first page, for example: clicking the resource label of the resource such as the image hyperlink resource, the text hyperlink resource or the video hyperlink resource on the first page 3 ⁇ 4.
  • the above-mentioned shutdown operation instruction may specifically be an operation instruction of clicking and closing the 3 ⁇ 4.
  • the first page may include:
  • a page, transaction page, and registration page that contain resources for real-time transmission.
  • the trading page can include:
  • a page containing payment functions a page for selecting items, such as an online support page or an online shopping page.
  • the registration page can include:
  • a page for interactive user information For example: The page the user registered.
  • the operation instruction is the back operation instruction
  • the operation performed by the processor 64 to control the first resource included in the first page to remain in a connected state may include:
  • Controlling that all resources of the first page remain in a connected state; that is, the first resource is all resources of the first page, and controlling all resources of the first page to remain in a connected state may be, without closing the first page, that is, The first page is continued to be opened, and no change operation is performed on the first page.
  • the first page may be the above-mentioned page including the resource transmitted in real time, the transaction page, and the registration page.
  • the operation performed by the processor 64 to acquire the second resource according to the operation instruction and display the second resource may include: Obtaining, according to the operation instruction, a page resource of a running time latest page address in a window.history list of a browser running the first page, and displaying the page resource.
  • the page address is www.baidu.com, that is, the page is opened and the page is displayed.
  • the operation instruction may further be an operation instruction for establishing a hyperlink, and the operation performed by the processor 64 to control the first resource included in the first page to remain in a connection state may include :
  • Controlling that all resources of the first page remain in a connected state; that is, the first resource is all resources of the first page, and controlling all resources of the first page to remain in a connected state may be, without closing the first page, continuing
  • the first page is opened, wherein the first page may be the above-mentioned page including the resource transmitted in real time, the transaction page, and the registration page.
  • the operation performed by the processor 64 to acquire the second resource according to the operation instruction and display the second resource may include:
  • the page resource of the resource connection corresponding to the operation instruction may be a page corresponding to the resource of the page, where the operation instruction for establishing the hyperlink may be: clicking the resource label of the first page, that is, the page may be specifically Clicking the resource label of the first page to obtain the obtained page resource, and the above-mentioned elements of all the resources of the first page are connected, so that the operation refers to adding the page corresponding to the page resource for use in the new label.
  • the parameter value of the page resource is opened, so that the page corresponding to the page resource can be opened in the new tab, that is, the browser opens the first page and the page corresponding to the page resource at this time.
  • the parameter value used to open the page resource in the new tag may specifically be "_blank," the parameter value.
  • the operation instruction is the refresh operation instruction
  • the first page is a page that includes a resource that is transmitted in real time, that is, the first resource is a resource that is transmitted in real time, for example, a WebRTC page.
  • a page containing a video, a page containing audio, a page containing a game, and the like, and an operation performed by the processor 64 to control that the first resource included in the first page remains in a connected state Can include:
  • the resource for controlling real-time transmission of the first page remains in a connected state; for example: controlling audio or video communication resources, video resources, audio resources, and game resources to remain in a connected state, that is, the first page can also perform audio or video communication, Play video, video audio or run a game.
  • the operation performed by the processor 64 to acquire the second resource according to the operation instruction and display the second resource may include:
  • Updating the resource in the first page except the first resource may be: receiving a resource other than the real-time transmitted resource in the first page sent by the server where the first page is located, and receiving the server The sent resource is updated to the first page.
  • the UI interface of the page such as: text, images, frames, buttons, etc.
  • the operation instruction is the refresh operation instruction
  • the first page is a WebRTC page
  • the media stream (media stream) object of the WebRTC page is a real-time transmission resource
  • the processor The operation of controlling the first resource included in the first page to be in the connected state may include:
  • the media stream session connection object may specifically be a communication account of the other party in the real-time communication, and the media stream object may specifically be a communication platform (for example, a server) for transmitting the media stream.
  • Controlling the media stream session connection object of the first page and the media stream object to remain in a connected state may be a connection relationship with the media stream session connection object, and maintaining the media stream object transmission with the media stream session connection object , that is, audio or video communication has been ongoing.
  • the media stream session may be connected to a related Session Description Protocol (SDP) parameter of the object media stream object, an IP port number, a corresponding encoding resource, and a corresponding decoding resource and a handle of the corresponding buffer of the media stream.
  • SDP Session Description Protocol
  • the media stream session connection object may specifically include session information for controlling media channel establishment and transmission, where the media stream object may specifically include: Video media streaming content.
  • the operation performed by the processor 64 to acquire the second resource according to the operation instruction and display the second resource may include:
  • the resource in the first page except the media stream session connection object and the media stream may specifically be part or all resources in the first page except the media stream session connection object and the media stream.
  • the resources in the first page except the media stream session connection object and the media stream may specifically include:
  • HTML resource files CSS resource files, JavaScript resource files, and press 3 ⁇ 4, where 3 ⁇ 4 can include the disconnect button, the call button, the hangup button, and so on.
  • Assigning the handle to the video element or audio element of the first page may be a webkitURL.createObjectURL(stream) method assigning a handle of the buffer to the video element or audio element of the first page, the first page
  • the video element or audio element also displays the media stream object described above.
  • the processor 64 controls the first resource included in the first page.
  • the operation of maintaining the connection state may include:
  • the processor 64 may not acquire the second resource according to the operation instruction, and display the operation of the second resource, that is, receive the operation instruction.
  • the first page is the transaction page and the registration page, no response is made to the first page.
  • the operation instruction is an operation instruction for closing a page
  • the operation performed by the processor 64 to control the first resource included in the first page to remain in a connected state may include:
  • the processor 64 executes the second resource according to the operation instruction, and displays the operation of the second resource. Do, can include:
  • a prompt message for prompting whether to close the first page is acquired according to the operation instruction.
  • the prompt message may be obtained by using the following program code:
  • the above prompt message may include the words "Your operation may cause the current call to be interrupted, whether to close," and the prompt message may further include a button for closing the first page, and the prompt message A button for canceling the above operation command may also be included.
  • the button for closing the first page the first page is closed, and when the user clicks the button for canceling the above operation command, the button continues to be opened. First page.
  • Window can be a browser window object;
  • onbeforeunload can be an event handler in the window object, used to trigger when the page is closed or refreshed, "function() ⁇ return 'XXX'; ⁇ " can be A function that returns a string hint message.
  • the function of the entire program code is to pop up a text prompt box when the user closes or refreshes the page.
  • the processor 64 can also be used to perform the following operations before receiving the operation instruction.
  • the page that needs to provide robustness may include:
  • Determining whether the first page starts audio or video communication and if so, entering a page robustness mode, and if not, continuing to perform a step of determining whether the first page begins audio or video communication.
  • the determining that the first page starts audio or video communication may include:
  • the non-media data channel has been established; that is, the first page is determined to begin audio or video communication.
  • the above "addstream” event, the above “addstream(), method, and the above “datachannel” event are all known events or methods of the Internet standard (for example, the W3C standard).
  • determining whether the first page is a page that needs to provide robustness may include:
  • determining whether the first page is a page that needs to provide robustness may include:
  • the determining whether the first page is a page that needs to provide robustness may include: determining whether the html tag and the code of the online registration are included in the JavaScript resource file of the first page and the HTML resource file, and if yes, determining The first page is an online registration page, that is, the first page is determined to be a registration page;
  • the determining whether the first page is a page that needs to provide robustness may include: determining whether the first page of the JavaScript resource file and the HTML resource file include the online game registration identifier or the page application (Web Application) The registration identifier, if yes, determines that the first page is an online game page or an online application page, that is, the first page is determined to be a page containing resources transmitted in real time.
  • the processor 64 can execute an operation instruction for receiving the first page.
  • the various embodiments described on the basis of the above embodiments focus on how to control when the received operation instruction is a backward operation instruction, a refresh operation instruction, an operation instruction for establishing a hyperlink, and a shutdown operation instruction.
  • the first resource included in the first page remains in a connected state, and acquires a second resource according to the operation instruction, and displays the second resource.
  • the communication device may be a communication device such as a mobile phone, a computer, or a tablet computer. That is, these communication devices can implement the above scheme.
  • the operation instruction about the first page is received, where the operation instruction includes a backward operation instruction or a refresh operation instruction, and the first resource included in the first page is controlled to remain in a connection state.
  • the first resource is not disconnected, that is, the first resource is maintained in the real-time update state, so that the embodiment of the present invention can improve the robustness of the browsing page.
  • the storage medium may be a magnetic disk, an optical disk, a read-only memory (ROM), or a random access memory (Random Access Memory).

Landscapes

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

Abstract

本发明实施例提供一种网页页面处理方法,包括:接收关于第一页面的操作指令;其中,所述操作指令可以包括对页面进行替换的指令;控制所述第一页面包含的第一资源保持为连接状态,其中,所述第一资源为预先指定需要保留的资源。相应地,本发明实施例还提供一种通信设备。本发明实施例可以提高浏览页面的健壮性。

Description

一种网页页面处理方法及设备
技术领域
本发明涉及互联网领域, 尤其涉及一种网页页面处理方法及设备。 背景技术
目前互联网已经成为人们生活必不可缺的一部分,人们可以通过互联网与 朋友进行沟通, 或者通过互联网获取信息, 还可以通过互联网观看视频等, 且 人们一般都通过浏览器来实现上述技术的。 而浏览器是可以支持很多操作, 例 如: 前进、 后退、 刷新、 关闭等操作, 且这些操作可以人们通过点击浏览器显 示的虚拟按键或者键盘上的按键来实现。这样人们在使用浏览器过程中,难免 会出现一些误操作, 例如: 在用户注册页面中填写资料过程中不小心点击到键 盘上的刷新按键; 或者在一些必要的操作使浏览器当前显示的页面得重新加 载, 例如: 在一个视频显示页面中, 人们需要刷新该页面中除视频之外的资源 时, 这样人们就需要进行刷新操作, 而目前的刷新操作是将整个页面都进行刷 新, 这样就得重新加载视频。 综上所述, 目前浏览页面的健壮性很差。 发明内容
本发明实施例提供了一种网页页面处理方法及设备,可以提高浏览页面的 健壮性。
第一方面, 本发明实施例提供一种网页页面处理方法, 包括:
接收关于第一页面的操作指令, 其中, 所述操作指令可以包括对页面进行 替换的指令;
控制所述第一页面包含的第一资源保持为连接状态, 其中, 所述第一资源 为预先指定需要保留的资源。
在第一方面的第一种可能的实现方式中,所述控制所述第一页面包含的第 一资源保持为连接状态之后, 所述方法还包括:
根据所述操作指令获取第二资源, 并显示所述第二资源, 所述第二资源不 同于所述第一资源。 结合第一方面的上述任一实现方式,在第一方面的第二种可能的实现方式 中, 所述第一页面包括:
包含实时传输的资源的页面、 交易页面和注册页面。
结合第一方面的上述任一实现方式,在第一方面的第三种可能的实现方式 中, 所述对页面进行替换的指令包括:
后退操作指令、刷新操作指令、建立超链接的操作指令或者关闭操作指令。 结合第一方面的第三种可能的实现方式,在第一方面的第四种可能的实现 方式中, 所述操作指令为所述后退操作指令, 所述控制所述第一页面包含的第 一资源保持为连接状态, 包括:
控制所述第一页面的所有资源保持为连接状态;
所述根据所述操作指令获取第二资源, 并显示所述第二资源, 包括: 根据所述操作指令获取运行所述第一页面的浏览器的窗口历史列表中的 运行时间最晚的页面地址的页面资源, 并显示该页面资源。
结合第一方面的第三种可能的实现方式,在第一方面的第五种可能的实现 方式中, 所述操作指令为所述刷新操作指令,且所述第一页面为包含实时传输 的资源的页面,所述控制所述第一页面包含的第一资源保持为连接状态,包括: 控制所述第一页面的实时传输的资源保持为连接状态;
所述根据所述操作指令获取第二资源, 并显示所述第二资源, 包括: 根据所述操作指令更新所述第一页面中除所述实时传输的资源之外的资 结合第一方面的第三种可能的实现方式,在第一方面的第六种可能的实现 方式中, 所述操作指令为所述刷新操作指令,且所述第一页面为页面实时通信 页面, 所述页面实时通信页面的媒体流对象为实时传输的资源, 所述控制所述 第一页面包含的第一资源保持为连接状态, 包括:
控制所述第一页面的媒体流会话连接对象和所述媒体流对象保持为连接 状态, 并保存所述媒体流对应緩存区的句柄;
所述根据所述操作指令获取第二资源, 并显示所述第二资源, 包括: 根据所述操作指令更新所述第一页面中除所述媒体流会话连接对象和所 述媒体流之外的资源, 并在所述第一页面中显示所述获取的资源,将所述句柄 赋给所述第一页面的视频元素或者音频元素。
结合第一方面的第三种可能的实现方式,在第一方面的第七种可能的实现 方式中, 所述操作指令为所述建立超链接的操作指令; 所述控制所述第一页面 包含的第一资源保持为连接状态, 包括:
控制所述第一页面的所有资源保持为连接状态;
所述根据所述操作指令获取第二资源, 并显示所述第二资源, 包括: 根据所述操作指令获取该操作指令对应的资源连接的页面资源,并该页面 资源的页面中增加用于在新标签中打开页面资源的参数值 ,并在新的标签中打 开该页面资源。
第二方面,本发明实施例提供一种通信设备, 包括:接收单元和控制单元, 其中:
所述接收单元, 用于接收关于第一页面的操作指令, 其中, 所述操作指令 可以包括对页面进行替换的指令;
所述控制单元,用于根据所述操作指令控制所述第一页面包含的第一资源 保持为连接状态, 其中, 所述第一资源为预先指定需要保留的资源。
在第二方面的第一种可能的实现方式中, 所述设备还包括:
获取单元, 用于根据所述操作指令获取第二资源, 并显示所述第二资源, 所述第二资源不同于所述第一资源。
结合第二方面的上述任一实现方式,在第二方面的第二种可能的实现方式 中, 所述第一页面包括:
包含实时传输的资源的页面、 交易页面和注册页面。
结合第二方面的上述任一实现方式,在第二方面的第三种可能的实现方式 中, 所述对页面进行替换的指令包括:
后退操作指令、刷新操作指令、建立超链接的操作指令或者关闭操作指令。 结合第二方面的第三种可能的实现方式,在第二方面的第四种可能的实现 方式中, 所述操作指令为所述后退操作指令, 所述控制单元还用于控制所述第 一页面的所有资源保持为连接状态;
所述获取单元还用于根据所述操作指令获取运行所述第一页面的浏览器 的窗口历史列表中的运行时间最晚的页面地址的页面资源, 并显示该页面资 源。
结合第二方面的第三种可能的实现方式,在第二方面的第五种可能的实现 方式中, 所述操作指令为所述刷新操作指令,且所述第一页面为包含实时传输 的资源的页面,所述控制单元还用于控制所述第一页面的实时传输的资源保持 为连接状态;
所述获取单元还用于根据所述操作指令更新所述第一页面中除所述实时 传输的资源之外的资源,并在所述第一页面中显示所述更新的资源以及所述实 时传输的资源。
结合第二方面的第三种可能的实现方式,在第二方面的第六种可能的实现 方式中, 所述操作指令为所述刷新操作指令,且所述第一页面为页面实时通信 页面, 所述页面实时通信页面的媒体流对象为实时传输的资源, 所述控制单元 还用于控制所述第一页面的媒体流会话连接对象和所述媒体流对象保持为连 接状态, 并保存所述媒体流对应緩存区的句柄;
所述获取单元还用于根据所述操作指令更新所述第一页面中除所述媒体 流会话连接对象和所述媒体流之外的资源,并在所述第一页面中显示所述获取 的资源, 将所述名柄赋给所述第一页面的视频元素或者音频元素。
结合第二方面的第三种可能的实现方式,在第二方面的第七种可能的实现 方式中, 所述操作指令为所述建立超链接的操作指令; 所述控制单元还用于控 制所述第一页面的所有资源保持为连接状态;
所述获取单元还用于根据所述操作指令获取该操作指令对应的资源连接 的页面资源,并该页面资源的页面中增加用于在新标签中打开页面资源的参数 值, 并在新的标签中打开该页面资源。
第三方面, 本发明实施例提供一种通信设备, 包括: 网络接口、 存储器和 通信总线, 以及通过所述通信总线与所述网络接口和所述存储器耦合的处理 器, 其中, 存储器用于存储一组程序代码, 所述处理器用于调用所述存储器中 存储的程序, 执行以下操作:
接收关于第一页面的操作指令, 其中, 所述操作指令可以包括对页面进行 替换的指令; 控制所述第一页面包含的第一资源保持为连接状态, 其中, 所述第一资源 为预先指定需要保留的资源。
在第三方面的第一种可能的实现方式中,所述处理器在执行控制所述第一 页面包含的第一资源保持为连接状态的操作之后, 还用于执行如下操作:
根据所述操作指令获取第二资源, 并显示所述第二资源, 所述第二资源不 同于所述第一资源。
结合第三方面的上述任一实现方式,在第三方面的第二种可能的实现方式 中, 所述第一页面包括:
包含实时传输的资源的页面、 交易页面和注册页面。
结合第三方面的上述任一实现方式,在第三方面的第三种可能的实现方式 中, 所述对页面进行替换的指令包括:
后退操作指令、刷新操作指令、建立超链接的操作指令或者关闭操作指令。 结合第三方面的第三种可能的实现方式,在第三方面的第四种可能的实现 方式中, 所述操作指令为所述后退操作指令, 所述处理器执行的控制所述第一 页面包含的第一资源保持为连接状态的操作, 包括:
控制所述第一页面的所有资源保持为连接状态;
所述处理器执行的根据所述操作指令获取第二资源,并显示所述第二资源 的操作, 包括:
根据所述操作指令获取运行所述第一页面的浏览器的窗口历史列表中的 运行时间最晚的页面地址的页面资源, 并显示该页面资源。
结合第三方面的第三种可能的实现方式,在第三方面的第五种可能的实现 方式中, 所述操作指令为所述刷新操作指令,且所述第一页面为包含实时传输 的资源的页面,所述处理器执行的控制所述第一页面包含的第一资源保持为连 接状态的操作, 包括:
控制所述第一页面的实时传输的资源保持为连接状态;
所述处理器执行的根据所述操作指令获取第二资源, 并显示所述第二资 源, 包括:
根据所述操作指令更新所述第一页面中除所述实时传输的资源之外的资 结合第三方面的第三种可能的实现方式,在第三方面的第六种可能的实现 方式中, 所述操作指令为所述刷新操作指令,且所述第一页面为页面实时通信 页面, 所述页面实时通信页面的媒体流对象为实时传输的资源, 所述处理器执 行的控制所述第一页面包含的第一资源保持为连接状态的操作, 包括:
控制所述第一页面的对等连接媒体流会话连接对象和所述媒体流对象保 持为连接状态, 并保存所述媒体流对应緩存区的句柄;
所述处理器执行的根据所述操作指令获取第二资源,并显示所述第二资源 的操作, 包括:
根据所述操作指令更新所述第一页面中除所述媒体流会话连接对象和所 述媒体流之外的资源, 并在所述第一页面中显示所述获取的资源,将所述名柄 赋给所述第一页面的视频元素或者音频元素。
结合第三方面的第三种可能的实现方式,在第三方面的第七种可能的实现 方式中, 所述操作指令为所述建立超链接的操作指令; 所述处理器执行的控制 所述第一页面包含的第一资源保持为连接状态的操作, 包括:
控制所述第一页面的所有资源保持为连接状态;
所述处理器执行的根据所述操作指令获取第二资源,并显示所述第二资源 的操作, 包括:
根据所述操作指令获取该操作指令对应的资源连接的页面资源,并该页面 资源的页面中增加用于在新标签中打开页面资源的参数值 ,并在新的标签中打 开该页面资源。
上述技术方案中, 接收关于第一页面的操作指令, 其中, 所述操作指令可 以包括对页面进行替换的指令控制所述第一页面包含的第一资源保持为连接 状态。 这样不会将第一资源断开, 即第一资源维持在实时更新状态, 从而本发 明实施例可以提高浏览页面的健壮性。
附图说明
为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施 例中所需要使用的附图作筒单地介绍, 显而易见地, 下面描述中的附图仅仅是 本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的 前提下, 还可以根据这些附图获得其他的附图。 图 1是本发明实施例提供的一种网页页面处理方法的流程示意图; 图 2是本发明实施例提供的另一种网页页面处理方法的流程示意图 图 3是本发明实施例提供的另一种网页页面处理方法的流程示意图 图 4是本发明实施例提供的另一种网页页面处理方法的流程示意图 图 5是本发明实施例提供的一种通信设备的结构示意图;
图 6是本发明实施例提供的另一种通信设备的结构示意图;
图 Ί是本发明实施例提供的另一种通信设备的结构示意图;
图 8是本发明实施例提供的另一种通信设备的结构示意图;
图 9是本发明实施例提供的另一种通信设备的结构示意图。 具体实施方式
下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清 楚、 完整地描述, 显然, 所描述的实施例仅仅是本发明一部分实施例, 而不是 全部的实施例。基于本发明中的实施例, 本领域普通技术人员在没有作出创造 性劳动前提下所获得的所有其他实施例, 都属于本发明保护的范围。
在本发明实施例中, 资源具体可以是互联网标准 (例如: W3C 标准)定 义的用于组成网页的信息资源, 包括各种可以用 URI标记的网络数据对象或 月良务。 资源可以用多种方法表示 , ( "A network data object or service that can be identified by a URI, as defined in section 3.2. Resources may be available in m ltiple representations (e.g. multiple languages, data formats, size, and resolutions)
Figure imgf000008_0001
由至少一个音符构成的音频资源, 或者由于音符、 文字和 /或图像构成的视频 资源等。 资源还可以是页面源代码文件, 例如: 超文本标记语言 (Hypertext Markup Language, HTML ) 资源文件、 级联样式表 ( Cascading Style Sheet, CSS ) 资源文件和 JavaScript资源文件。 上述资源还可以包括至少一个元素, 其中,元素具体可以是构成资源的,且可以独立显现给用户的资源元素,例如: 文字、 图像或者音符等。元素是指一个文档类型的定义所定义的树形结构中的 一个组成部分, 它在文档实例中通过一些描述性符号来标识,通常是起始符和 结束符。 ( "A component of the hierarchical structure defined by a document type definition; it is identified in a document instance by descriptive markup, usually a start-tag and end-tag."参见 RFC 1866 , Section 2 )。 第一资源保持为连接状态可 以是通信设备与第一资源的链路保持为连接状态,例如:第一资源为视频资源, 即该通信设备一直接收视频资源, 并显示该视频资源, 例如: 第一资源为音频 或者视频通信资源时,即该通信设备一直接收服务器发送的音频或者视频通信 资源, 同时一直将通信设备采集的视频资源发送至服务器, 即一直保持音频或 者视频通信; 例如: 第一资源为第一页面的所有资源, 即该通信设备一直连接 第一页面, 也可以理解为该通信设备一直打开第一页面。 其中, 该通信设备为 实现本发明实施例提供的方法的设备,该通信设备可以是任何可以打开页面的 设备, 例如: 手机、 计算机、 平板电脑等其它通信设备。 图 1是本发明实施例提供的一种网页页面处理方法的流程示意图, 如图 1 所示, 包括:
101、 接收关于第一页面的操作指令; 其中, 所述操作指令可以包括对页 面进行替换的指令。
可以是接收用户输入的关于第一页面的操作指令, 例如: 用户通过点击通 信设备的触摸屏所输入的操作指令、用户通过外接设备输入的操作指令,如鼠 标、 键盘、 触摸设备等外接设备。 其中, 上述关于第一页面的操作指令具体可 以是在第一页面上输入的操作指令,或者在显示第一页面的浏览器的窗口栏或 者工具栏等该浏览器上供输入的界面上输入的操作指令。
其中,上述对页面进行替换的指令具体可以是用于将另一个页面替换掉第 一页面, 其中, 该另一个页面可以是一个空白的页面、 历史浏览的页面、 刷新 的页面或者新打开的页面等。
102、 控制所述第一页面包含的第一资源保持为连接状态, 其中, 所述第 一资源为预先指定需要保留的资源。
当接收到上述操作命令时就可以控制第一页面包含的第一资源保持为连 接状态, 即控制第一资源一直保持为连接状态。
可选的,具体可以是第一资源为预先指定与所述操作指令对应的需要保留 的资源。 具体还可以控制所述第一页面包含的第一资源保持为连接状态。
在本实施例中可以对步骤 101 接收到操作指令做出响应, 也可以对步骤 101接收到操作指令不做出响应。 例如: 当第一页面为包含实时传输的资源的 页面时, 本实施例可以对步骤 101接收到操作指令做出响应, 当上述交易页面 和注册页面对步骤 101接收到操作指令不做出响应,具体请参考下面实施例描 述的实施方式。
本实施例可以应用于通信设备, 例如: 手机、 计算机、 平板电脑等通信设 备。 即这些通信设备可以实现上述方法。
上述技术方案中, 接收关于第一页面的操作指令, 其中, 所述操作指令可 以包括对页面进行替换的指令控制所述第一页面包含的第一资源保持为连接 状态。 这样不会将第一资源断开, 即第一资源维持在实时更新状态, 从而本发 明实施例可以提高浏览页面的健壮性。 图 2是本发明实施例提供的一种网页页面处理方法的流程示意图, 如图 1 所示, 包括:
201、 接收关于第一页面的操作指令; 其中, 所述操作指令可以包括对页 面进行替换的指令。
可以是接收用户输入的关于第一页面的操作指令, 例如: 用户通过点击通 信设备的触摸屏所输入的操作指令、用户通过外接设备输入的操作指令,如鼠 标、 键盘、 触摸设备等外接设备。 其中, 上述关于第一页面的操作指令具体可 以是在第一页面上输入的操作指令,或者在显示第一页面的浏览器的窗口栏或 者工具栏等该浏览器上供输入的界面上输入的操作指令。
其中,上述对页面进行替换的指令具体可以是用于将另一个页面替换掉第 一页面, 其中, 该另一个页面可以是一个空白的页面、 历史浏览的页面、 刷新 的页面或者新打开的页面等。
202、 控制所述第一页面包含的第一资源保持为连接状态, 其中, 所述第 一资源为预先指定需要保留的资源。
当接收到上述操作命令时就可以控制第一页面包含的第一资源保持为连 接状态, 即控制第一资源一直保持为连接状态。 203、 根据所述操作指令获取第二资源, 并显示所述第二资源, 所述第二 资源不同于所述第一资源。
上述第二资源可以是用于在第一页面上显示的资源,即步骤 103将第二资 源在第一页面中显示, 由于上述第一资源的元素为连接状态, 即步骤 103显示 时, 第一页面既显示第一资源又显示第二资源。 例如: 第一资源为音频或者视 频通信资源时, 即第一页面显示一直保持该音频或者视频通信, 同时显示获取 的第二资源, 例如, 第二资源为第一页面上的文字、 图像或者按 ¾等资源。 第 二资源还可以是第一页面包括超链接对应的的页面资源,即保持第一页面为连 接状态, 同时打开是第一页面包括超链接对应的的页面资源, 并显示该页面资 源。
本实施例可以应用于通信设备, 例如: 手机、 计算机、 平板电脑等通信设 备。 即这些通信设备可以实现上述方法。
上述技术方案中, 接收关于第一页面的操作指令, 其中, 所述操作指令可 以包括对页面进行替换的指令控制所述第一页面包含的第一资源保持为连接 状态, 根据所述操作指令获取第二资源, 并显示所述第二资源。 即在显示第二 资源时, 不会将第一资源断开, 即第二资源在显示时, 第一资源同时维持在实 时更新状态, 从而本发明实施例可以提高浏览页面的健壮性。 图 3是本发明实施例提供的另一种网页页面处理方法的流程示意图,如图 3所示, 包括:
301、 接收关于第一页面的操作指令, 其中, 所述操作指令包括对页面进 行替换的指令。
例如: 用户通过点击通信设备的触摸屏所输入的操作指令、用户通过外接 设备输入的操作指令, 如鼠标、 键盘、 触摸设备等外接设备。 其中, 上述关于 第一页面的操作指令具体可以是在第一页面上输入的操作指令,或者在显示第 一页面的浏览器的窗口栏或者工具栏等该浏览器上供输入的界面上输入的操 作指令。
其中,上述对页面进行替换的指令具体可以是用于将另一个页面替换掉第 一页面, 其中, 该另一个页面可以是一个空白的页面、 历史浏览的页面、 刷新 的页面或者新打开的页面等。 上述操作指令具体可以包括:
后退操作指令、刷新操作指令、建立超链接的操作指令或者关闭操作指令。 其中,后退操作指令可以是用户点击浏览器上述的后退按¾,或者用户点 击键盘上述后退按键(例如: Backspace按键)等操作指令; 刷新操作指令可 以用户点击浏览器上述的刷新按键或者用户点击键盘上述刷新按键 (例如: F5 按键)等。建立超链接的操作指令可以是用户点击第一页面上的超链接资源的 操作指令, 例如: 点击第一页面上的图像超链接资源、 文本超链接资源或者视 频超链接资源等资源的资源标签按 ¾。上述关闭操作指令具体可以是点击关闭 按¾的操作指令。
其中, 上述第一页面可以包括:
包含实时传输的资源的页面、 交易页面和注册页面。
包含实时传输的资源的页面可以包括:
页面实时通信( Web Real-Time Communication, WebRTC ) 页面、 包含视 频的页面、 包含音频的页面、 包含游戏的页面等。
交易页面可以包括:
包含付款功能的页面、 用于选择物品的页面, 例如: 在线支持页面或者网 上购物页面等。
注册页面可以包括:
用于交互用户信息的页面。 例如: 用户注册的页面。
302、 控制所述第一页面包含的第一资源保持为连接状态, 其中, 所述第 一资源为预先指定需要保留的资源。
303、 根据所述操作指令获取第二资源, 并显示所述第二资源, 所述第二 资源不同于所述第一资源。
作为一种可选的实施方式, 所述操作指令为所述后退操作指令, 所述控制 所述第一页面包含的第一资源保持为连接状态, 可以包括:
控制所述第一页面的所有资源保持为连接状态;即上述第一资源为第一页 面的所有资源,控制所述第一页面的所有资源保持为连接状态可以是, 不关闭 第一页面, 即继续打开第一页面, 对第一页面不进行任何变化操作, 其中, 第 一页面可以是上述包含实时传输的资源的页面、 交易页面和注册页面。 步骤 303可以包括:
根据所述操作指令获取运行所述第一页面的浏览器的窗口历史 ( window, history ) 列表中的运行时间最晚的页面地址的页面资源, 并显示该 页面资源。
获取该页面资源可以是打开该页面地址, 例如: 该页面地址为 www.baidu.com, 即打开该页面, 并显示该页面。
作为一种可选的实施方式,所述操作指令还可以为所述建立超链接的操作 指令, 所述控制所述第一页面包含的第一资源保持为连接状态, 可以包括: 控制所述第一页面的所有资源保持为连接状态;即上述第一资源为第一页 面的所有资源,控制所述第一页面的所有资源保持为连接状态可以是, 不关闭 第一页面, 继续打开第一页面, 其中, 第一页面可以是上述包含实时传输的资 源的页面、 交易页面和注册页面。
步骤 303可以包括:
根据所述操作指令获取该操作指令对应的资源连接的页面资源,并该页面 资源的页面中增加用于在新标签中打开页面资源的参数值 ,并在新的标签中打 开该页面资源。
获取该操作指令对应的资源连接的页面资源可以是打开该页面资源对应 的页面, 其中, 该建立超链接的操作指令具体可以是点击第一页面的资源标签 按¾,即该页面具体可以是通过点击第一页面的资源标签按 ¾所获取得到的页 面资源, 而上述保持了第一页面的所有资源的元素为连接状态, 这样该操作指 该页面资源对应的页面中增加用于在新标签中打开页面资源的参数值,这样该 页面资源对应的页面就可以在新的标签中打开,即浏览器此时会打开第一页面 和该页面资源对应的页面。其中, 上述用于在新标签中打开页面资源的参数值 具体可以为 "_blank,, 参数值。
作为一种可选的实施方式, 所述操作指令为所述刷新操作指令, 且所述第 一页面为包含实时传输的资源的页面, 即上述第一资源为实时传输的资源, 例 如: WebRTC页面、 包含视频的页面、 包含音频的页面、 包含游戏的页面等, 所述控制所述第一页面包含的第一资源保持为连接状态, 可以包括: 控制所述第一页面的实时传输的资源保持为连接状态; 例如: 控制音频或 者视频通信资源、 视频资源、 音频资源和游戏资源保持为连接状态, 即第一页 面还可以进行音频或者视频通信, 播放视频、 视频音频或者运行游戏。
步骤 303可以包括:
一页面中除第一资源之外的资源,并在所述
Figure imgf000014_0001
一页面中除所述 实时传输的资源之外的部分或者所有资源。更新所述第一页面中除所述第一资 源之外的资源可以是,接收第一页面所在的服务器发送的所述第一页面中除所 述实时传输的资源之外的资源, 并将服务器发送的资源更新至第一页面中。 页面的 UI界面, 例如: 文字、 图片、 框架、 按鈕等资源。
作为一种可选的实施方式, 所述操作指令为所述刷新操作指令, 且所述第 一页面为 WebRTC页面, 所述 WebRTC页面的媒体流(例如: Media Stream ) 对象为实时传输的资源,所述控制所述第一页面包含的第一资源保持为连接状 态, 可以包括:
控制所述第一页面的媒体流会话连接对象 (例如: 对等连接 Peer Connection )和所述媒体流对象保持为连接状态,并保存所述媒体流对应緩存 区的句柄。
其中, 上述媒体流会话连接对象具体可以是实时通信中对方的通信账号, 上述媒体流对象具体可以是用于传输媒体流的通信平台 (例如: 服务器)。 控 制所述第一页面的媒体流会话连接对象和所述媒体流对象保持为连接状态可 以是一直与媒体流会话连接对象保持连接关系,且与媒体流会话连接对象一直 保持所述媒体流对象传输, 即音频或者视频通信一直在进行。具体还可以将媒 体流会话连接对象媒体流对象的相关的会话描述协议 (Session Description Protocol, SDP )参数、 IP 端口号、 相应的编码资源和相应的解码资源和所述 媒体流对应緩存区的句柄。
其中,上述媒体流会话连接对象具体可以包括控制媒体流建立和传输的会 话信息, 上述媒体流对象具体可以包括: 实际传输的音视频媒体流内容。 媒体 流会话连接对象(RTC Peer connection object ), 其中, 媒体流会话连接对象在 WebRTC标准中有定义如下:一个媒体流会话连接对象具有一个相关联的交互 式连接建立十办议( Interactive Connectivity Establishment , ICE )代理、 媒体流 会话连接信令状态、 ICE收集状态和 ICE连接状态。 这些均在当媒体流会话连 接对象创建时被初始化 ( An RTCPeerConnection object has an associated ICE agent, RTCPeerConnection signaling state, ICE gathering state, and ICE connection state. These are initialized when the object is created )。 且一个媒体流会话连接对 象具有两个相关联的流集合。一个是本地流集合, 代表了当前媒体流会话连接 对象向外发送的媒体流, 另一个是远端流集合,代表了当前媒体流会话连接对 象正在接收的来自远端的媒体流。这些媒体流集合在当媒体流会话连接对象创 建时被初始化 ( An RTCPeerConnection object has two associated stream sets. A local streams set, representing streams that are currently sent, and a remote streams set, representing streams that are currently received with this RTCPeerConnection object. The stream sets are initialized to empty sets when the RTCPeerConnection object is created )。
其中, 媒体流对象( Media Stream Object ) , 在 WebRTC标准中定义如下: 每一个媒体流对象包含零个或多个轨道, 具体为音频轨道和视频轨道。媒 体流对象中的所有轨道均会在呈现时被同步。不同的媒体流之间不需要进行同 步 ( Each MediaStream object can contain zero or more tracks, in particular audio and video tracks. All tracks in a MediaStream are intended to be synchronized when rendered. Different MediaStreams do not need to be synchronized )。
步骤 303可以包括:
根据所述操作指令更新所述第一页面中除所述媒体流会话连接对象和所 述媒体流之外的资源, 并在所述第一页面中显示所述获取的资源,将所述名柄 赋给所述第一页面的视频元素或者音频元素。
其中,第一页面中除所述媒体流会话连接对象和所述媒体流之外的资源具 体可以是第一页面中除所述媒体流会话连接对象和所述媒体流之外部分或者 所有资源, 其中, 第一页面中除所述媒体流会话连接对象和所述媒体流之外的 资源具体可以包括: HTML资源文件、 CSS资源文件、 JavaScript资源文件和按 ¾, 其中, 按 ¾可以包括断开服务器 (disconnect )按鈕、 打电话 (call )按鈕、 挂断电话 ( hangup )按¾等。
将所述名柄赋给所述第一页面的视频元素或者音频元素可以是过 webkitURL.createObjectURL(stream)方法将緩存区的句柄赋给所述第一页面的 视频元素或者音频元素,第一页面的视频元素或者音频元素还是显示上述所述 媒体流对象。
作为一种可选的实施方式, 所述操作指令为所述刷新操作指令, 且所述第 一页面为交易页面和注册页面时,所述控制所述第一页面包含的第一资源保持 为连接状态, 包括:
控制所述第一页面的所有资源保持为连接状态;且本实施方式中可以不包 括步骤 303 , 即接收到上述操作指令, 且第一页面为交易页面和注册页面时, 不对步骤 301接收的操作指令做出任何响应。
作为一种可选的实施方式, 所述操作指令为用于关闭页面的操作指令, 所 述控制所述第一页面包含的第一资源保持为连接状态, 包括:
控制所述第一页面的所有资源保持为连接状态;
步骤 303可以包括:
根据操作指令获取用于提示用于是否关闭第一页面的提示消息。
具体可以是通过如下程序代码获取到该提示消息:
window, onbef oreunload = function() {
return '您的操作可能会导致当前通话中断, 是否要关闭? '; 即上述提示消息可以包括 "您的操作可能会导致当前通话中断, 是否要关 闭,, 的字样, 且该提示消息还可以包括用于关闭所述第一页面的按 ¾, 且该提 示消息还可以包括用于取消上述操作指令的按 ¾。当用户点击用于关闭所述第 一页面的按 ¾, 即关闭第一页面, 当用户点击用于取消上述操作指令的按 ¾, 即继续打开第一页面。
其中, 上述程序代码具体可以为 javascript代码。 "window"可以是是指浏 览器窗口对象; "onbeforeunload" 可以是 window对象中的一个事件处理器, 用于当页面关闭或者刷新时触发, "function(){ return 'XXX';} " 可以是一个函 数, 用于返回一个字符串提示信息。 整段程序代码的功能是, 当用户关闭或者 刷新页面时, 弹出一个文字提示框。
作为一种可选的实施方式, 如图 4所示, 在步骤 301之前, 所述方法还可 以包括:
304、 判断所述第一页面是否为需要提供健壮性的页面, 若是, 则执行步 骤 301 ; 若否, 则结束流程。
其中, 所述需要提供健壮性的页面可以包括:
包含实时传输的资源的页面、 交易页面和注册页面。
其中, 判断所述第一页面是否为需要提供健壮性的页面可以包括: 判断所述第一页面的 JavaScript资源文件中和 HTML资源文件中是否都包 含" new RTC Peer Connection (configuration)"这一段代码, 若是, 由确定所述第 一页面为 WebRTC页面, 而 WebRTC页面为包含实时传输的资源的页面, 即 确定所述第一页面为需要提供健壮性的页面。
其中, "new RTC Peer Connection (configuration)"具体可以是创建一个 RTC 对等连接实例,用于辅助后续的媒体通道建立。在实际应用中一般是 "pc = new RTC Peer Connection(configuration);" 以表示该页面为 WebRTC页面。
当在判断所述第一页面为 WebRTC页面后, 在进入页面健壮性模式之前, 所述方法还可以包括:
判断所述第一页面是否开始进行音频或者视频通信,若是, 则进入页面健 壮性模式, 若否, 继续执行判断所述第一页面是否开始进行音频或者视频通信 的步骤。 其中, 判断所述第一页面开始进行音频或者视频通信可以包括:
监视 "addstream"事件, 当捕获到该事件(或者抛出该事件) 时, 判断接 收到 WebRTC媒体流; 即判断所述第一页面开始进行音频或者视频通信; 或 者
监视 "addstreamO"方法, 当该方法被调用时, 判断开始发送 WebRTC媒 体流, 即判断所述第一页面开始进行音频或者视频通信; 或者
监视 "datachannel"事件, 当捕获到该事件 (或者抛出该事件) 时, 非媒 体数据通道已经建立; 即判断所述第一页面开始进行音频或者视频通信。 其中,上述 "addstream"事件、上述 "addstream(),,方法和上述 "datachannel" 事件都是互联网标准(例如: W3C标准)公知的事件或者方法。
本实施方式中, 判断所述第一页面是否为需要提供健壮性的页面可以包 括:
判断所述第一页面的 JavaScript资源文件中和 HTML资源文件中是否都包 含 ' 'HTML5 <video>/<audio^ 签", 若是, 则判断第一页面包含视频资源或者 包含音频资源, 即判断第一页面为包含实时传输的资源的页面。
本实施方式中, 判断所述第一页面是否为需要提供健壮性的页面可以包 括:
判断所述第一页面的 JavaScript资源文件中和 HTML资源文件中是否都包 含在线支付相关的 JS代码, 若是, 则判断第一页面为在线支付页面, 即判断 第一页面为交易页面。
其中, 判断所述第一页面是否为需要提供健壮性的页面可以包括: 判断所述第一页面的 JavaScript资源文件中和 HTML资源文件中是否都包 含在线注册的 html标签和代码, 若是, 则判断第一页面为在线注册页面, 即 判断第一页面为注册页面;
其中, 判断所述第一页面是否为需要提供健壮性的页面可以包括: 判断所述第一页面的 JavaScript资源文件中和 HTML资源文件中是否都包 含在线游戏的注册标识或者其他页面应用 ( Web Application )的注册标识, 若 是, 则判断第一页面为在线游戏页面或者在线应用页面, 即判断第一页面为包 含实时传输的资源的页面。
该实施方式中, 进入页面健壮性模式后, 就可以执行步骤 201。
上述技术方案中, 在上面实施例的基础上描述的多种实施方式, 重点介绍 了接收到的操作指令分别为后退操作指令、刷新操作指令、建立超链接的操作 指令和关闭操作指令时,怎么控制所述第一页面包含的第一资源保持为连接状 态, 以及根据所述操作指令获取第二资源, 并显示所述第二资源。 这些实施方 式都可以提高浏览页面的健壮性。 下面为本发明装置实施例,本发明装置实施例用于执行本发明方法实施例 一、 实施例二和实施例三实现的方法, 为了便于说明, 仅示出了与本发明实施 例相关的部分, 具体技术细节未揭示的, 请参照本发明实施例一、 实施例二和 实施例三。 图 5是本发明实施例提供的一种通信设备的结构示意图, 如图 5所示, 包 括: 接收单元 31和控制单元 32, 其中:
接收单元 31 , 用于接收关于第一页面的操作指令; 其中, 所述操作指令 可以包括对页面进行替换的指令。
接收单元 31可以是接收用户关于第一页面的操作指令, 例如: 用户通过 点击通信设备的触摸屏所输入的操作指令、 用户通过外接设备输入的操作指 令, 如鼠标、 键盘、 触摸设备等外接设备。 其中, 上述关于第一页面的操作指 令具体可以是在第一页面上输入的操作指令,或者在显示第一页面的浏览器的 窗口栏或者工具栏等该浏览器上供输入的界面上输入的操作指令。
其中,上述对页面进行替换的指令具体可以是用于将另一个页面替换掉第 一页面, 其中, 该另一个页面可以是一个空白的页面、 历史浏览的页面、 刷新 的页面或者新打开的页面等。
控制单元 32, 用于控制所述第一页面包含的第一资源保持为连接状态, 其中, 所述第一资源为预先指定需要保留的资源。
当接收到上述操作命令时就可以控制第一页面包含的第一资源保持为连 接状态, 即控制第一资源一直保持为连接状态。
在本实施例中可以对接收单元 31接收到操作指令做出响应, 也可以对接 收单元 31接收到操作指令不做出响应。 例如: 当第一页面为包含实时传输的 资源的页面时, 本实施例可以对接收单元 31接收到操作指令做出响应, 当上 述交易页面和注册页面对接收单元 31接收到操作指令不做出响应, 具体请参 考下面实施例描述的实施方式。
本实施例提供的设备可以是手机、 计算机、 平板电脑等通信设备。 即这些 通信设备可以实现上述方案。
上述技术方案中, 接收关于第一页面的操作指令, 其中, 所述操作指令可 以包括对页面进行替换的指令,控制所述第一页面包含的第一资源保持为连接 状态。 这样不会将第一资源断开, 即第一资源维持在实时更新状态, 从而本发 明实施例可以提高浏览页面的健壮性。 图 6是本发明实施例提供的一种通信设备的结构示意图, 如图 6所示, 包 括: 接收单元 41、 控制单元 42和获取单元 43 , 其中:
接收单元 41 , 用于接收关于第一页面的操作指令; 其中, 所述操作指令 可以包括对页面进行替换的指令。
接收单元 41可以具体用于接收用户输入的关于第一页面的操作指令, 例 如: 用户通过点击通信设备的触摸屏所输入的操作指令、用户通过外接设备输 入的操作指令, 如鼠标、 键盘、 触摸设备等外接设备。 其中, 上述关于第一页 面的操作指令具体可以是在第一页面上输入的操作指令,或者在显示第一页面 的浏览器的窗口栏或者工具栏等该浏览器上供输入的界面上输入的操作指令。
其中,上述对页面进行替换的指令具体可以是用于将另一个页面替换掉第 一页面, 其中, 该另一个页面可以是一个空白的页面、 历史浏览的页面、 刷新 的页面或者新打开的页面等。
控制单元 42, 用于根据所述操作指令控制所述第一页面包含的第一资源 保持为连接状态, 其中, 所述第一资源为预先指定需要保留的资源。
当接收到上述操作命令时就可以控制第一页面包含的第一资源保持为连 接状态, 即控制第一资源一直保持为连接状态。
获取单元 43 , 用于根据所述操作指令获取第二资源, 并显示所述第二资 源, 所述第二资源不同于所述第一资源。
上述第二资源可以是用于在第一页面上显示的资源, 即获取单元 43将第 二资源在第一页面中显示, 由于上述第一资源的元素为连接状态, 即获取单元 43 显示时, 第一页面既显示第一资源又显示第二资源。 例如: 第一资源为音 频或者视频通信资源时, 即第一页面显示一直保持该音频或者视频通信, 同时 显示获取的第二资源, 例如, 第二资源为第一页面上的文字、 图像或者按鈕等 资源。 第二资源还可以是第一页面包括超链接对应的的页面资源, 即保持第一 页面为连接状态, 同时打开是第一页面包括超链接对应的的页面资源, 并显示 该页面资源。 本实施例提供的通信设备可以是手机、计算机、平板电脑等其它通信设备。 上述技术方案中, 接收关于第一页面的操作指令, 其中, 所述操作指令可 以包括对页面进行替换的指令,控制所述第一页面包含的第一资源保持为连接 状态, 根据所述操作指令获取第二资源, 并显示所述第二资源。 即在显示第二 资源时, 不会将第一资源断开, 即第二资源在显示时, 第一资源同时维持在实 时更新状态, 从而本发明实施例可以提高浏览页面的健壮性。 图 7是本发明实施例提供的另一种通信设备的结构示意图, 如图 7所示, 包括: 接收单元 51、 控制单元 52和获取单元 53 , 其中:
接收单元 51 , 用于接收关于第一页面的操作指令, 其中, 所述操作指令 可以包括对页面进行替换的指令。
例如: 用户通过点击通信设备的触摸屏所输入的操作指令、用户通过外接 设备输入的操作指令, 如鼠标、 键盘、 触摸设备等外接设备。 其中, 上述关于 第一页面的操作指令具体可以是在第一页面上输入的操作指令,或者在显示第 一页面的浏览器的窗口栏或者工具栏等该浏览器上供输入的界面上输入的操 作指令。
其中,上述对页面进行替换的指令具体可以是用于将另一个页面替换掉第 一页面, 其中, 该另一个页面可以是一个空白的页面、 历史浏览的页面、 刷新 的页面或者新打开的页面等。 上述操作指令具体可以包括:
后退操作指令、刷新操作指令、建立超链接的操作指令或者关闭操作指令。 其中,后退操作指令可以是用户点击浏览器上述的后退按¾,或者用户点 击键盘上述后退按键(例如: Backspace按键)等操作指令; 刷新操作指令可 以用户点击浏览器上述的刷新按键或者用户点击键盘上述刷新按键 (例如: F5 按键)等。建立超链接的操作指令可以是用户点击第一页面上的超链接资源的 操作指令, 例如: 点击第一页面上的图像超链接资源、 文本超链接资源或者视 频超链接资源等资源的资源标签按 ¾。上述关闭操作指令具体可以是点击关闭 按¾的操作指令。
其中, 第一页面可以包括:
包含实时传输的资源的页面、 交易页面和注册页面。 包含实时传输的资源的页面可以包括:
WebRTC页面、 包含视频的页面、 包含音频的页面、 包含游戏的页面等。 交易页面可以包括:
包含付款功能的页面、 用于选择物品的页面, 例如: 在线支持页面或者网 上购物页面等。
注册页面可以包括:
用于交互用户信息的页面。 例如: 用户注册的页面。
控制单元 52, 用于根据所述操作指令控制所述第一页面包含的第一资源 保持为连接状态, 其中, 所述第一资源为预先指定需要保留的资源。
获取单元 53 , 用于根据所述操作指令获取第二资源, 并显示所述第二资 源, 所述第二资源不同于所述第一资源。
作为一种可选的实施方式, 所述操作指令为所述后退操作指令,控制单元 52还可以用于控制所述第一页面的所有资源保持为连接状态; 即上述第一资 源为第一页面的所有资源,控制所述第一页面的所有资源保持为连接状态可以 是,不关闭第一页面,即继续打开第一页面,对第一页面不进行任何变化操作, 其中,第一页面可以是上述包含实时传输的资源的页面、交易页面和注册页面。
获取单元 53还可以用于根据所述操作指令获取运行所述第一页面的浏览 器的窗口历史( window.history ) 列表中的运行时间最晚的页面地址的页面资 源, 并显示该页面资源。
获取该页面资源可以是打开该页面地址, 例如: 该页面地址为 www.baidu.com, 即打开该页面, 并显示该页面。
作为一种可选的实施方式,所述操作指令还可以为所述建立超链接的操作 指令,控制单元 52还可以用于控制所述第一页面的所有资源保持为连接状态; 即上述第一资源为第一页面的所有资源,控制所述第一页面的所有资源保持为 连接状态可以是, 不关闭第一页面, 继续打开第一页面, 其中, 第一页面可以 是上述包含实时传输的资源的页面、 交易页面和注册页面。
获取单元 53还可以用于根据所述操作指令获取该操作指令对应的资源连 接的页面资源,并该页面资源的页面中增加用于在新标签中打开页面资源的参 数值, 并在新的标签中打开该页面资源。 获取该操作指令对应的资源连接的页面资源可以是打开该页面资源对应 的页面, 其中, 该建立超链接的操作指令具体可以是点击第一页面的资源标签 按¾,即该页面具体可以是通过点击第一页面的资源标签按 ¾所获取得到的页 面资源, 而上述保持了第一页面的所有资源的元素为连接状态, 这样该操作指 该页面资源对应的页面中增加用于在新标签中打开页面资源的参数值,这样该 页面资源对应的页面就可以在新的标签中打开,即浏览器此时会打开第一页面 和该页面资源对应的页面。其中, 上述用于在新标签中打开页面资源的参数值 具体可以为 "_blank,, 参数值。
作为一种可选的实施方式, 所述操作指令为所述刷新操作指令, 且所述第 一页面为包含实时传输的资源的页面, 即上述第一资源为实时传输的资源, 例 如: WebRTC页面、 包含视频的页面、 包含音频的页面、 包含游戏的页面等, 控制单元 52 还可以用于控制所述第一页面的实时传输的资源保持为连接状 态; 例如: 控制音频或者视频通信资源、 视频资源、 音频资源和游戏资源保持 为连接状态, 即第一页面还可以进行音频或者视频通信、 播放视频、 视频音频 或者运行游戏。
获取单元 53还可以用于根据所述操作指令更新所述第一页面中除所述实 时传输的资源之外的资源,并在所述第一页面中显示所述更新的资源以及所述 实时传输的资源。 实时传输的资源之外的部分或者所有资源。更新所述第一页面中除所述实时传 输的资源之外的资源可以是,接收第一页面所在的服务器发送的所述第一页面 中除所述实时传输的资源之外的资源,并将服务器发送的资源更新至第一页面 中。
其中, 上述除所述实时传输的资源之外的所有资源可以是包括:
页面的 UI界面, 例如: 文字、 图片、 框架、 按鈕等资源。
作为一种可选的实施方式, 所述操作指令为所述刷新操作指令, 且所述第 一页面为 WebRTC页面, 所述 WebRTC页面的媒体流(媒体流)对象为实时 传输的资源, 控制单元 52还可以用于控制所述第一页面的媒体流会话连接对 象和所述媒体流对象保持为连接状态, 并保存所述媒体流对应緩存区的句柄。 其中, 上述媒体流会话连接对象具体可以是实时通信中对方的通信账号, 上述媒体流对象具体可以是用于传输媒体流的通信平台 (例如: 服务器)。 控 制所述第一页面的媒体流会话连接对象和所述媒体流对象保持为连接状态可 以是一直与媒体流会话连接对象保持连接关系,且与媒体流会话连接对象一直 保持所述媒体流对象传输, 即音频或者视频通信一直在进行。具体还可以将媒 体流会话连接对象媒体流对象的相关的 SDP参数、 IP端口号、 相应的编码资 源和相应的解码资源和所述媒体流对应緩存区的句柄。 其中, 上述媒体流会话 连接对象具体可以包括控制媒体流建立和传输的会话信息,上述媒体流对象具 体可以包括: 实际传输的音视频媒体流内容。
获取单元 53还可以用于更新所述第一页面中除所述媒体流会话连接对象 和所述媒体流之外的资源, 并在所述第一页面中显示所述获取的资源, 将所述 名柄赋给所述第一页面的视频元素或者音频元素。
其中,第一页面中除所述媒体流会话连接对象和所述媒体流之外的资源具 体可以是第一页面中除所述媒体流会话连接对象和所述媒体流之外部分或者 所有资源, 其中, 第一页面中除所述媒体流会话连接对象和所述媒体流之外的 资源具体可以包括:
HTML资源文件、 CSS资源文件、 JavaScript资源文件和按 ¾, 其中, 按 ¾可以包括断开服务器 (disconnect )按鈕、 打电话 (call )按鈕、 挂断电话 ( hangup )按¾等。
将所述名柄赋给所述第一页面的视频元素或者音频元素可以是过 webkitURL.createObjectURL(stream)方法将緩存区的句柄赋给所述第一页面的 视频元素或者音频元素,第一页面的视频元素或者音频元素还是显示上述所述 媒体流对象。
作为一种可选的实施方式, 所述操作指令为所述刷新操作指令, 且所述第 一页面为交易页面和注册页面时, 控制单元 52还可以用于控制所述第一页面 的所有资源保持为连接状态; 且本实施方式中可以不包括获取单元 53 , 即接 收到上述操作指令,且第一页面为交易页面和注册页面时, 不对第一做出任何 响应。 作为一种可选的实施方式, 所述操作指令为用于关闭页面的操作指令,控 制单元 52还可以用于控制所述第一页面的所有资源保持为连接状态;
获取单元 53 还可以用于获取用于提示用于是否关闭第一页面的提示消 息。
具体可以是通过如下程序代码获取到该提示消息:
window, onbef oreunload = function() {
return '您的操作可能会导致当前通话中断, 是否要关闭? '; 即上述提示消息可以包括 "您的操作可能会导致当前通话中断, 是否要关 闭,, 的字样, 且该提示消息还可以包括用于关闭所述第一页面的按 ¾, 且该提 示消息还可以包括用于取消上述操作指令的按 ¾。当用户点击用于关闭所述第 一页面的按 ¾, 即关闭第一页面, 当用户点击用于取消上述操作指令的按 ¾, 即继续打开第一页面。
其中, 上述程序代码具体可以为 javascript代码。 "Window" 可以是是指 浏览器窗口对象; "onbeforeunload"可以是 window对象中的一个事件处理器, 用于当页面关闭或者刷新时触发, "function(){ return 'XXX';} " 可以是一个函 数, 用于返回一个字符串提示信息。 整段程序代码的功能是, 当用户关闭或者 刷新页面时, 弹出一个文字提示框。
作为一种可选的实施方式, 如图 8所示, 所述通信设备还可以包括: 判断单元 54 , 用于判断所述第一页面是否为需要提供健壮性的页面; 接收单元 51还用于当判断单元 54判断所述第一页面为需要提供健壮性的 页面时, 接收关于第一页面的操作指令。
其中, 所述需要提供健壮性的页面可以包括:
包含实时传输的资源的页面、 交易页面和注册页面。
其中, 判断所述第一页面是否为需要提供健壮性的页面可以包括: 判断所述第一页面的 JavaScript资源文件中和 HTML资源文件中是否都包 含" new RTC Peer Connection (configuration)"这一段代码 , 若是, 由确定所述第 一页面为 WebRTC页面, 而 WebRTC页面为包含实时传输的资源的页面, 即 确定所述第一页面为需要提供健壮性的页面。 其中, "new RTC Peer Connection (configuration)"具体可以是创建一个 RTC 对等连接实例,用于辅助后续的媒体通道建立。在实际应用中一般是 "pc = new RTC Peer Connection(configuration);" 以表示该页面为 WebRTC页面。
判断单元 54还可以用于判断第一页面是否为需要提供健壮性的页面, 若 是, 则判断所述第一页面是否开始进行音频或者视频通信;
接收单元 51还用于当判断单元 54判断所述第一页面开始进行音频或者视 频通信时, 接收关于第一页面的操作指令。 其中, 判断所述第一页面开始进行 音频或者视频通信可以包括:
监视 "addstream"事件, 当捕获到该事件 (或者抛出该事件) 时, 判断接 收到 WebRTC媒体流; 即判断所述第一页面开始进行音频或者视频通信; 或 者
监视 "addstreamO"方法, 当该方法被调用时, 判断开始发送 WebRTC媒 体流, 即判断所述第一页面开始进行音频或者视频通信; 或者
监视 "datachannel"事件, 当捕获到该事件 (或者抛出该事件) 时, 非媒 体数据通道已经建立; 即判断所述第一页面开始进行音频或者视频通信。
其中,上述 "addstream"事件、上述 "addstream(),,方法和上述 "datachannel" 事件都是互联网标准(例如: W3C标准)公知的事件或者方法。
本实施方式中, 判断所述第一页面是否为需要提供健壮性的页面可以包 括:
判断所述第一页面的 JavaScript资源文件中和 HTML资源文件中是否都包 含 ' 'HTML5 <video>/<audio^ 签", 若是, 则判断第一页面包含视频资源或者 包含音频资源, 即判断第一页面为包含实时传输的资源的页面。
本实施方式中, 判断所述第一页面是否为需要提供健壮性的页面可以包 括:
判断所述第一页面的 JavaScript资源文件中和 HTML资源文件中是否都包 含在线支付相关的 JS代码, 若是, 则判断第一页面为在线支付页面, 即判断 第一页面为交易页面。
其中, 判断所述第一页面是否为需要提供健壮性的页面可以包括: 判断所述第一页面的 JavaScript资源文件中和 HTML资源文件中是否都包 含在线注册的 html标签和代码, 若是, 则判断第一页面为在线注册页面, 即 判断第一页面为注册页面;
其中, 判断所述第一页面是否为需要提供健壮性的页面可以包括: 判断所述第一页面的 JavaScript资源文件中和 HTML资源文件中是否都包 含在线游戏的注册标识或者页面应用 ( Web Application ) 的注册标识, 若是, 则判断第一页面为在线游戏页面或者在线应用页面,即判断第一页面为包含实 时传输的资源的页面。
上述技术方案中, 在上面实施例的基础上描述的多种实施方式, 重点介绍 了接收到的操作指令分别为后退操作指令、刷新操作指令、建立超链接的操作 指令和关闭操作指令时,怎么控制所述第一页面包含的第一资源保持为连接状 态, 以及根据所述操作指令获取第二资源, 并显示所述第二资源。 这些实施方 式都可以提高浏览页面的健壮性。 图 9是本发明实施例提供的另一种通信设备的结构示意图, 如图 9所示, 网络接口 61、 存储器 62和通信总线 63 , 以及通过所述通信总线 63与所述网 络接口 61和所述存储器 62耦合的处理器 64, 存储器 62用于存储一组程序代 码。 网络接口 61可选的可以包括 Wi-Fi接口以及其他无线接口。 存储器 62可 能包含高速 RAM 存储器, 也可能还包括非不稳定的存储器 ( non- volatile memory ), 例如至少一个磁盘存储器。 存储器 62可选的可以包含至少一个位 于远离前述处理器 64的存储装置。
在一些实施方式中, 存储器 62存储了如下的元素, 可执行模块或者数据 结构, 或者他们的子集, 或者他们的扩展集:
操作系统 621 , 包含各种系统程序, 用于实现各种基础业务以及处理基于 硬件的任务;
应用模块 622, 包含设备控制服务程序、 设备识别服务程序等各种应用程 序, 用于实现各种应用业务。
具体地, 处理器 64用于调用存储器 62中存储的程序, 执行以下操作: 接收关于第一页面的操作指令; 其中, 所述操作指令可以包括对页面进行 替换的指令;
控制所述第一页面包含的第一资源保持为连接状态, 其中, 所述第一资源 为预先指定需要保留的资源。
其中, 上述具体可以是接收用户输入的关于第一页面的操作指令, 例如: 用户通过点击通信设备的触摸屏所输入的操作指令、用户通过外接设备输入的 操作指令, 如鼠标、 键盘、 触摸设备等外接设备。 其中, 上述关于第一页面的 操作指令具体可以是在第一页面上输入的操作指令,或者在显示第一页面的浏 览器的窗口栏或者工具栏等该浏览器上供输入的界面上输入的操作指令。
其中,上述对页面进行替换的指令具体可以是用于将另一个页面替换掉第 一页面, 其中, 该另一个页面可以是一个空白的页面、 历史浏览的页面、 刷新 的页面或者新打开的页面等。
当接收到上述操作命令时就可以控制第一页面包含的第一资源保持为连 接状态, 即控制第一资源一直保持为连接状态。
在本实施例中可以对接收到操作指令做出响应,也可以对接收到操作指令 不 ^1出响应。 例如: 当第一页面为包含实时传输的资源的页面时, 本实施例可 以对接收到操作指令做出响应,当上述交易页面和注册页面对接收到操作指令 不做出响应, 具体请参考下面实施例描述的实施方式。
本实施例中, 接收关于第一页面的操作指令, 其中, 所述操作指令可以包 括对页面进行替换的指令控制所述第一页面包含的第一资源保持为连接状态。 这样不会将第一资源断开, 即第一资源维持在实时更新状态,从而本发明实施 例可以提高浏览页面的健壮性。
在另一个实施例中处理器 64还可以执行如下操作:
接收关于第一页面的操作指令; 其中, 所述操作指令可以包括对页面进行 替换的指令;
控制所述第一页面包含的第一资源保持为连接状态, 其中, 所述第一资源 为预先指定需要保留的资源;
根据所述操作指令获取第二资源, 并显示所述第二资源, 所述第二资源不 同于所述第一资源。
获取第二资源具体可以是通过网络接口 61向服务器发送用于获取第二资 源的请求消息, 再通过网络接口 61接收服务器发送的第二资源。
其中,上述关于第一页面的操作指令具体可以是在第一页面上输入的操作 指令,或者在显示第一页面的浏览器的窗口栏或者工具栏等该浏览器上供输入 的界面上输入的操作指令。
其中,上述对页面进行替换的指令具体可以是用于将另一个页面替换掉第 一页面, 其中, 该另一个页面可以是一个空白的页面、 历史浏览的页面、 刷新 的页面或者新打开的页面等。
上述第二资源可以是用于在第一页面上显示的资源, 即处理器 64将第二 资源在第一页面中显示, 由于上述第一资源的元素为连接状态, 即处理器 64 显示时, 第一页面既显示第一资源又显示第二资源。 例如: 第一资源为音频或 者视频通信资源时, 即第一页面显示一直保持该音频或者视频通信, 同时显示 获取的第二资源,例如,第二资源为第一页面上的文字、图像或者按 ¾等资源。 第二资源还可以是第一页面包括超链接对应的的页面资源,即保持第一页面为 连接状态, 同时打开是第一页面包括超链接对应的的页面资源, 并显示该页面 资源。
该实施例中接收关于第一页面的操作指令, 其中, 所述操作指令可以包括 对页面进行替换的指令控制所述第一页面包含的第一资源保持为连接状态,根 据所述操作指令获取第二资源, 并显示所述第二资源。这样可以实现在显示第 二资源时, 不会将第一资源断开, 即第二资源在显示时, 第一资源同时维持在 实时更新状态, 从而本发明实施例可以提高浏览页面的健壮性。
在另一个实施例中, 处理器 64还可以用于执行如下操作:
接收关于第一页面的操作指令, 其中, 所述操作指令包括对页面进行替换 的指令;
控制所述第一页面包含的第一资源保持为连接状态, 其中, 所述第一资源 为预先指定需要保留的资源;
根据所述操作指令获取第二资源, 并显示所述第二资源, 所述第二资源不 同于所述第一资源。
其中,上述关于第一页面的操作指令具体可以是在第一页面上输入的操作 指令,或者在显示第一页面的浏览器的窗口栏或者工具栏等该浏览器上供输入 的界面上输入的操作指令。上述对页面进行替换的指令具体可以是用于将另一 个页面替换掉第一页面, 其中, 该另一个页面可以是一个空白的页面、 历史浏 览的页面、 刷新的页面或者新打开的页面等。 上述操作指令具体可以包括: 后退操作指令、刷新操作指令、建立超链接的操作指令或者关闭操作指令。 其中,后退操作指令可以是用户点击浏览器上述的后退按¾,或者用户点 击键盘上述后退按键(例如: Backspace按键)等操作指令; 刷新操作指令可 以用户点击浏览器上述的刷新按键或者用户点击键盘上述刷新按键 (例如: F5 按键)等。建立超链接的操作指令可以是用户点击第一页面上的超链接资源的 操作指令, 例如: 点击第一页面上的图像超链接资源、 文本超链接资源或者视 频超链接资源等资源的资源标签按 ¾。上述关闭操作指令具体可以是点击关闭 按¾的操作指令。
其中, 上述第一页面可以包括:
包含实时传输的资源的页面、 交易页面和注册页面。
包含实时传输的资源的页面可以包括:
WebRTC页面、 包含视频的页面、 包含音频的页面、 包含游戏的页面等。 交易页面可以包括:
包含付款功能的页面、 用于选择物品的页面, 例如: 在线支持页面或者网 上购物页面等。
注册页面可以包括:
用于交互用户信息的页面。 例如: 用户注册的页面。
作为一种可选的实施方式, 所述操作指令为所述后退操作指令, 处理器 64执行的控制所述第一页面包含的第一资源保持为连接状态的操作, 可以包 括:
控制所述第一页面的所有资源保持为连接状态;即上述第一资源为第一页 面的所有资源,控制所述第一页面的所有资源保持为连接状态可以是, 不关闭 第一页面, 即继续打开第一页面, 对第一页面不进行任何变化操作, 其中, 第 一页面可以是上述包含实时传输的资源的页面、 交易页面和注册页面。
处理器 64执行的根据所述操作指令获取第二资源, 并显示所述第二资源 的操作, 可以包括: 根据所述操作指令获取运行所述第一页面的浏览器的 window.history列表 中的运行时间最晚的页面地址的页面资源, 并显示该页面资源。
获取该页面资源可以是打开该页面地址, 例如: 该页面地址为 www.baidu.com, 即打开该页面, 并显示该页面。
作为一种可选的实施方式,所述操作指令还可以为所述建立超链接的操作 指令, 处理器 64执行的控制所述第一页面包含的第一资源保持为连接状态的 操作, 可以包括:
控制所述第一页面的所有资源保持为连接状态;即上述第一资源为第一页 面的所有资源,控制所述第一页面的所有资源保持为连接状态可以是, 不关闭 第一页面, 继续打开第一页面, 其中, 第一页面可以是上述包含实时传输的资 源的页面、 交易页面和注册页面。
处理器 64执行的根据所述操作指令获取第二资源, 并显示所述第二资源 的操作, 可以包括:
根据所述操作指令获取该操作指令对应的资源连接的页面资源,并该页面 资源的页面中增加用于在新标签中打开页面资源的参数值 ,并在新的标签中打 开该页面资源。
获取该操作指令对应的资源连接的页面资源可以是打开该页面资源对应 的页面, 其中, 该建立超链接的操作指令具体可以是点击第一页面的资源标签 按¾,即该页面具体可以是通过点击第一页面的资源标签按 ¾所获取得到的页 面资源, 而上述保持了第一页面的所有资源的元素为连接状态, 这样该操作指 该页面资源对应的页面中增加用于在新标签中打开页面资源的参数值,这样该 页面资源对应的页面就可以在新的标签中打开,即浏览器此时会打开第一页面 和该页面资源对应的页面。其中, 上述用于在新标签中打开页面资源的参数值 具体可以为 "_blank,, 参数值。
作为一种可选的实施方式, 所述操作指令为所述刷新操作指令, 且所述第 一页面为包含实时传输的资源的页面, 即上述第一资源为实时传输的资源, 例 如: WebRTC页面、 包含视频的页面、 包含音频的页面、 包含游戏的页面等, 处理器 64执行的控制所述第一页面包含的第一资源保持为连接状态的操作, 可以包括:
控制所述第一页面的实时传输的资源保持为连接状态; 例如: 控制音频或 者视频通信资源、 视频资源、 音频资源和游戏资源保持为连接状态, 即第一页 面还可以进行音频或者视频通信、 播放视频、 视频音频或者运行游戏。
处理器 64执行的根据所述操作指令获取第二资源, 并显示所述第二资源 的操作, 可以包括:
根据所述操作指令更新所述第一页面中除所述第一资源之外的资源,并在
实时传输的资源之外的部分或者所有资源。更新所述第一页面中除所述第一资 源之外的资源可以是,接收第一页面所在的服务器发送的所述第一页面中除所 述实时传输的资源之外的资源, 并将服务器发送的资源更新至第一页面中。 页面的 UI界面, 例如: 文字、 图片、 框架、 按鈕等资源。
作为一种可选的实施方式, 所述操作指令为所述刷新操作指令, 且所述第 一页面为 WebRTC页面, 所述 WebRTC页面的媒体流(媒体流)对象为实时 传输的资源, 处理器 64执行的控制所述第一页面包含的第一资源保持为连接 状态的操作, 可以包括:
控制所述第一页面的媒体流会话连接对象和所述媒体流对象保持为连接 状态, 并保存所述媒体流对应緩存区的句柄。
其中, 上述媒体流会话连接对象具体可以是实时通信中对方的通信账号, 上述媒体流对象具体可以是用于传输媒体流的通信平台 (例如: 服务器)。 控 制所述第一页面的媒体流会话连接对象和所述媒体流对象保持为连接状态可 以是一直与媒体流会话连接对象保持连接关系,且与媒体流会话连接对象一直 保持所述媒体流对象传输, 即音频或者视频通信一直在进行。具体还可以将媒 体流会话连接对象媒体流对象的相关的会话描述协议 ( Session Description Protocol, SDP )参数、 IP 端口号、 相应的编码资源和相应的解码资源和所述 媒体流对应緩存区的句柄。其中, 上述媒体流会话连接对象具体可以包括控制 媒体流建立和传输的会话信息, 上述媒体流对象具体可以包括: 实际传输的音 视频媒体流内容。
处理器 64执行的根据所述操作指令获取第二资源, 并显示所述第二资源 的操作, 可以包括:
根据所述操作指令更新所述第一页面中除所述媒体流会话连接对象和所 述媒体流之外的资源, 并在所述第一页面中显示所述获取的资源,将所述名柄 赋给所述第一页面的视频元素或者音频元素。
其中,第一页面中除所述媒体流会话连接对象和所述媒体流之外的资源具 体可以是第一页面中除所述媒体流会话连接对象和所述媒体流之外部分或者 所有资源, 其中, 第一页面中除所述媒体流会话连接对象和所述媒体流之外的 资源具体可以包括:
HTML资源文件、 CSS资源文件、 JavaScript资源文件和按 ¾, 其中, 按 ¾可以包括断开服务器 (disconnect )按鈕、 打电话 (call )按鈕、 挂断电话 ( hangup )按¾等。
将所述名柄赋给所述第一页面的视频元素或者音频元素可以是过 webkitURL.createObjectURL(stream)方法将緩存区的句柄赋给所述第一页面的 视频元素或者音频元素,第一页面的视频元素或者音频元素还是显示上述所述 媒体流对象。
作为一种可选的实施方式, 所述操作指令为所述刷新操作指令, 且所述第 一页面为交易页面和注册页面时, 处理器 64执行的控制所述第一页面包含的 第一资源保持为连接状态的操作, 可以包括:
控制所述第一页面的所有资源保持为连接状态; 且本实施方式中处理器 64 可以不执行的根据操作指令获取第二资源, 并显示所述第二资源的操作, 即接收到上述操作指令, 且第一页面为交易页面和注册页面时, 不对第一做出 任何响应。
作为一种可选的实施方式, 所述操作指令为用于关闭页面的操作指令, 处 理器 64执行的控制所述第一页面包含的第一资源保持为连接状态的操作, 可 以包括:
控制所述第一页面的所有资源保持为连接状态;
处理器 64执行的根据操作指令获取第二资源, 并显示所述第二资源的操 作, 可以包括:
根据操作指令获取用于提示用于是否关闭第一页面的提示消息。
具体可以是通过如下程序代码获取到该提示消息:
window, onbef oreunload = function() {
return '您的操作可能会导致当前通话中断, 是否要关闭? '; 即上述提示消息可以包括 "您的操作可能会导致当前通话中断, 是否要关 闭,, 的字样, 且该提示消息还可以包括用于关闭所述第一页面的按 ¾, 且该提 示消息还可以包括用于取消上述操作指令的按 ¾。当用户点击用于关闭所述第 一页面的按 ¾, 即关闭第一页面, 当用户点击用于取消上述操作指令的按 ¾, 即继续打开第一页面。
其中, 上述程序代码具体可以为 javascript代码。 "Window" 可以是是指 浏览器窗口对象; "onbeforeunload"可以是 window对象中的一个事件处理器, 用于当页面关闭或者刷新时触发, "function(){ return 'XXX';} " 可以是一个函 数, 用于返回一个字符串提示信息。 整段程序代码的功能是, 当用户关闭或者 刷新页面时, 弹出一个文字提示框。
作为一种可选的实施方式, 处理器 64在接收操作指令之前, 还可以用于 执行如下操作
判断所述第一页面是否为需要提供健壮性的页面, 若是, 则执行接收关于 第一页面的操作指令的操作; 若否, 则结束流程。
其中, 所述需要提供健壮性的页面可以包括:
包含实时传输的资源的页面、 交易页面和注册页面
其中, 判断所述第一页面是否为需要提供健壮性的页面可以包括: 判断所述第一页面的 JavaScript资源文件中和 HTML资源文件中是否都包 含" new RTC Peer Connection (configuration)"这一段代码 , 若是, 由确定所述第 一页面为 WebRTC页面, 而 WebRTC页面为包含实时传输的资源的页面, 即 确定所述第一页面为需要提供健壮性的页面。
其中, "new RTC Peer Connection (configuration)"具体可以是创建一个 RTC 对等连接实例,用于辅助后续的媒体通道建立。在实际应用中一般是 "pc = new RTCPeerConnection(configuration); " 以表示该页面为 WebRTC页面。 当在判断所述第一页面为 WebRTC页面后, 在进入页面健壮性模式之前, 所述方法还可以包括:
判断所述第一页面是否开始进行音频或者视频通信,若是, 则进入页面健 壮性模式, 若否, 继续执行判断所述第一页面是否开始进行音频或者视频通信 的步骤。 其中, 判断所述第一页面开始进行音频或者视频通信可以包括:
监视 "addstream"事件, 当捕获到该事件 (或者抛出该事件) 时, 判断接 收到 WebRTC媒体流; 即判断所述第一页面开始进行音频或者视频通信; 或 者
监视 "addstreamO"方法, 当该方法被调用时, 判断开始发送 WebRTC媒 体流, 即判断所述第一页面开始进行音频或者视频通信; 或者
监视 "datachannel"事件, 当捕获到该事件 (或者抛出该事件) 时, 非媒 体数据通道已经建立; 即判断所述第一页面开始进行音频或者视频通信。
其中,上述 "addstream"事件、上述 "addstream(),,方法和上述 "datachannel" 事件都是互联网标准(例如: W3C标准)公知的事件或者方法。
本实施方式中, 判断所述第一页面是否为需要提供健壮性的页面可以包 括:
判断所述第一页面的 JavaScript资源文件中和 HTML资源文件中是否都包 含 ' 'HTML6 <video>/<audio^ 签", 若是, 则判断第一页面包含视频资源或者 包含音频资源, 即判断第一页面为包含实时传输的资源的页面。
本实施方式中, 判断所述第一页面是否为需要提供健壮性的页面可以包 括:
判断所述第一页面的 JavaScript资源文件中和 HTML资源文件中是否都包 含在线支付相关的 JS代码, 若是, 则判断第一页面为在线支付页面, 即判断 第一页面为交易页面。
其中, 判断所述第一页面是否为需要提供健壮性的页面可以包括: 判断所述第一页面的 JavaScript资源文件中和 HTML资源文件中是否都包 含在线注册的 html标签和代码, 若是, 则判断第一页面为在线注册页面, 即 判断第一页面为注册页面; 其中, 判断所述第一页面是否为需要提供健壮性的页面可以包括: 判断所述第一页面的 JavaScript资源文件中和 HTML资源文件中是否都包 含在线游戏的注册标识或者页面应用 ( Web Application ) 的注册标识, 若是, 则判断第一页面为在线游戏页面或者在线应用页面,即判断第一页面为包含实 时传输的资源的页面。
该实施方式中, 进入页面健壮性模式后, 就处理器 64就可以执行接收关 于第一页面的操作指令。
本实施例中在上面实施例的基础上描述的多种实施方式,重点介绍了接收 到的操作指令分别为后退操作指令、刷新操作指令、建立超链接的操作指令和 关闭操作指令时, 怎么控制所述第一页面包含的第一资源保持为连接状态, 以 及根据所述操作指令获取第二资源, 并显示所述第二资源。这些实施方式都可 以提高浏览页面的健壮性。
上述通信设备可以是手机、 计算机、 平板电脑等通信设备。 即这些通信设 备可以实现上述方案。
上述技术方案中, 接收关于第一页面的操作指令, 其中, 所述操作指令包 括后退操作指令或者刷新操作指令,控制所述第一页面包含的第一资源保持为 连接状态。 这样不会将第一资源断开, 即第一资源维持在实时更新状态, 从而 本发明实施例可以提高浏览页面的健壮性。
本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程, 是可以通过计算机程序来指令相关的硬件来完成,所述的程序可存储于一计算 机可读取存储介质中,该程序在执行时,可包括如上述各方法的实施例的流程。 其中,所述的存储介质可为磁碟、光盘、只读存储记忆体(Read-Only Memory, ROM )或随机存取存储器(Random Access Memory, 筒称 RAM )等。
以上所揭露的仅为本发明较佳实施例而已,当然不能以此来限定本发明之 权利范围,因此依本发明权利要求所作的等同变化,仍属本发明所涵盖的范围。

Claims

权 利 要 求
1、 一种网页页面处理方法, 其特征在于, 包括:
接收关于第一页面的操作指令, 其中, 所述操作指令可以包括对页面进行 替换的指令;
控制所述第一页面包含的第一资源保持为连接状态, 其中, 所述第一资源 为预先指定需要保留的资源。
2、 如权利要求 1所述的方法, 其特征在于, 所述控制所述第一页面包含 的第一资源保持为连接状态之后, 所述方法还包括:
根据所述操作指令获取第二资源, 并显示所述第二资源, 所述第二资源不 同于所述第一资源。
3、 如权利要求 1或 2所述的方法, 其特征在于, 所述第一页面包括: 包含实时传输的资源的页面、 交易页面和注册页面。
4、 如权利要求 1-3 中任一项所述的方法, 其特征在于, 所述对页面进行 替换的指令包括:
后退操作指令、刷新操作指令、建立超链接的操作指令或者关闭操作指令。
5、 如权利要求 4所述的方法, 其特征在于, 所述操作指令为所述后退操 作指令, 所述控制所述第一页面包含的第一资源保持为连接状态, 包括:
控制所述第一页面的所有资源保持为连接状态;
所述根据所述操作指令获取第二资源, 并显示所述第二资源, 包括: 根据所述操作指令获取运行所述第一页面的浏览器的窗口历史列表中的 运行时间最晚的页面地址的页面资源, 并显示该页面资源。
6、 如权利要求 4所述的方法, 其特征在于, 所述操作指令为所述刷新操 作指令,且所述第一页面为包含实时传输的资源的页面, 所述控制所述第一页 面包含的第一资源保持为连接状态, 包括: 控制所述第一页面的实时传输的资源保持为连接状态;
所述根据所述操作指令获取第二资源, 并显示所述第二资源, 包括: 根据所述操作指令更新所述第一页面中除所述实时传输的资源之外的资
7、 如权利要求 4所述的方法, 其特征在于, 所述操作指令为所述刷新操 作指令,且所述第一页面为页面实时通信页面, 所述页面实时通信页面的媒体 流对象为实时传输的资源,所述控制所述第一页面包含的第一资源保持为连接 状态, 包括:
控制所述第一页面的媒体流会话连接对象和所述媒体流对象保持为连接 状态, 并保存所述媒体流对应緩存区的句柄;
所述根据所述操作指令获取第二资源, 并显示所述第二资源, 包括: 根据所述操作指令更新所述第一页面中除所述媒体流会话连接对象和所 述媒体流之外的资源, 并在所述第一页面中显示所述获取的资源,将所述句柄 赋给所述第一页面的视频元素或者音频元素。
8、 如权利要求 4所述的方法, 其特征在于, 所述操作指令为所述建立超 链接的操作指令; 所述控制所述第一页面包含的第一资源保持为连接状态, 包 括:
控制所述第一页面的所有资源保持为连接状态;
所述根据所述操作指令获取第二资源, 并显示所述第二资源, 包括: 根据所述操作指令获取该操作指令对应的资源连接的页面资源,并该页面 资源的页面中增加用于在新标签中打开页面资源的参数值 ,并在新的标签中打 开该页面资源。
9、 一种通信设备, 其特征在于, 包括: 接收单元和控制单元, 其中: 所述接收单元, 用于接收关于第一页面的操作指令, 其中, 所述操作指令 可以包括对页面进行替换的指令; 保持为连接状态, 其中, 所述第一资源为预先指定的需要保留的资源。
10、 如权利要求 9所述的设备, 其特征在于, 所述设备还包括:
获取单元, 用于根据所述操作指令获取第二资源, 并显示所述第二资源, 所述第二资源不同于所述第一资源。
11、 如权利要求 9或 10所述的设备, 其特征在于, 所述第一页面包括: 包含实时传输的资源的页面、 交易页面和注册页面。
12、 如权利要求 9-11 中任一项所述的设备, 其特征在于, 所述对页面进 行替换的指令包括:
后退操作指令、刷新操作指令、建立超链接的操作指令或者关闭操作指令。
13、 如权利要求 12所述的设备, 其特征在于, 所述操作指令为所述后退 操作指令, 所述控制单元还用于控制所述第一页面的所有资源保持为连接状 态;
所述获取单元还用于根据所述操作指令获取运行所述第一页面的浏览器 的窗口历史列表中的运行时间最晚的页面地址的页面资源, 并显示该页面资 源。
14、 如权利要求 12所述的设备, 其特征在于, 所述操作指令为所述刷新 操作指令, 且所述第一页面为包含实时传输的资源的页面, 所述控制单元还用 于控制所述第一页面的实时传输的资源保持为连接状态;
所述获取单元还用于根据所述操作指令更新所述第一页面中除所述实时 传输的资源之外的资源,并在所述第一页面中显示所述更新的资源以及所述实 时传输的资源。
15、 如权利要求 12所述的设备, 其特征在于, 所述操作指令为所述刷新 操作指令, 且所述第一页面为页面实时通信页面, 所述页面实时通信页面的媒 体流对象为实时传输的资源,所述控制单元具体用于控制所述第一页面的媒体 流会话连接对象和所述媒体流对象保持为连接状态,并保存所述媒体流对应緩 存区的句柄;
所述获取单元还用于根据所述操作指令更新所述第一页面中除所述媒体 流会话连接对象和所述媒体流之外的资源,并在所述第一页面中显示所述获取 的资源, 将所述名柄赋给所述第一页面的视频元素或者音频元素。
16、 如权利要求 12所述的设备, 其特征在于, 所述操作指令为所述建立 超链接的操作指令;所述控制单元还用于控制所述第一页面的所有资源保持为 连接状态;
所述获取单元还用于根据所述操作指令获取该操作指令对应的资源连接 的页面资源,并该页面资源的页面中增加用于在新标签中打开页面资源的参数 值, 并在新的标签中打开该页面资源。
17、 一种通信设备, 其特征在于, 包括: 网络接口、 存储器和通信总线, 以及通过所述通信总线与所述网络接口和所述存储器耦合的处理器, 其中,存 储器用于存储一组程序代码, 所述处理器用于调用所述存储器中存储的程序, 执行以下操作:
接收关于第一页面的操作指令, 其中, 所述操作指令可以包括对页面进行 替换的指令;
控制所述第一页面包含的第一资源保持为连接状态, 其中, 所述第一资源 为预先指定需要保留的资源。
18、 如权利要求 17所述的设备, 其特征在于, 所述处理器在执行控制所 述第一页面包含的第一资源保持为连接状态的操作之后, 还用于执行如下操 作:
根据所述操作指令获取第二资源, 并显示所述第二资源, 所述第二资源不 同于所述第一资源。
19、 如权利要求 17或者 18所述的通信设备, 其特征在于, 所述第一页面 包括:
包含实时传输的资源的页面、 交易页面和注册页面。
20、 如权利要求 17-19中任一项所述的设备, 其特征在于, 所述对页面进 行替换的指令包括:
后退操作指令、刷新操作指令、建立超链接的操作指令或者关闭操作指令。
21、 如权利要求 20所述的设备, 其特征在于, 所述操作指令为所述后退 操作指令,所述处理器执行的控制所述第一页面包含的第一资源保持为连接状 态的操作, 包括:
控制所述第一页面的所有资源保持为连接状态;
所述处理器执行的根据所述操作指令获取第二资源,并显示所述第二资源 的操作, 包括:
根据所述操作指令获取运行所述第一页面的浏览器的窗口历史列表中的 运行时间最晚的页面地址的页面资源, 并显示该页面资源。
22、 如权利要求 21所述的设备, 其特征在于, 所述操作指令为所述刷新 操作指令, 且所述第一页面为包含实时传输的资源的页面, 所述处理器执行的 控制所述第一页面包含的第一资源保持为连接状态的操作, 包括:
控制所述第一页面的实时传输的资源保持为连接状态;
所述处理器执行的根据所述操作指令获取第二资源, 并显示所述第二资 源, 包括:
根据所述操作指令更新所述第一页面中除所述实时传输的资源之外的资
23、 如权利要求 21所述的设备, 其特征在于, 所述操作指令为所述刷新 操作指令, 且所述第一页面为页面实时通信页面, 所述页面实时通信页面的媒 体流对象为实时传输的资源,所述处理器执行的控制所述第一页面包含的第一 资源保持为连接状态的操作, 包括:
控制所述第一页面的对等连接媒体流会话连接对象和所述媒体流对象保 持为连接状态, 并保存所述媒体流对应緩存区的句柄;
所述处理器执行的根据所述操作指令获取第二资源,并显示所述第二资源 的操作, 包括:
根据所述操作指令更新所述第一页面中除所述媒体流会话连接对象和所 述媒体流之外的资源, 并在所述第一页面中显示所述获取的资源,将所述名柄 赋给所述第一页面的视频元素或者音频元素。
24、 如权利要求 21所述的设备, 其特征在于, 所述操作指令为所述建立 超链接的操作指令;所述处理器执行的控制所述第一页面包含的第一资源保持 为连接状态的操作, 包括:
控制所述第一页面的所有资源保持为连接状态;
所述处理器执行的根据所述操作指令获取第二资源,并显示所述第二资源 的操作, 包括:
根据所述操作指令获取该操作指令对应的资源连接的页面资源,并该页面 资源的页面中增加用于在新标签中打开页面资源的参数值 ,并在新的标签中打 开该页面资源。
PCT/CN2013/082209 2013-08-23 2013-08-23 一种网页页面处理方法及设备 WO2015024262A1 (zh)

Priority Applications (6)

Application Number Priority Date Filing Date Title
CN201380002074.2A CN104995619B (zh) 2013-08-23 2013-08-23 一种网页页面处理方法及设备
ES13887588.5T ES2680220T3 (es) 2013-08-23 2013-08-23 Método y dispositivo de procesamiento de página web
PCT/CN2013/082209 WO2015024262A1 (zh) 2013-08-23 2013-08-23 一种网页页面处理方法及设备
EP13887588.5A EP2871582B1 (en) 2013-08-23 2013-08-23 Webpage processing method and device
EP18168768.2A EP3410313B1 (en) 2013-08-23 2013-08-23 Web page processing method and device
US14/584,962 US10929497B2 (en) 2013-08-23 2014-12-29 Replacing a web page while maintaining a communication link

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2013/082209 WO2015024262A1 (zh) 2013-08-23 2013-08-23 一种网页页面处理方法及设备

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US14/584,962 Continuation US10929497B2 (en) 2013-08-23 2014-12-29 Replacing a web page while maintaining a communication link

Publications (1)

Publication Number Publication Date
WO2015024262A1 true WO2015024262A1 (zh) 2015-02-26

Family

ID=52482993

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2013/082209 WO2015024262A1 (zh) 2013-08-23 2013-08-23 一种网页页面处理方法及设备

Country Status (5)

Country Link
US (1) US10929497B2 (zh)
EP (2) EP3410313B1 (zh)
CN (1) CN104995619B (zh)
ES (1) ES2680220T3 (zh)
WO (1) WO2015024262A1 (zh)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1588864A (zh) * 2004-09-03 2005-03-02 王金堃 带有播放区域的网页
CN1987851A (zh) * 2005-12-22 2007-06-27 腾讯科技(深圳)有限公司 一种网页数据的更新显示方法
CN102662581A (zh) * 2012-03-31 2012-09-12 奇智软件(北京)有限公司 以鼠标输入进行控制的方法及系统
US20120297429A1 (en) * 2011-05-17 2012-11-22 Cbs Interactive, Inc. Emulating Television Viewing Experience In A Browser

Family Cites Families (43)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
GB2293293B (en) * 1994-09-15 1998-10-21 Northern Telecom Ltd Interactive video system
US6732183B1 (en) * 1996-12-31 2004-05-04 Broadware Technologies, Inc. Video and audio streaming for multiple users
US5907681A (en) * 1997-10-20 1999-05-25 International Business Machines Corporation Intelligent method, apparatus and computer program product for automated refreshing of internet web pages
EP1145157A4 (en) * 1998-10-28 2007-10-17 Yahoo Inc METHOD FOR CONTROLLING INTERFACE OF INTERNET BROWSER AND CONTROLLABLE BROWSER INTERFACE
US6401125B1 (en) * 1999-08-05 2002-06-04 Nextpage, Inc. System and method for maintaining state information between a web proxy server and its clients
CA2299150A1 (en) * 2000-02-23 2001-08-23 Hummingbird Communications Ltd A system and method for providing real-time information to a web browser
US7010582B1 (en) * 2000-06-26 2006-03-07 Entrust Limited Systems and methods providing interactions between multiple servers and an end use device
US7287093B2 (en) * 2000-08-04 2007-10-23 Mobileaware Technologies Limited E-business mobility platform
US6738804B1 (en) * 2000-09-15 2004-05-18 Yodlee.Com, Inc. Method and apparatus for enabling sectored data refreshing of Web-site data during session
US7065568B2 (en) * 2000-11-30 2006-06-20 Microsoft Corporation System and method for managing states and user context over stateless protocols
US7640512B1 (en) * 2000-12-22 2009-12-29 Automated Logic Corporation Updating objects contained within a webpage
CN1218263C (zh) 2001-02-14 2005-09-07 英业达股份有限公司 支持页面动态更新的方法
US7000008B2 (en) * 2001-04-16 2006-02-14 Sun Microsystems, Inc. Method, system, and program for providing data updates to a page including multiple regions of dynamic content
EP1474753B1 (en) * 2002-02-15 2018-08-22 Tridium, Inc. Component model for real time system control
US7617278B1 (en) * 2003-01-29 2009-11-10 Adobe Systems Incorporated Client controllable server-side playlists
JP2005149387A (ja) * 2003-11-19 2005-06-09 Nec Corp リアルタイムWeb共有システム
US7921372B2 (en) * 2005-03-25 2011-04-05 Microsoft Corporation System and method for pinning tabs in a tabbed browser
US20070050718A1 (en) * 2005-05-19 2007-03-01 Moore Michael R Systems and methods for web server based media production
US8108527B1 (en) * 2006-06-05 2012-01-31 Thomson Reuters (Markets) Llc Dynamic display using pushed-streamed data
US20070299928A1 (en) * 2006-06-22 2007-12-27 Pooja Kohli Maintaining sessions using cookie updation
US20080040758A1 (en) * 2006-08-10 2008-02-14 Todd Beetcher Media system and method for purchasing, downloading and playing media content
US20080092047A1 (en) * 2006-10-12 2008-04-17 Rideo, Inc. Interactive multimedia system and method for audio dubbing of video
US7865455B2 (en) * 2008-03-13 2011-01-04 Opinionlab, Inc. System and method for providing intelligent support
US20110023079A1 (en) * 2008-03-20 2011-01-27 Mark Alan Schultz System and method for processing priority transport stream data in real time in a multi-channel broadcast multimedia system
US20100064220A1 (en) * 2008-03-27 2010-03-11 Verizon Data Services India Private Limited Method and system for providing interactive hyperlinked video
US8112490B2 (en) * 2008-05-15 2012-02-07 Upton Kevin S System and method for providing a virtual environment with shared video on demand
CN101504648A (zh) 2008-11-14 2009-08-12 北京搜狗科技发展有限公司 展现网页资源的方法及装置
US9167312B2 (en) * 2009-11-24 2015-10-20 Verizon Patent And Licensing Inc. Pause-based advertising methods and systems
US8683357B2 (en) * 2009-11-25 2014-03-25 Red Hat, Inc. Providing real time web application framework socket
CN102117290B (zh) * 2009-12-30 2015-03-18 北京搜狗科技发展有限公司 一种展现网页中页面元素的方法及系统
US8406390B1 (en) * 2010-08-23 2013-03-26 Sprint Communications Company L.P. Pausing a live teleconference call
US9329691B2 (en) 2010-09-22 2016-05-03 Shimane Prefectural Government Operation input apparatus and method using distinct determination and control areas
US20120096073A1 (en) * 2010-10-18 2012-04-19 Blabbelon, Inc. Local polling method and system for real time updating of web-based services
CN102469125A (zh) * 2010-11-10 2012-05-23 深圳市奥软网络科技有限公司 一种手机多任务下载系统及方法
US9137288B2 (en) * 2010-12-20 2015-09-15 Yahoo! Inc. Scalable push-based architecture for web applications
US20120317474A1 (en) * 2011-04-20 2012-12-13 IBT - Internet Business Technologies Methods and systems for real-time web content publishing
US9146656B1 (en) * 2011-06-27 2015-09-29 Google Inc. Notifications user interface
US8775556B1 (en) * 2011-07-20 2014-07-08 Google Inc. Automated segmentation and processing of web site traffic data over a rolling window of time
CN102541599B (zh) * 2011-12-27 2015-04-29 深圳创维-Rgb电子有限公司 一种电子设备在线升级的方法、系统及电视机
CN102905181B (zh) * 2012-10-12 2015-10-21 北京奇艺世纪科技有限公司 一种实现移动终端在线播放视频的方法、装置和系统
CN103177115B (zh) * 2013-04-03 2016-06-29 北京奇虎科技有限公司 一种提取网页页面链接的方法和装置
US10404658B1 (en) * 2014-06-03 2019-09-03 Xevo Inc. Naming services extensions to URLs to handle inconstant resources, non-addressable resources, and large numbers of resources
US10789654B1 (en) * 2015-07-27 2020-09-29 Intuit Inc. Web browsing systems for acquiring tax data during electronic tax return preparation

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1588864A (zh) * 2004-09-03 2005-03-02 王金堃 带有播放区域的网页
CN1987851A (zh) * 2005-12-22 2007-06-27 腾讯科技(深圳)有限公司 一种网页数据的更新显示方法
US20120297429A1 (en) * 2011-05-17 2012-11-22 Cbs Interactive, Inc. Emulating Television Viewing Experience In A Browser
CN102662581A (zh) * 2012-03-31 2012-09-12 奇智软件(北京)有限公司 以鼠标输入进行控制的方法及系统

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
See also references of EP2871582A4 *

Also Published As

Publication number Publication date
US10929497B2 (en) 2021-02-23
CN104995619A (zh) 2015-10-21
EP2871582A4 (en) 2015-08-12
CN104995619B (zh) 2020-06-26
ES2680220T3 (es) 2018-09-05
EP3410313A1 (en) 2018-12-05
US20150113382A1 (en) 2015-04-23
EP2871582A1 (en) 2015-05-13
EP3410313B1 (en) 2022-07-27
EP2871582B1 (en) 2018-05-23

Similar Documents

Publication Publication Date Title
JP7263442B2 (ja) モバイルアプリケーションのリアルタイム遠隔制御のためのシステムおよび方法
US9231902B2 (en) Method and electronic device for content sharing
WO2018113140A1 (zh) 一种视频直播中虚拟礼物显示方法和系统
RU2611041C9 (ru) Способы и системы для совместной конференцсвязи и совместного использования программного приложения
US9542501B2 (en) System and method for presenting content in a client/server environment
US9407728B2 (en) Content item presentation system
TWI590157B (zh) 自客戶側應用程式之傳送資料壓縮序列化
US20180121217A1 (en) Multi-window architecture and data communication for a remote access application session
US20140110473A1 (en) Method and system for cross-terminal cloud browsing
US20150106730A1 (en) Framework for screen content sharing system with generalized screen descriptions
CN104601650A (zh) 为Web实时通信(WebRTC)交互流提供智能管理的方法和系统
US20150169509A1 (en) Web page rendering on wireless devices
KR20130065777A (ko) 인스펙터 스크립트 삽입을 통한 웹 콘텐츠 공유 장치 및 방법
US20150319215A1 (en) Methods for facilitating a remote interface and devices thereof
US20190146645A1 (en) Replaying event-based sessions between a user device and an agent device
WO2015024262A1 (zh) 一种网页页面处理方法及设备
RU2634221C2 (ru) Способ и устройство для отрисовки представления электронного документа на экране
Lomotey et al. Near real-time medical data dissemination in m-Health
US20190146807A1 (en) Establishing an event-based session between a user device and an agent device
CN117082124B (zh) 数据传送方法、装置、设备、介质及产品
Kim et al. Data exchange method for web-based collaboration system between smart devices
CN117348775A (zh) 通信控制方法及计算设备
CN117390312A (zh) 页面渲染方法、装置、设备、存储介质及程序产品
JP2010086459A (ja) 情報処理装置、制御方法及び制御プログラム
JP2015210721A (ja) 通信システムとデータ送受信方法とデータ送受信プログラム

Legal Events

Date Code Title Description
WWE Wipo information: entry into national phase

Ref document number: 2013887588

Country of ref document: EP

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

Ref document number: 13887588

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE