Looking for breakthrough ideas for innovation challenges? Try Patsnap Eureka!

Data transmission method and system based on WebSocket, and medium

A data transmission method and technology of a data transmission system, applied in the field of data transmission, can solve problems such as long headers, waste of bandwidth and other resources.

Pending Publication Date: 2021-03-26
CSSC SYST ENG RES INST
View PDF6 Cites 2 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0003] However, although the ajax-based polling request mechanism can effectively solve the data communication problem, this traditional mode has obvious disadvantages, that is, the browser needs to continuously send requests to the server, but HTTP requests may contain long headers. part, the real effective data may be only a small part, obviously this will waste a lot of bandwidth and other resources

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 transmission method and system based on WebSocket, and medium
  • Data transmission method and system based on WebSocket, and medium
  • Data transmission method and system based on WebSocket, and medium

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0020] The technical solutions of the present invention will be clearly and completely described below in conjunction with the accompanying drawings. Apparently, the described embodiments are some of the embodiments of the present invention, but not all of them. Based on the embodiments of the present invention, all other embodiments obtained by persons of ordinary skill in the art without making creative efforts belong to the protection scope of the present invention.

[0021] The first aspect of the present invention provides a data transmission method based on WebSocket, figure 2 It is a schematic diagram of a flow of a WebSocket-based data transmission method according to an embodiment of the present invention.

[0022] Such as figure 2 As shown, the flow begins with step S1, a WebSocket connection is established between the client and the server, wherein the client sends an HTTP request to the server, and the additional header information of the HTTP request includes a...

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 provides a data transmission method and system based on WebSocket, and a medium. The method comprises the following steps: S1, establishing WebSocket connection between a client and a server; S2, through the WebSocket connection, sending, by the client, a subscription request to the server according to a service demand so as to establish a subscription distribution relationship; andS3, receiving, by the client, subscription theme data pushed by the server, wherein the server pushes the subscription theme data based on the subscription distribution relationship. According to themethod, based on a dynamic message data subscription and distribution mechanism of a WebSocket protocol, the problem of synchronous sharing of data between a browser client and a server is solved, direct data exchange between a browser and the server is realized, and meanwhile, the overall response capability of the system and the real-time display effect of the system are improved.

Description

technical field [0001] The present invention relates to the field of data transmission, in particular to a WebSocket-based data transmission method, system and medium. Background technique [0002] With the development of Internet technology, in order to realize push technology, many websites usually use Ajax polling technology. Polling is at a specific time interval (such as every 1 second), the browser sends an HTTP request to the server, and then the server returns the latest data to the client's browser. In the target monitoring system based on WebGIS, it is often necessary to monitor the target position and status information in real time, and to warn the target's behavior to realize the supervision of the target. The polling request mechanism based on ajax can basically meet this requirement. [0003] However, although the ajax-based polling request mechanism can effectively solve the data communication problem, this traditional mode has obvious disadvantages, that is...

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
IPC IPC(8): H04L29/06H04L29/08H04L12/26
CPCH04L69/162H04L67/02H04L67/141H04L43/10H04L67/55
Inventor 程骏超张德胜张驰郭明瑞甄君
Owner CSSC SYST ENG RES INST
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Patsnap Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Patsnap Eureka Blog
Learn More
PatSnap group products