CN109561014A - A kind of web instant communication method and system - Google Patents
A kind of web instant communication method and system Download PDFInfo
- Publication number
- CN109561014A CN109561014A CN201811250350.8A CN201811250350A CN109561014A CN 109561014 A CN109561014 A CN 109561014A CN 201811250350 A CN201811250350 A CN 201811250350A CN 109561014 A CN109561014 A CN 109561014A
- Authority
- CN
- China
- Prior art keywords
- websocket
- instant communication
- server
- communication client
- transfer server
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L51/00—User-to-user messaging in packet-switching networks, transmitted according to store-and-forward or real-time protocols, e.g. e-mail
- H04L51/04—Real-time or near real-time messaging, e.g. instant messaging [IM]
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/02—Protocols based on web technology, e.g. hypertext transfer protocol [HTTP]
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/14—Session management
- H04L67/141—Setup of application sessions
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L69/00—Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
- H04L69/16—Implementation or adaptation of Internet protocol [IP], of transmission control protocol [TCP] or of user datagram protocol [UDP]
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Computer Security & Cryptography (AREA)
- Information Transfer Between Computers (AREA)
Abstract
The invention discloses a kind of web instant communication method and systems, this method is applied to instant communication information interactive system, the system comprises browser, websocket transfer server, TCP server and instant communication clients, the page of the browser is embedded with webpage instant communication client, which comprises the websocket transfer server receives the interaction message that the webpage instant communication client is sent;The interaction message is transmitted to the TCP server by the websocket transfer server;The TCP server receives the interaction message, and the interaction message is sent to the instant communication client.The present invention realizes the interacting message between the instant messaging application in webpage instant communication client and terminal by arranging websocket transfer server and TCP server between webpage instant communication client and instant communication client.
Description
Technical field
The present invention relates to field of computer technology, in particular to a kind of web instant communication method and system.
Background technique
It is by IM (Instant Messaging, instant messaging) soft as instant messaging is using increasingly extensive
Part carries out information communication and has become a kind of important way that people carry out information interchange.Either in life or work, people
All can largely use IM software realization and friend, colleague and classmate, client etc. exchanges and communication so that IM software is gradually
As one of indispensable tool in user's daily life.Therefore, ease for use, stability, Yi Jian of the user to IM software
Full property etc. is proposed increasingly higher demands.Due to user demand and the continuous improvement of technology, user no longer office
It is limited on pc client using IM software, in mobile phone terminal, webIM client (the webpage instant communication client based on web
End), even in television terminal IM software similarly can be used, preferably meet the growing more scene multiple terminals of user
IM demand.
Wherein, the webIM client based on web, due to relying on the support of browser, realization process is unusual lightweight
, it is only necessary to there is browser that convenient instant messaging can be realized, therefore, the Instant Messenger carried out currently based on webIM client
It interrogates more and more extensive.But in the prior art based on webIM client carry out instant messaging when, can only webIM client it
Between carry out the interaction of message, cannot achieve the interacting message between the application of instant messaging in webIM client and terminal.
Accordingly, it is desirable to provide more reliable or more effective scheme, so as to realize webIM client based on web with
The interacting message between instant messaging application in terminal.
Summary of the invention
In order to solve problems in the prior art, the embodiment of the invention provides a kind of web instant communication method and systems.Institute
It is as follows to state technical solution:
On the one hand, a kind of web instant communication method is provided, the method is applied to web instant communicating system, the system packet
Browser, websocket transfer server, TCP server and instant communication client are included, the page of the browser is embedded with
Webpage instant communication client, which comprises
The websocket transfer server receives the interaction message that the webpage instant communication client is sent;
The interaction message is transmitted to the TCP server by the websocket transfer server;
The TCP server receives the interaction message, and the interaction message is sent to the instant communication client.
Further, the friendship that the webpage instant communication client is sent is received in the websocket transfer server
Before mutual message, the method also includes:
The browser sends the first connection request to the websocket transfer server;
The websocket transfer server receives first connection request, according to first connection request foundation and institute
State the Websocket transmission channel between browser.
Further, the websocket transfer server by the interaction message be transmitted to the TCP server it
Before, the method also includes:
The websocket transfer server obtains the identity of the webpage instant communication client;
The websocket transfer server sends the second connection request to the TCP server, in second connection request
Carry the identity of the webpage instant communication client;
The TCP server obtains the identity of the instant communication client;
The TCP server judges the identity of the instant communication client and the identity of the instant client terminal of the webpage
It identifies whether to match;
When the judging result, which is, is, the TCP server establishes the socket between the websocket transfer server
Transmission channel.
Further, before the interaction message is sent to the instant communication client by the TCP server, institute
State method further include:
The instant communication client sends third connection request to the TCP server;
The TCP server receives the third connection request, is established and the instant messaging according to the third connection request
Socket transmission channel between client.
Further, lead in the socket transmission that the TCP server is established between the websocket transfer server
After road, the method also includes:
The websocket transfer server sends heartbeat detection letter to the TCP server according to the first prefixed time interval
Number;
If the websocket transfer server does not receive what the TCP server returned in the second prefixed time interval
Heartbeat response signal, then the websocket transfer server sends the second connection request to the TCP server again.
On the other hand, a kind of web instant communicating system is provided, the system comprises browser, websocket transfers to take
Business device, TCP server and instant communication client, the page of the browser are embedded with webpage instant communication client, wherein
The webpage instant communication client, for sending interaction message to the websocket transfer server;
The websocket transfer server, the interaction message sent for receiving the webpage instant communication client, by institute
It states interaction message and is transmitted to the TCP server;
The interaction message is sent to the instant messaging client for receiving the interaction message by the TCP server
End.
Further, the browser, for sending the first connection request to the websocket transfer server;
The websocket transfer server is also used to receive first connection request, is built according to first connection request
Websocket transmission channel between the vertical and described browser.
Further, the websocket transfer server is also used to obtain the body of the webpage instant communication client
Part mark;The second connection request is sent to the TCP server, carries the webpage instant communication in second connection request
The identity of client;
The TCP server is also used to obtain the identity of the instant communication client;Judge the instant messaging client
Whether the identity at end matches with the identity of the instant client terminal of the webpage;When the judging result, which is, is, build
Socket transmission channel between the vertical and described websocket transfer server.
Further, the instant communication client sends third connection request for the TCP server;
The TCP server is also used to receive the third connection request, is with described according to third connection request foundation
When telecommunication customer end between socket transmission channel.
Further, the websocket transfer server is also used to according to the first prefixed time interval to the TCP
Server sends heartbeat detection signal;If not receiving the heartbeat that the TCP server returns in the second prefixed time interval
Response signal then sends the second connection request to the TCP server again.
Technical solution provided in an embodiment of the present invention has the benefit that
The present invention arranged between webpage instant communication client and instant communication client websocket transfer server and
TCP server carries out the interaction of message, instant messaging visitor between webpage instant communication client and websocket transfer server
The interaction that message is carried out between family end and TCP server, carries out the friendship of message between websocket transfer server and TCP server
Mutually, in this way, establishing webpage instant communication client and instant messaging by websocket transfer server and TCP server
Interaction message transmission channel between client, and then realize the instant messaging application in webpage instant communication client and terminal
Between interacting message.
Detailed description of the invention
To describe the technical solutions in the embodiments of the present invention more clearly, make required in being described below to embodiment
Attached drawing is briefly described, it should be apparent that, drawings in the following description are only some embodiments of the invention, for
For those of ordinary skill in the art, without creative efforts, it can also be obtained according to these attached drawings other
Attached drawing.
Fig. 1 is the architecture diagram of web instant communicating system provided in an embodiment of the present invention;
Fig. 2 is a kind of flow diagram of web instant communication method provided in an embodiment of the present invention;
Fig. 3 is the flow diagram of another kind web instant communication method provided in an embodiment of the present invention;
Fig. 4 is a kind of structural schematic diagram of server provided in an embodiment of the present invention;
Fig. 5 is a kind of structural schematic diagram of terminal provided in an embodiment of the present invention.
Specific embodiment
To make the object, technical solutions and advantages of the present invention clearer, below in conjunction with attached drawing to embodiment party of the present invention
Formula is described in further detail.
The embodiment of the invention provides a kind of web instant communication method and systems, by webpage instant communication client
Arrange websocket transfer server and TCP server between instant communication client, webpage instant communication client with
The interaction that message is carried out between websocket transfer server, carries out the friendship of message between instant communication client and TCP server
Mutually, the interaction that message is carried out between websocket transfer server and TCP server, in this way, being serviced by websocket transfer
Device and TCP server establish the interaction message transmission channel between webpage instant communication client and instant communication client, into
And realize the interacting message between the application of the instant messaging in webpage instant communication client and terminal.
It should be understood that the present invention is applied to web instant communicating system, referring to Fig. 1, it show offer of the embodiment of the present invention
Web instant communicating system architecture diagram.As shown in Figure 1, web instant communicating system includes browser 100, in websocket
Turn server 200, TCP server 300 and instant communication client 400, the page of browser 100 is embedded with webpage instant communication
Client 500, for example, the page can be embedded in the webpage of Ali Wang Wang etc i.e. when opening the page in a certain shop in Taobao
When telecommunication customer end, which can be, but not limited to water-drop-shaped
Shape.
In the web instant communicating system, instant communication client 400 is the instant messaging application journey of installation in the terminal
Sequence, such as the instant messaging application program can be, but not limited to wechat, QQ etc..Terminal can be the mobile terminals such as mobile phone, IPAD,
Can be PC (full name in English: Personal Computer, english abbreviation: PC).
Browser 100 can be attached with websocket transfer server 200 by network and be communicated, webpage Instant Messenger
News client end 500 can also be communicated by network with websocket transfer server 200.Websocket transfer service
Device 200 can be also attached with TCP server by network and be communicated.TCP server can also pass through network and instant messaging
Client is attached communication.Above-mentioned network can be cable network, be also possible to wireless network.
Websocket transfer server can be a server, be also possible to the server set comprising multiple servers
Group.TCP server can be a server, be also possible to the server cluster comprising multiple servers.
Referring to FIG. 2, its flow diagram for showing a kind of web instant communication method provided in an embodiment of the present invention,
Present description provides the method operating procedures as described in embodiment or flow chart, but based on routine or without creative labor
It may include more or less operating procedure.The step of enumerating in embodiment sequence is only in numerous step execution sequences
A kind of mode, do not represent and unique execute sequence.It, can be according to embodiment when system or end product in practice executes
Either method sequence shown in the drawings executes or executes (such as environment of parallel processor or multiple threads) parallel.Tool
Body it is as shown in Figure 2, which comprises
S201, the websocket transfer server receive the interaction message that the webpage instant communication client is sent.
In this specification embodiment, when user need by the webpage instant communication client of the embedding browser page to
When target instant communication client in terminal sends interaction message, it can trigger when editting interaction message and send instruction,
Browser, will be above-mentioned by the websocket transmission channel established with websocket transfer server in response to the triggering command
Interaction message is sent to websocket transfer server.
Correspondingly, websocket transfer server receives the interaction message that webpage instant communication client is sent.
The interaction message is transmitted to the TCP server by S203, the websocket transfer server.
In this specification embodiment, websocket transfer server disappears the interaction after receiving interaction message
Breath is sent to the TCP server that connection is established with instant communication client.
S205, the TCP server receive the interaction message, and the interaction message is sent to the instant messaging visitor
Family end.
In this specification embodiment, TCP server is receiving the interaction from the forwarding of websocket transfer server
After message, by the transmission channel established with instant communication client, which is sent to instant communication client.
Correspondingly, instant communication client receives the interaction message that TCP server is sent.
It can be seen that the embodiment of the present invention between webpage instant communication client and instant communication client by arranging
Websocket transfer server and TCP server carry out between webpage instant communication client and websocket transfer server
The interaction of message carries out the interaction of message, websocket transfer server and TCP between instant communication client and TCP server
The interaction that message is carried out between server, in this way, it is instant to establish webpage by websocket transfer server and TCP server
Interaction message transmission channel between telecommunication customer end and instant communication client, so realize webpage instant communication client with
The interacting message between instant messaging application in terminal.
Referring to FIG. 3, its process signal for showing another kind web instant communication method provided in an embodiment of the present invention
Figure, present description provides the method operating procedures as described in embodiment or flow chart, but based on conventional or without creativeness
Labour may include more or less operating procedure.The step of enumerating in embodiment sequence is only that numerous steps execution are suitable
One of sequence mode does not represent and unique executes sequence.It, can be according to reality when system or end product in practice executes
It applies example or method shown in the drawings sequence executes or parallel executes (such as the ring of parallel processor or multiple threads
Border).It is specific as shown in Figure 3, which comprises
S301, the browser send the first connection request to the websocket transfer server.
In this specification embodiment, when browser prepares for interaction message to be sent in response to triggering command
Before websocket transfer server, browser first to the first connection request of websocket transfer server, with establish with
The channel of websocket transfer server progress message transmission.
S303, the websocket transfer server receives first connection request, according to first connection request
Establish the Websocket transmission channel between the browser.
In this specification embodiment, websocket transfer server is asked in the first connection for receiving browser transmission
After asking, in response to first connection request, the Websocket transmission channel between browser is established.
Websocket transfer server completes the foundation of Websocket transmission channel by shaking hands with browser.
Websocket is the new network protocol of one kind based on TCP, it realizes browser and server full-duplex communication, allows to take
Device active transmission information of being engaged in is to browser.
S305, the websocket transfer server receive the interaction message that the webpage instant communication client is sent.
In this specification embodiment, when browser and websocket transfer server establish Websocket transmission channel
Later, interaction message can be sent in websocket by webpage instant communication client by the Websocket transmission channel
Turn server.Correspondingly, websocket transfer server receives the interaction message that webpage instant communication client is sent.
It should be noted that since what is established between websocket transfer server and browser is with bi-directional data biography
The Websocket transmission channel of transmission function, therefore, websocket transfer server can also be pushed actively to browser and be interacted
Message.
S307, the websocket transfer server obtain the identity of the webpage instant communication client.
In this specification embodiment, browser is sent to can in the first connection request of websocket transfer server
To carry the identity of the instant client terminal of webpage, websocket transfer server can directly acquire the first connection and ask
Ask the identity of middle carrying.Websocket transfer server can also actively send to browser and obtain webpage Instant Messenger visitor
The request of the identity at family end, browser return to corresponding identity and give websocket transfer service in response to the request
Device.
In this specification embodiment, the identity of webpage instant communication client be can be, but not limited to as user's login
The account information of webpage instant communication client.
S309, the websocket transfer server to the TCP server send the second connection request, described second
The identity of the webpage instant communication client is carried in connection request.
S311, the TCP server obtain the identity of the instant communication client.
In this specification embodiment, TCP server can send to instant communication client and obtain instant messaging client
The request of the identity at end, instant communication client return to corresponding identity to TCP server in response to the request.
In this specification embodiment, the identity of instant communication client can be, but not limited to log in for user instant
The account information of telecommunication customer end.
S313, the TCP server judge identity and the webpage Instant Messenger visitor of the instant communication client
Whether the identity at family end matches.
In this specification embodiment, when TCP server judging result be instant communication client identity with
The identity of webpage instant communication client matches, and thens follow the steps S315.
S315, the TCP server establish the socket transmission channel between the websocket transfer server.
In this specification embodiment, when the identity of instant communication client and the body of webpage instant communication client
When part mark matches, the socket transmission channel between TCP server and websocket transfer server is established, so as to
The bi-directional data between TCP server and websocket transfer server is allowed to transmit.
The interaction message is transmitted to the TCP server by S317, the websocket transfer server.
It should be noted that since the transmission channel between TCP server and websocket transfer server allows two-way number
According to transmitting, therefore, TCP server can also send interaction message to websocket transfer server.
Correspondingly, TCP server receives the interaction message.
In this specification embodiment, since interaction message is needed through TCP server and websocket transfer server
Transfer, accordingly, it is therefore desirable to maintain TCP server is connected with the heartbeat of both websocket transfer servers.Specifically,
Websocket transfer server can send heartbeat detection signal to the TCP server according to the first prefixed time interval, if
The heartbeat response signal that the TCP server returns is received in the second prefixed time interval, then shows to keep therebetween
Heartbeat connection shows if not receiving the heartbeat response signal that the TCP server returns in the second prefixed time interval
Connection between the two is already off, at this point, the websocket transfer server can be sent out to the TCP server again
The second connection request is sent, so that TCP server is established and websocket transfer server in response to second connection request
Between socket transmission channel.
It should be noted that above-mentioned first prefixed time interval and the second prefixed time interval can be according to the reality of network
Situation is configured, if the actual state of network is relatively good, the first prefixed time interval be can be set much longer, and second is pre-
If time interval can be set more shorter;Conversely, first prefixed time interval can if the actual state of network is not so good
With the more shorter of setting, the second prefixed time interval be can be set much longer.
S319, the instant communication client send third connection request to the TCP server.
S321, the TCP server receive the third connection request, according to the third connection request establish with it is described
Socket transmission channel between instant communication client.
After establishing socket transmission channel in this specification embodiment, between TCP server and instant communication client, i.e.,
The bidirectional data transfers between the two can be realized by the socket transmission channel.
It should be noted that above-mentioned steps S319-S321 is not limited to after step S317, it can also be in step
Before S317, this is not limited by the present invention.
The interaction message is sent to the instant communication client by S323, TCP server.
It should be noted that since the socket transmission channel established between TCP server and instant communication client can be with
Bidirectional data transfers are carried out, therefore, the interaction message that instant communication client can also be generated is sent to TCP server,
Then websocket transfer server is transmitted to by TCP server, websocket transfer server is further by interaction message
It is pushed to webpage instant communication client.
It can be seen that the embodiment of the present invention between webpage instant communication client and instant communication client by arranging
Websocket transfer server and TCP server carry out between webpage instant communication client and websocket transfer server
The interaction of message carries out the interaction of message, websocket transfer server and TCP between instant communication client and TCP server
The interaction that message is carried out between server, in this way, it is instant to establish webpage by websocket transfer server and TCP server
Interaction message transmission channel between telecommunication customer end and instant communication client, so realize webpage instant communication client with
The interacting message between instant messaging application in terminal.
One embodiment of the present of invention additionally provides a kind of web instant communicating system, as shown in Figure 1, the system includes clear
Look at device, websocket transfer server, TCP server and instant communication client, the page of the browser is embedded with webpage
Instant communication client, wherein
The webpage instant communication client, for sending interaction message to the websocket transfer server;
The websocket transfer server, the interaction message sent for receiving the webpage instant communication client, by institute
It states interaction message and is transmitted to the TCP server;
The interaction message is sent to the instant messaging client for receiving the interaction message by the TCP server
End.
In one embodiment of the invention, the browser, for sending the to the websocket transfer server
One connection request;
The websocket transfer server is also used to receive first connection request, is built according to first connection request
Websocket transmission channel between the vertical and described browser.
In one embodiment of the invention, the websocket transfer server, it is instant to be also used to obtain the webpage
The identity of telecommunication customer end;The second connection request is sent to the TCP server, carries institute in second connection request
State the identity of webpage instant communication client;
The TCP server is also used to obtain the identity of the instant communication client;Judge the instant messaging client
Whether the identity at end matches with the identity of the instant client terminal of the webpage;When the judging result, which is, is, build
Socket transmission channel between the vertical and described websocket transfer server.
In one embodiment of the invention, the instant communication client sends third for the TCP server and connects
Connect request;
The TCP server is also used to receive the third connection request, is with described according to third connection request foundation
When telecommunication customer end between socket transmission channel.
In one embodiment of the invention, the websocket transfer server, is also used to according to the first preset time
It is spaced to the TCP server and sends heartbeat detection signal;If not receiving the TCP service in the second prefixed time interval
The heartbeat response signal that device returns then sends the second connection request to the TCP server again.
It should be noted that client provided by the above embodiment or server, when realizing its function, only with above-mentioned each
The division progress of functional module can according to need and for example, in practical application by above-mentioned function distribution by different function
Energy module is completed, i.e., the internal structure of equipment is divided into different functional modules, to complete whole described above or portion
Divide function.In addition, client provided by the above embodiment or server and embodiment of the method belong to same design, implement
Process is detailed in embodiment of the method, and which is not described herein again.
Referring to Fig. 4, its structural schematic diagram for showing a kind of server provided in an embodiment of the present invention, which can
With the web instant communication method of the service end side for implementing to provide in above-described embodiment.Specifically, which can
Bigger difference is generated because configuration or performance are different, may include central processing unit (CPU) 401 including arbitrary access
The system storage 404 of memory (RAM) 402 and read-only memory (ROM) 403, and connection 404 He of system storage
The system bus 405 of central processing unit 401.The server 400 further includes between each device helped in computer
The basic input/output (I/O system) 406 of information is transmitted, and is used for storage program area 413,414 and of application program
The mass-memory unit 407 of other program modules 415.
The basic input/output 406 includes display 408 for showing information and inputs for user
The input equipment 409 of such as mouse, keyboard etc of information.Wherein the display 408 and input equipment 409 all pass through company
The input and output controller 410 for being connected to system bus 405 is connected to central processing unit 401.The basic input/output
406 can also include input and output controller 410 for receiving and handling from keyboard, mouse or electronic touch pen etc.
The input of multiple other equipment.Similarly, input and output controller 410 also provides output to display screen, printer or other classes
The output equipment of type.
The mass-memory unit 407 (is not shown by being connected to the bulk memory controller of system bus 405
It is connected to central processing unit 401 out).The mass-memory unit 407 and its associated computer-readable medium are clothes
Business device 400 provides non-volatile memories.That is, the mass-memory unit 407 may include such as hard disk or
The computer-readable medium (not shown) of CD-ROM driver etc.
Without loss of generality, the computer-readable medium may include computer storage media and communication media.Computer
Storage medium includes information such as computer readable instructions, data structure, program module or other data for storage
The volatile and non-volatile of any method or technique realization, removable and irremovable medium.Computer storage medium includes
RAM, ROM, EPROM, EEPROM, flash memory or other solid-state storages its technologies, CD-ROM, DVD or other optical storages, tape
Box, tape, disk storage or other magnetic storage devices.Certainly, skilled person will appreciate that the computer storage medium
It is not limited to above-mentioned several.Above-mentioned system storage 404 and mass-memory unit 407 may be collectively referred to as memory.
According to various embodiments of the present invention, the server 400 can also be arrived by network connections such as internets
Remote computer operation on network.Namely server 400 can be connect by the network being connected on the system bus 405
Mouth unit 411 is connected to network 412, in other words, Network Interface Unit 411 can be used also to be connected to other kinds of net
Network or remote computer system (not shown).
The memory further includes that one or more than one program, the one or more programs are stored in
In memory, and it is configured to be executed by one or more than one processor.Said one or more than one program include
For executing the instruction of the method for above-mentioned service end side.
Referring to Fig. 5, its structural schematic diagram for showing a kind of terminal provided in an embodiment of the present invention, the terminal is for real
The web instant communication method of the client-side provided in above-described embodiment is provided, specifically:
Terminal 500 may include RF(Radio Frequency, radio frequency) circuit 510, include one or more calculating
The memory 55 of machine readable storage medium storing program for executing, input unit 530, display unit 540, video sensor 550, voicefrequency circuit 560,
WiFi (wireless fidelity, Wireless Fidelity) module 570, the processing for including one or more than one processing core
The components such as device 580 and power supply 50.It will be understood by those skilled in the art that terminal structure shown in Fig. 5 was not constituted to end
The restriction at end may include perhaps combining certain components or different component layouts than illustrating more or fewer components.
Wherein:
RF circuit 510 can be used for receiving and sending messages or communication process in, signal sends and receivees, particularly, will be under base station
After row information receives, one or the processing of more than one processor 580 are transferred to;In addition, the data for being related to uplink are sent to base
It stands.In general, RF circuit 510 includes but is not limited to antenna, at least one amplifier, tuner, one or more oscillators, uses
Family identity module (SIM) card, transceiver, coupler, LNA(Low Noise Amplifier, low-noise amplifier), duplex
Device etc..In addition, RF circuit 510 can also be communicated with network and other equipment by wireless communication.The wireless communication can be with
Using any communication standard or agreement, including but not limited to GSM (Global System of Mobile communication,
Global system for mobile communications), GPRS (General Packet Radio Service, general packet radio service), CDMA
(Code Division Multiple Access, CDMA), WCDMA (Wideband Code Division
Multiple Access, wideband code division multiple access), LTE (Long Term Evolution, long term evolution), Email, SMS
(Short Messaging Service, short message service) etc..
Memory 520 can be used for storing software program and module, and processor 1480 is stored in memory by operation
520 software program and module, thereby executing various function application and data processing.Memory 520 can mainly include
Storing program area and storage data area, wherein storing program area can application journey needed for storage program area, at least one function
Sequence (such as sound-playing function, image player function etc.) etc.;Storage data area can be stored is created according to using for terminal 500
Data (such as video data, phone directory etc.) built etc..In addition, memory 520 may include high-speed random access memory,
It can also include nonvolatile memory, a for example, at least disk memory, flush memory device or other volatile solid-states are deposited
Memory device.Correspondingly, memory 520 can also include Memory Controller, to provide processor 580 and input unit 530
Access to memory 520.
Input unit 530 can be used for receiving the number or character information of input, and generate and user setting and function
It can control related keyboard, mouse, operating stick, optics or trackball signal input.Specifically, input unit 530 may include
Image input device 531 and other input equipments 532.Image input device 531 can be camera, be also possible to photoelectricity
Scanning device.In addition to image input device 531, input unit 530 can also include other input equipments 532.Specifically,
His input equipment 532 can include but is not limited to physical keyboard, function key (such as volume control button, switch key etc.), rail
One of mark ball, mouse, operating stick etc. are a variety of.
Display unit 540 can be used for showing information input by user or the information and terminal 500 that are supplied to user
Various graphical user interface, these graphical user interface can be by figure, text, icon, video and any combination thereof come structure
At.Display unit 540 may include display panel 541, optionally, can use LCD (Liquid Crystal Display, liquid
Crystal display), the forms such as OLED (Organic Light-Emitting Diode, Organic Light Emitting Diode) configure display surface
Plate 541.
Terminal 500 may include at least one video sensor 550, and video sensor is used to obtain the video information of user.
Terminal 500 can also include other sensor (not shown), such as optical sensor, motion sensor and other sensors.Tool
Body, optical sensor may include ambient light sensor and proximity sensor, wherein ambient light sensor can be according to ambient light
Light and shade adjusts the brightness of display panel 541, and proximity sensor can close display panel when terminal 500 is moved in one's ear
541 and/or backlight.As a kind of motion sensor, gravity accelerometer can detect (generally three in all directions
Axis) acceleration size, can detect that size and the direction of gravity when static, can be used to identify mobile phone posture application (such as
Horizontal/vertical screen switching, dependent game, magnetometer pose calibrating), Vibration identification correlation function (such as pedometer, tap) etc.;As for
The other sensors such as gyroscope, barometer, hygrometer, thermometer, infrared sensor that terminal 500 can also configure, herein not
It repeats again.
Video circuit 560, loudspeaker 561, microphone 562 can provide the video interface between user and terminal 500.
Electric signal after the audio data received conversion can be transferred to loudspeaker 561, by 561 turns of loudspeaker by voicefrequency circuit 560
It is changed to voice signal output;On the other hand, the voice signal of collection is converted to electric signal by microphone 562, by voicefrequency circuit
560 receive after be converted to audio data, then by after the processing of audio data output processor 580, through RF circuit 511 to send
It exports to memory 55 to such as another terminal, or by audio data to be further processed.Voicefrequency circuit 560 is also possible to
Including earphone jack, to provide the communication of peripheral hardware earphone Yu terminal 500.
WiFi belongs to short range wireless transmission technology, and terminal 500 can help user to receive and dispatch by WiFi module 570
Email, browsing webpage and access streaming video etc., it provides wireless broadband internet access for user.Although Fig. 5
WiFi module 570 is shown, but it is understood that, and it is not belonging to must be configured into for terminal 500, it completely can basis
It needs to omit within the scope of not changing the essence of the invention.
Processor 580 is the control centre of terminal 500, utilizes each portion of various interfaces and connection whole mobile phone
Point, by running or execute the software program and/or module that are stored in memory 520, and calls and be stored in memory
Data in 520 execute the various functions and processing data of terminal 500, to carry out integral monitoring to mobile phone.Optionally,
Processor 580 may include one or more processing cores;Preferably, processor 580 can integrate application processor and modulatedemodulate
Adjust processor, wherein the main processing operation system of application processor, user interface and application program etc., modem processor
Main processing wireless communication.It is understood that above-mentioned modem processor can not also be integrated into processor 580.
Terminal 500 further includes the power supply 50(such as battery powered to all parts), it is preferred that power supply can pass through electricity
Management system and processor 580 are logically contiguous, to realize management charging, electric discharge and power consumption by power-supply management system
The functions such as management.Power supply 50 can also include one or more direct current or AC power source, recharging system, power supply event
Hinder the random components such as detection circuit, power adapter or inverter, power supply status indicator.
Although being not shown, terminal 500 can also be including bluetooth module etc., and details are not described herein.
Specifically in the present embodiment, terminal 500 further includes having memory and one or more than one program,
In one perhaps more than one program be stored in memory and be configured to be executed by one or more than one processor.
Said one or more than one program include the finger for executing the web instant communication method of above method embodiment offer
It enables.
The embodiments of the present invention also provide a kind of storage medium, the storage medium may be disposed at terminal or server
Among to save a kind of instant communication information exchange method for realizing client-side in embodiment of the method or server side
Relevant at least one instruction, at least a Duan Chengxu, code set or instruction set, at least one instruction, an at least Duan Chengxu,
The code set or instruction set are loaded by the processor and are executed the instant messaging side web to realize above method embodiment offer
Method.
Optionally, in the present embodiment, above-mentioned storage medium can include but is not limited to: USB flash disk, read-only memory (ROM,
Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, magnetic disk or
The various media that can store program code such as CD.
It should be noted that, in this document, relational terms such as first and second and the like are used merely to a reality
Body or operation are distinguished with another entity or operation, are deposited without necessarily requiring or implying between these entities or operation
In any actual relationship or order or sequence.Moreover, the terms "include", "comprise" or its any other variant are intended to
Non-exclusive inclusion, so that process, method, article or device including a series of elements are not only wanted including those
Element, but also including other elements that are not explicitly listed, or further include for this process, method, article or device
Intrinsic element.In the absence of more restrictions, the element limited by sentence "including a ...", it is not excluded that
There is also other identical elements in process, method, article or device including the element.
The serial number of the above embodiments of the invention is only for description, does not represent the advantages or disadvantages of the embodiments.
Those of ordinary skill in the art will appreciate that realizing that all or part of the steps of above-described embodiment can pass through hardware
It completes, relevant hardware can also be instructed to complete by program, the program can store in a kind of computer-readable
In storage medium, storage medium mentioned above can be read-only memory, disk or CD etc..
The foregoing is merely presently preferred embodiments of the present invention, is not intended to limit the invention, it is all in spirit of the invention and
Within principle, any modification, equivalent replacement, improvement and so on be should all be included in the protection scope of the present invention.
Claims (10)
1. a kind of web instant communication method, which is characterized in that the method is applied to web instant communicating system, the system packet
Browser, websocket transfer server, TCP server and instant communication client are included, the page of the browser is embedded with
Webpage instant communication client, which comprises
The websocket transfer server receives the interaction message that the webpage instant communication client is sent;
The interaction message is transmitted to the TCP server by the websocket transfer server;
The TCP server receives the interaction message, and the interaction message is sent to the instant communication client.
2. web instant communication method according to claim 1, which is characterized in that in the websocket transfer server
Before receiving the interaction message that the webpage instant communication client is sent, the method also includes:
The browser sends the first connection request to the websocket transfer server;
The websocket transfer server receives first connection request, according to first connection request foundation and institute
State the Websocket transmission channel between browser.
3. web instant communication method according to claim 1, which is characterized in that in the websocket transfer server
Before the interaction message is transmitted to the TCP server, the method also includes:
The websocket transfer server obtains the identity of the webpage instant communication client;
The websocket transfer server sends the second connection request to the TCP server, in second connection request
Carry the identity of the webpage instant communication client;
The TCP server obtains the identity of the instant communication client;
The TCP server judges the identity of the instant communication client and the identity of the instant client terminal of the webpage
It identifies whether to match;
When the judging result, which is, is, the TCP server establishes the socket between the websocket transfer server
Transmission channel.
4. web instant communication method according to claim 1, which is characterized in that in the TCP server by the interaction
Message is sent to before the instant communication client, the method also includes:
The instant communication client sends third connection request to the TCP server;
The TCP server receives the third connection request, is established and the instant messaging according to the third connection request
Socket transmission channel between client.
5. web instant communication method according to claim 3, which is characterized in that the TCP server establish with it is described
After socket transmission channel between websocket transfer server, the method also includes:
The websocket transfer server sends heartbeat detection letter to the TCP server according to the first prefixed time interval
Number;
If the websocket transfer server does not receive what the TCP server returned in the second prefixed time interval
Heartbeat response signal, then the websocket transfer server sends the second connection request to the TCP server again.
6. a kind of web instant communicating system, which is characterized in that the system comprises browser, websocket transfer server,
TCP server and instant communication client, the page of the browser are embedded with webpage instant communication client, wherein
The webpage instant communication client, for sending interaction message to the websocket transfer server;
The websocket transfer server, the interaction message sent for receiving the webpage instant communication client, by institute
It states interaction message and is transmitted to the TCP server;
The interaction message is sent to the instant messaging client for receiving the interaction message by the TCP server
End.
7. web instant communicating system according to claim 6, which is characterized in that
The browser, for sending the first connection request to the websocket transfer server;
The websocket transfer server is also used to receive first connection request, is built according to first connection request
Websocket transmission channel between the vertical and described browser.
8. web instant communicating system according to claim 6, which is characterized in that
The websocket transfer server is also used to obtain the identity of the webpage instant communication client;To described
TCP server sends the second connection request, and the identity of the webpage instant communication client is carried in second connection request
Mark;
The TCP server is also used to obtain the identity of the instant communication client;Judge the instant messaging client
Whether the identity at end matches with the identity of the instant client terminal of the webpage;When the judging result, which is, is, build
Socket transmission channel between the vertical and described websocket transfer server.
9. web instant communicating system according to claim 6, which is characterized in that the instant communication client is used for institute
It states TCP server and sends third connection request;
The TCP server is also used to receive the third connection request, is with described according to third connection request foundation
When telecommunication customer end between socket transmission channel.
10. web instant communicating system according to claim 8, which is characterized in that the websocket transfer server,
It is also used to send heartbeat detection signal to the TCP server according to the first prefixed time interval;If between the second preset time
Every the interior heartbeat response signal for not receiving the TCP server and returning, then the second connection is sent to the TCP server again
Request.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811250350.8A CN109561014A (en) | 2018-10-25 | 2018-10-25 | A kind of web instant communication method and system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811250350.8A CN109561014A (en) | 2018-10-25 | 2018-10-25 | A kind of web instant communication method and system |
Publications (1)
Publication Number | Publication Date |
---|---|
CN109561014A true CN109561014A (en) | 2019-04-02 |
Family
ID=65865216
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201811250350.8A Pending CN109561014A (en) | 2018-10-25 | 2018-10-25 | A kind of web instant communication method and system |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109561014A (en) |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110474976A (en) * | 2019-08-09 | 2019-11-19 | 深圳市智莱科技股份有限公司 | A kind of message transfer method, apparatus, storage medium and system applied to automatic vending equipment |
CN113055747A (en) * | 2021-03-29 | 2021-06-29 | 重庆锐明信息技术有限公司 | Cross-browser integration system based on video client |
CN113064158A (en) * | 2021-03-17 | 2021-07-02 | 中国有色金属长沙勘察设计研究院有限公司 | Engineering disaster intelligent monitoring radar communication system based on double middleware |
CN113259225A (en) * | 2021-05-13 | 2021-08-13 | 杭州米络星科技(集团)有限公司 | Instant messaging method, server and instant messaging system |
CN113572678A (en) * | 2021-06-30 | 2021-10-29 | 中企云链(北京)金融信息服务有限公司 | Instant messaging method realized based on websocket |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1719823A (en) * | 2004-07-08 | 2006-01-11 | 腾讯科技(深圳)有限公司 | Method for directly alternating information with instant communication system on web page |
CN102655481A (en) * | 2011-03-04 | 2012-09-05 | 腾讯科技(深圳)有限公司 | Webpape-based instant messaging chat content looking-up method and system |
US8904168B1 (en) * | 2005-08-11 | 2014-12-02 | Aaron Emigh | Email link rewriting with verification of link destination |
CN105634929A (en) * | 2016-02-18 | 2016-06-01 | 浪潮软件集团有限公司 | Instant messaging method and device based on web page |
CN105704008A (en) * | 2015-12-31 | 2016-06-22 | 北京奇艺世纪科技有限公司 | Webpage instant messaging method, system and terminal |
CN106936698A (en) * | 2017-04-13 | 2017-07-07 | 合肥市群智科技有限公司 | A kind of pc ends instant messaging application process based on websocket |
-
2018
- 2018-10-25 CN CN201811250350.8A patent/CN109561014A/en active Pending
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1719823A (en) * | 2004-07-08 | 2006-01-11 | 腾讯科技(深圳)有限公司 | Method for directly alternating information with instant communication system on web page |
US8904168B1 (en) * | 2005-08-11 | 2014-12-02 | Aaron Emigh | Email link rewriting with verification of link destination |
CN102655481A (en) * | 2011-03-04 | 2012-09-05 | 腾讯科技(深圳)有限公司 | Webpape-based instant messaging chat content looking-up method and system |
CN105704008A (en) * | 2015-12-31 | 2016-06-22 | 北京奇艺世纪科技有限公司 | Webpage instant messaging method, system and terminal |
CN105634929A (en) * | 2016-02-18 | 2016-06-01 | 浪潮软件集团有限公司 | Instant messaging method and device based on web page |
CN106936698A (en) * | 2017-04-13 | 2017-07-07 | 合肥市群智科技有限公司 | A kind of pc ends instant messaging application process based on websocket |
Cited By (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110474976A (en) * | 2019-08-09 | 2019-11-19 | 深圳市智莱科技股份有限公司 | A kind of message transfer method, apparatus, storage medium and system applied to automatic vending equipment |
CN110474976B (en) * | 2019-08-09 | 2022-09-16 | 深圳市智莱科技股份有限公司 | Message transfer method, device, storage medium and system applied to automatic vending equipment |
CN113064158A (en) * | 2021-03-17 | 2021-07-02 | 中国有色金属长沙勘察设计研究院有限公司 | Engineering disaster intelligent monitoring radar communication system based on double middleware |
CN113055747A (en) * | 2021-03-29 | 2021-06-29 | 重庆锐明信息技术有限公司 | Cross-browser integration system based on video client |
CN113259225A (en) * | 2021-05-13 | 2021-08-13 | 杭州米络星科技(集团)有限公司 | Instant messaging method, server and instant messaging system |
CN113259225B (en) * | 2021-05-13 | 2022-06-28 | 杭州米络星科技(集团)有限公司 | Instant messaging method, server and instant messaging system |
CN113572678A (en) * | 2021-06-30 | 2021-10-29 | 中企云链(北京)金融信息服务有限公司 | Instant messaging method realized based on websocket |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US10834237B2 (en) | Method, apparatus, and storage medium for controlling cooperation of multiple intelligent devices with social application platform | |
CN109561014A (en) | A kind of web instant communication method and system | |
CN104618217B (en) | Share method, terminal, server and the system of resource | |
CN108108007B (en) | A kind of processing method and mobile terminal reducing power consumption | |
JP6557741B2 (en) | Picture combining method, terminal, and picture combining system | |
CN105471704B (en) | A kind of method, apparatus and system for realizing more people's calls | |
CN110166439B (en) | Equipment sharing method, terminal, router and server | |
CN103414814A (en) | Picture processing method and device and terminal device | |
CN108924037A (en) | A kind of display methods and mobile terminal of rich media communications RCS message | |
CN106101776B (en) | Method, smart machine and the speaker of volume adjustment | |
CN106681860B (en) | A kind of data back up method and data backup device | |
CN104657203A (en) | Task execution method, device and system | |
CN108089928B (en) | Terminal control method and device | |
WO2018040813A1 (en) | Audio/video communication method, terminal, server, and storage medium | |
CN103399633A (en) | Wireless remote control method and mobile terminal | |
CN110062372A (en) | A kind of SIM card control method and terminal device | |
CN109327672A (en) | A kind of video call method and terminal | |
CN103491421B (en) | Content displaying method, device and intelligent television | |
CN103200077B (en) | The method of data interaction during a kind of voice call, Apparatus and system | |
CN109495769A (en) | Video communication method, terminal, smart television, server and storage medium | |
CN106131402B (en) | A kind of self-shooting bar, photographic method and self-heterodyne system | |
CN108009658A (en) | A kind of subscription services information acquisition method, apparatus and system | |
WO2014183439A1 (en) | Method, apparatus and system for switching function mode | |
CN109982273A (en) | A kind of information replying method and mobile terminal | |
CN109729582A (en) | Information interacting method, device and computer readable storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20190402 |