Data pushing method and system based on Websocket

A data push and non-push technology, applied in the field of network communication, can solve problems such as losing focus, unable to continue to process data normally, browser crashes, etc., to achieve the effect of avoiding crashes

Active Publication Date: 2018-09-07
杭州迪普信息技术有限公司
View PDF6 Cites 5 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0004] However, if the browser is minimized or switched to other applications, the page that is opened in the browser and establishes a WebSocket connection with the server will lose focus, and cannot continue to process and display the data pushed by the server normally
As time goes by, the amount of data pushed will gradually accumulate, making this page occupy more and more computer system resources, and may even cause the browser to crash

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Data pushing method and system based on Websocket
  • Data pushing method and system based on Websocket
  • Data pushing method and system based on Websocket

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0043] In order for those skilled in the art to better understand the technical solutions in the embodiments of this specification, the technical solutions in the embodiments of this specification will be described in detail below in conjunction with the drawings in the embodiments of this specification. Obviously, the described implementation Examples are only some of the embodiments in this specification, not all of them. All other embodiments obtained by persons of ordinary skill in the art based on the embodiments in this specification shall fall within the scope of protection.

[0044] With the popularization of the Internet, B / S architecture services are also increasingly widely used. In the functional design of B / S architecture, there is usually a need to display real-time data.

[0045]In the traditional implementation method, Javascript polling scheme can be used. After the page is loaded, the setInterval function of Javascript is used to periodically request new data...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

PUM

No PUM Login to view more

Abstract

The invention discloses a data pushing method based on Websocket, which is characterized by comprising the steps of: a browser monitors a focus case of a target page, wherein the target page is a browser page added into a server pushing queue; the browser sends a data pushing suspension notification of the target page to a server in a case of monitoring that the target page loses a focus; after receiving the suspension notification sent by the browser, the server suspends data pushing for the target page and records a pushed data position of the target page; the browser sends a data pushing recovery notification of the target page to the server in a case of monitoring that the target page acquires the focus; and after receiving the recovery notification sent by the browser, the server recovers data pushing of the target page after the pushed data position according to a preset recovery pushing rule.

Description

technical field [0001] The embodiments of this specification relate to the field of network communication technologies, and in particular to a Websocket-based data push method and system. Background technique [0002] In the service of B / S (Browser / Server, browser / server mode) architecture, the server can establish a WebSocket connection and push data to the browser page when new data is generated, thereby ensuring the real-time data displayed on the page. sex. [0003] After the browser page is loaded, a WebSocket connection is established with the server, and the server adds the page to the data push queue. When new data is generated, the server actively pushes the new data to each page in the queue. If the browser page is closed, the page will be removed from the data push queue, and the server will no longer push new data to the page. [0004] However, if the browser is minimized or switched to other applications, the page opened in the browser and establishing a WebS...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

Application Information

Patent Timeline
no application Login to view more
Patent Type & Authority Applications(China)
IPC IPC(8): H04L29/08G06F17/30
CPCH04L67/02H04L67/55
Inventor 李杰
Owner 杭州迪普信息技术有限公司
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products