Webpage instant chatting method and apparatus based on websocket

A webpage and server technology, applied in the computer field, can solve problems such as poor user experience, poor webpage chat tool experience, passive server, etc., to achieve the effect of improving user experience and reducing memory consumption

Inactive Publication Date: 2018-02-09
福建中金在线信息科技有限公司
View PDF4 Cites 5 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

When people use webpage chat tools to chat through different webpages, firstly, they need to initiate a request to the server through the webpage where they are located, and then, after the server responds to the request, the server will send a message to the relevant webpage. The "request-response" processing thinking that is often said in the application realizes the simplex communication method between the web page and the server, but the server is relatively passive
Moreover, in some usage scenarios, to implement webpage chat, it is necessary to use the Ajax polling method. When using the polling method for webpage chat, it is necessary to monitor each webpage participating in the chat in real time, which takes up a large IO overhead. "Reporting" to the server as the web page responds
Therefore, currently existing webpage chat tools all waste webpage resources, resulting in poor user experience
[0004] To sum up, there is currently no effective solution to the problem of poor experience in the application process of web chat tools

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
  • Webpage instant chatting method and apparatus based on websocket
  • Webpage instant chatting method and apparatus based on websocket
  • Webpage instant chatting method and apparatus based on websocket

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0056] see figure 1 The webpage instant chat method based on websocket proposed in this embodiment specifically includes the following steps:

[0057] Step S101: Select an unoccupied port number in the server, and execute a script command through the port number.

[0058] Step S102: modify the configuration in the webpage, where the configuration is a connection label corresponding to the server.

[0059] Step S103: Loading the websocket protocol in the webpage to realize full-duplex communication between the server and the webpage.

[0060] The above-mentioned steps will be described in detail below. In the above-mentioned step S101, the server is a special-purpose computer, which itself has multiple ports for connecting to various external devices that have a communication relationship with it. Especially when the server communicates with multiple external devices, the server needs to monitor each external device in real time through different ports. In this method of web...

Embodiment 2

[0080] see figure 2 , image 3 and Figure 4 , the present embodiment provides a webpage instant chat device based on websocket including: a service execution module 1, a webpage configuration module 2 and a communication module 3 connected in sequence, the service execution module 1 is used to select an unoccupied port number in the server, and, Execute the script command through the port number, the webpage configuration module 2 is used to modify the configuration in the webpage, wherein the configuration is the connection label corresponding to the server, and the communication module 3 is used to load the websocket protocol in the webpage to realize the full duplex between the server and the webpage communication.

[0081] Above-mentioned webpage configuration module 2 comprises: search unit 21 is used for searching the connection label corresponding to server in the webpage, and wherein, connection label comprises IP number and webpage port number, and the first modif...

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 webpage instant chatting method and apparatus based on websocket, and relates to the technical field of computers. The webpage instant chatting method based on websocket comprises the following steps: firstly, selecting an unoccupied port number in a server, and executing a script command via the port number, then modifying the configuration in a webpage, wherein the configuration is a connection mark number corresponding to the server, loading a websocket protocol in a webpage, achieving full-duplex communication between the server and the webpage on the basis of thewebsocket protocol, and the original request-response processing mode is changed by the processing process, the active interaction with the webpage by the server is achieved, and thus the user experience is improved in a webpage interaction process.

Description

technical field [0001] The invention relates to the field of computer technology, in particular to a web socket-based instant chat method and device. Background technique [0002] With the development of science and technology, Internet technology is widely used in people's work and life. People all over the world can realize instant communication through Internet technology. For example, people can use mail services to realize business "letters" exchanges with each other; people can use instant chat tools to realize "face-to-face" contact with each other, and so on. [0003] Of course, the most widely used in the Internet age is that people can enter the same website at the same time to communicate. With the development of Internet technology today, HTML5 has gradually invaded every web chat tool. At present, there are many web chat tools on the market, some are based on java, some are based on C, and the code volume of these languages ​​​​is larger than that of php. man...

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): H04L12/58H04L29/06H04L29/08
CPCH04L51/04H04L67/02H04L67/141H04L69/162
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