CN104243281B - Voice communication method based on mobile internet - Google Patents

Voice communication method based on mobile internet Download PDF

Info

Publication number
CN104243281B
CN104243281B CN201410412680.8A CN201410412680A CN104243281B CN 104243281 B CN104243281 B CN 104243281B CN 201410412680 A CN201410412680 A CN 201410412680A CN 104243281 B CN104243281 B CN 104243281B
Authority
CN
China
Prior art keywords
client
server
session
media server
message
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.)
Active
Application number
CN201410412680.8A
Other languages
Chinese (zh)
Other versions
CN104243281A (en
Inventor
郑俊鑫
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangzhou Huaduo Network Technology Co Ltd
Original Assignee
Guangzhou Huaduo Network Technology Co Ltd
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 Guangzhou Huaduo Network Technology Co Ltd filed Critical Guangzhou Huaduo Network Technology Co Ltd
Priority to CN201410412680.8A priority Critical patent/CN104243281B/en
Publication of CN104243281A publication Critical patent/CN104243281A/en
Application granted granted Critical
Publication of CN104243281B publication Critical patent/CN104243281B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Telephonic Communication Services (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

Disclose a kind of voice communication method based on mobile Internet, long connection of the client with signal server communication using websocket communication protocols, client can actively transfer data to other side with server, and avoid frequently creating TCP requests and destroy request, the occupancy of network bandwidth resources is reduced, while also saves server resource.Meanwhile client is packed with server communication message using efficient serializing storehouse msgpack, reduces the size of transmission message.Client is initiated and whose call, one session is directly created to each side that needs are conversed by server, and the session mark is sent to all clients in session, each client receives session mark again in server registration, succeeding in registration can be conversed by server, reduce the protocol interaction in talkthrough.

Description

Voice communication method based on mobile Internet
Technical field
The invention belongs to mobile Internet speech communication field, leads to more particularly to a kind of voice based on mobile Internet Letter method.
Background technology
With the development of instant messaging technology, instant communicating system also has in addition to possessing basic instant communication function Other many additional functions, such as voice call function.Voice communication, which is carried out, using instant communicating system has become mass society One of tool of communications used in masses, but existing voice communication, interact between client and server time during connection Number is more, and TCP connections are established and destruction number is relatively more, and the message sent is uncompressed, causes network bandwidth resources and service The waste of device resource.
The content of the invention
It is an object of the invention to provide a kind of voice communication method based on mobile Internet.
According to the present invention, there is provided a kind of voice communication method based on mobile Internet, including:Client and signalling service Device establishes the first communication port so that any one in client and signal server actively transfers data to client and signaling Another in server;Client establishes the second communication port with media server so that media server is according to client Data transfer requested.
Preferably, in the voice communication method, first communication port is based on WebSocket agreements.
Preferably, in the voice communication method, second communication port is based on udp protocol.
Preferably, in the voice communication method, establishing between the first communication port and the second communication port, also wrapping Include:Client sends call request by the first communication port to signal server;Signal server passes through the first communication port A session is created for client, and the session identification is sent to all clients in session.
Preferably, in the voice communication method, after the second communication port is established, further include:Client receives Session identification, and log-on message is sent to media server, the log-on message includes session identification and user identifier;Media take Business device receives registration message, and returns to the mark that succeeds in registration to client;Client forwards speech message by media server, The speech message includes voice content, session identification and user identifier.
Preferably, in the voice communication method, media server receives registration message, and returns and register to client Success flag includes:Media server receives registration message, establishes session list;Media server obtains the corresponding net of client Network address, and add session list;Media server returns to the mark that succeeds in registration to client.
Preferably, in the voice communication method, client forwards speech message to include by media server:Client After termination receives the mark that succeeds in registration, speech message is sent to media server;Speech message is sent to meeting by media server Talk about other clients in list;Client receives and plays the speech message of media server transmission.
Preferably, in the voice communication method, the message transmitted between the client and signal server is using high The serializing storehouse packing of effect.
Voice communication method based on mobile Internet according to the present invention, client are used with signal server communication The long connection of websocket communication protocols, client can actively transfer data to other side with server, and avoid frequently creating Build TCP requests and destroy request, reduce the occupancy of network bandwidth resources, while also save server resource.Meanwhile client with Server communication message is using efficient serializing storehouse msgpack packings, the size of reduction transmission message.Client is initiated and who Call, directly a session is created by server to each side that needs are conversed, and the session mark is sent to the institute in session There is client, each client receives session mark again in server registration, and succeeding in registration can be conversed by server, be reduced Protocol interaction in talkthrough.
Brief description of the drawings
Fig. 1 is the flow chart according to the voice communication method based on mobile Internet of the embodiment of the present invention,
Fig. 2 is the data control schematic diagram of the voice communication method according to embodiments of the present invention based on mobile Internet.
Embodiment
Following discloses provide many different embodiments or example to implement the different characteristic of the application.Describe below Component or the specific embodiment of arrangement are to simplify the present invention.Certainly, these are only that example is not intended to limit the present invention.
In addition, in the specification and in the claims, term " first ", " second " etc. are used to carry out between analogous element Distinguish, and if the order of time sequencing, spatial order, hierarchal order or any other mode may not be described, should be appreciated that These terms used are interchangeable under appropriate environment, and the embodiment of the present invention described herein can be to be described herein Or other beyond showing sequentially operate.
It should be noted that the term " comprising " used in detail in the claims should not be construed as limited to hand listed below Section, it is not precluded from other elements or step.Thus, it should be interpreted specify such as relating to the feature, numeral, step Or the presence of component, but it is not excluded that the presence of one or more other features, numeral, step or components or its combination Or addition.Therefore, the scope of word " equipment for including device A and B " should not be limited to the device being only made of component A and B. This means for the present invention, the associated component of equipment is A and B.
The reference to " one embodiment " or " embodiment " means that combining the embodiment describes throughout this manual A particular feature, structure, or characteristic include at least one embodiment of the present invention.Thus, everywhere occur in specification The phrase " in one embodiment " is not necessarily all referring to the same embodiment " in embodiment ", but may be so.In addition, root Disclosed according to the present invention it will be readily apparent to one skilled in the art that in one or more embodiments, special characteristic, knot Structure or characteristic can combine in any suitable manner.
Below in conjunction with the attached drawing in the embodiment of the present invention, the technical solution in the embodiment of the present invention is carried out clear, complete Site preparation describes, it is clear that described embodiment is only part of the embodiment of the present invention, instead of all the embodiments.It is based on Embodiment in the present invention, those of ordinary skill in the art are obtained every other without creative efforts Embodiment, belongs to the scope of protection of the invention.
In the embodiment described below, the session between two clients is described, but the present invention is not limited only to Two clients, can be multiple client simultaneous sessions.The present embodiment is detailed using customer end A and customer end B as client The description present invention.Client be, for example, smart mobile phone, tablet computer, notebook and desktop computer on any one should With.
Fig. 1 is according to the flow chart of the voice communication method based on mobile Internet of the embodiment of the present invention, the method Including:
S1, client and signal server establish the first communication port so that any in client and signal server It is a actively to transfer data to another in client and signal server;
S2, client send call request by the first communication port to signal server;
S3, signal server create a session for client by the first communication port, and the session identification are sent To all clients in session.
S4, client and media server establish the second communication port so that media server is according to the request of client Transmit data.
In the present embodiment, WebSocket is based on by the first communication port of foundation between client and signal server Agreement.WebSocket agreements are a kind of new agreements (protocol) of HTML5.Based on WebSocket agreements, client kimonos Business device only needs to do an action shaken hands, and then, between client and server is formed an express passway, both Between just can directly realize that data transmit mutually in real time.WebSocket agreements can be such that client leads to server full duplex Letter, i.e., client can actively transfer data to server, and server can also actively transfer data to client.Client with The second communication port that media server is established is based on udp protocol.
Signal server creates a session, specifically, customer end A and client by the first communication port for client B sends call request to signal server, and signal server receives call request, and establishes one for customer end A and customer end B Session, and session identification callid is sent to customer end A and customer end B.Media server leads to according to the request of client Cross the second communication port transmission data.
S5, client receive session identification, and send log-on message to media server, and the log-on message includes session Mark and user identifier.
S6, media server receive registration message, and return to the mark that succeeds in registration to client.
In the present embodiment, after media server receives client transmission registration message, client in registration message is obtained Corresponding session identification and user identifier, session list is established according to the registration message, is then returned and is succeeded in registration to client Message.Specifically include:Media server receives registration message, establishes session list;It is corresponding that media server obtains client Network address, and add session list;Media server returns to the mark that succeeds in registration to client.
Specifically, after customer end A and customer end B receive the session identification callid of signal server transmission, to media Server sends registration message, which includes session identification callid and user identifier userid.Media server connects After receiving registration message, the session list of client is established, and obtains customer end A and the corresponding network address of customer end B, is remembered in the lump Record is in session list, and after succeeding in registration, the mark that succeeds in registration is returned to customer end A and customer end B.
S7, client forward speech message by media server, and the speech message includes voice content, session identification And user identifier.
In the present embodiment, after client receives the mark that succeeds in registration, speech message is sent to media server;Media Speech message is sent to other clients in session list by server;Client receives and plays media server transmission Speech message.
On the basis of above-described embodiment, the message transmitted between the client and signal server and media server is adopted Packed with efficient serializing storehouse.
Fig. 2 is the data control schematic diagram of the voice communication method according to embodiments of the present invention based on mobile Internet, Specifically, customer end A and customer end B send session request to signal server, signal server is customer end A and customer end B A common session is established, which has a session identification callid, which is returned to customer end A and client Session identification and the user identifier userid of itself are packaged as registration message and are sent to media by B, customer end A and customer end B Server is registered, and media server obtains session identification and user identifier in registration message, and customer end A and client Hold the network address of B, it will words mark, user identifier, network address, which correspond, establishes session list.Succeed in registration at this time, Customer end A and customer end B can be conversed, and the speech message of each terminal transmission is forwarded by media server.The voice disappears Breath includes voice content, session identification and user identifier.
Voice communication method based on mobile Internet according to the present invention, client are used with signal server communication The long connection of websocket communication protocols, client can actively transfer data to other side with server, and avoid frequently creating Build TCP requests and destroy request, reduce the occupancy of network bandwidth resources, while also save server resource.Meanwhile client with Server communication message is using efficient serializing storehouse msgpack packings, the size of reduction transmission message.Client is initiated and who Call, directly a session is created by server to each side that needs are conversed, and the session mark is sent to the institute in session There is client, each client receives session mark again in server registration, and succeeding in registration can be conversed by server, be reduced Protocol interaction in talkthrough.
Above-described embodiment is the citing of the present invention, although disclosing the embodiment of the present invention and attached drawing for the purpose of illustration, But it will be appreciated by those skilled in the art that:Without departing from the spirit and scope of the invention and the appended claims, respectively It is all possible that kind, which is replaced, changed and modifications,.Therefore, the present invention should not be limited to embodiment and attached drawing disclosure of that.

Claims (3)

1. a kind of voice communication method based on mobile Internet, including:
Client establishes the first communication port with signal server so that any one in client and signal server actively passes Data are sent to another in client and signal server;
Client sends call request by the first communication port to signal server;
Signal server creates a session by the first communication port for client, and the session identification is sent in session All clients;
Client establishes the second communication port with media server so that media server transmits number according to the request of client According to,
Client receives session identification, and sends log-on message to media server, the log-on message include session identification and User identifier;
Media server receives registration message, establishes session list;
Media server obtains the corresponding network address of client, and adds session list;
Media server returns to the mark that succeeds in registration to client;
Client forwards speech message by media server, and the speech message includes voice content, session identification and user Mark;
Wherein, first communication port is based on WebSocket agreements,
The message transmitted between the client and signal server is using the packing of efficient serializing storehouse.
2. voice communication method according to claim 1, wherein second communication port is based on udp protocol.
3. voice communication method according to claim 1, wherein, client forwards speech message bag by media server Include:
After client receives the mark that succeeds in registration, speech message is sent to media server;
Speech message is sent to other clients in session list by media server;
Client receives and plays the speech message of media server transmission.
CN201410412680.8A 2014-08-20 2014-08-20 Voice communication method based on mobile internet Active CN104243281B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410412680.8A CN104243281B (en) 2014-08-20 2014-08-20 Voice communication method based on mobile internet

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410412680.8A CN104243281B (en) 2014-08-20 2014-08-20 Voice communication method based on mobile internet

Publications (2)

Publication Number Publication Date
CN104243281A CN104243281A (en) 2014-12-24
CN104243281B true CN104243281B (en) 2018-04-27

Family

ID=52230671

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410412680.8A Active CN104243281B (en) 2014-08-20 2014-08-20 Voice communication method based on mobile internet

Country Status (1)

Country Link
CN (1) CN104243281B (en)

Families Citing this family (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106297791B (en) * 2016-08-25 2020-08-18 Tcl科技集团股份有限公司 Whole-process voice implementation method and system
CN106357697A (en) * 2016-11-14 2017-01-25 威创软件南京有限公司 Multi-terminal page synchronizing method based on WebSocket attribute synchronization
CN109462735A (en) * 2018-12-24 2019-03-12 苏州华兴源创科技股份有限公司 Terminal, video calling control system and method
CN112653656B (en) * 2019-10-12 2022-06-07 华为云计算技术有限公司 Data communication method and device based on application layer protocol
CN110943910A (en) * 2019-12-10 2020-03-31 杭州当虹科技股份有限公司 WebSocket-based interphone implementation method
CN111385666B (en) * 2020-03-04 2022-06-03 北京字节跳动网络技术有限公司 Communication link establishing method, device, equipment and storage medium
CN112153224B (en) * 2020-09-22 2021-11-26 上海博泰悦臻电子设备制造有限公司 Vehicle data sending and acquiring method and related equipment
CN112583638A (en) * 2020-11-25 2021-03-30 新浪网技术(中国)有限公司 Websocket-based voice alarm method and system
CN113542260B (en) * 2021-07-12 2023-05-09 宏图智能物流股份有限公司 Voice transmission method for warehouse based on distribution mode
CN113747100B (en) * 2021-08-24 2024-01-23 深圳Tcl新技术有限公司 Audio and video call method and device, storage medium and electronic equipment
CN114373449A (en) * 2022-01-18 2022-04-19 海信电子科技(武汉)有限公司 Intelligent device, server and voice interaction method

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102843784A (en) * 2012-08-13 2012-12-26 北京小米科技有限责任公司 Call access method, equipment and system
CN103546584A (en) * 2013-11-13 2014-01-29 深圳市中兴移动通信有限公司 Information pushing method and system
CN103874019A (en) * 2014-03-11 2014-06-18 腾讯科技(深圳)有限公司 Voice interaction method and device
CN103957135A (en) * 2014-04-24 2014-07-30 北京佳讯飞鸿电气股份有限公司 Method for no-break conversation in IP address switching process
CN103986695A (en) * 2014-04-23 2014-08-13 广州华多网络科技有限公司 Method and device for controlling speech session

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102843784A (en) * 2012-08-13 2012-12-26 北京小米科技有限责任公司 Call access method, equipment and system
CN103546584A (en) * 2013-11-13 2014-01-29 深圳市中兴移动通信有限公司 Information pushing method and system
CN103874019A (en) * 2014-03-11 2014-06-18 腾讯科技(深圳)有限公司 Voice interaction method and device
CN103986695A (en) * 2014-04-23 2014-08-13 广州华多网络科技有限公司 Method and device for controlling speech session
CN103957135A (en) * 2014-04-24 2014-07-30 北京佳讯飞鸿电气股份有限公司 Method for no-break conversation in IP address switching process

Also Published As

Publication number Publication date
CN104243281A (en) 2014-12-24

Similar Documents

Publication Publication Date Title
CN104243281B (en) Voice communication method based on mobile internet
CN103650458B (en) The transmission method of Media Stream, device and system
EP3223481A1 (en) Packet processing method and device
CN102638582B (en) Data communicating method and communication end
CN103535004B (en) Method for promoting anonymity audio and video communication and system based on web
US20170034149A1 (en) Intelligent Communications Method, Terminal, and System
US20210273981A1 (en) Method for establishing a communication connection which is suitable for transmitting media streams between a first rtc client and a second rtc client
CN104486327B (en) Communication means and client between the page and long connection server
CN105847108B (en) Communication means and device between container
CN104283760A (en) Method, related device and system for WebRTC communication
CN108259542A (en) The transmission method and device of resource
CN102845123A (en) Virtual private cloud connection method and tunnel proxy server
CN103929438B (en) Firewall traversal method, equipment and system based on web page browser communication
CN111092802A (en) Message interaction method, sending equipment and receiving equipment
CN109688364A (en) Video-meeting method, device, server and storage medium
CN109417548A (en) High efficiency of transmission of the packaged media flow in the transport layer based on datagram
CN103379182A (en) Data transmission method and client sides
CN102882772A (en) Instant messaging data transmission method, client, server and system
CN102315918B (en) Method and device for intercommunicating TCP (Transmission Control Protocol) connection with SCTP (Stream Control Transmission Protocol) connection
CN203504603U (en) Server configuration of mobile Internet voice community
CN105591879B (en) Data transmission method and device
CN107409047A (en) Encrypt the coordinate packet delivering of session
CN105634911B (en) Session establishing method and device
CN106535145A (en) Short message transmission method, short message transmission device, terminal and application server
CN105814853B (en) Qos method for improving, apparatus and system

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
TA01 Transfer of patent application right

Effective date of registration: 20180320

Address after: 511442 Guangzhou City, Guangdong Province, Panyu District, South Village, Huambo, No. 79, No. two road, Business District Wanda Commercial Plaza, North building, B-1 floor, floor

Applicant after: Guangzhou Huaduo Network Technology Co., Ltd.

Address before: 100020 7 layer 710, No. 39, Chaoyang District diazepam Road, Beijing

Applicant before: BEIJING BILING ONLINE INFORMATION TECHNOLOGY CO., LTD.

TA01 Transfer of patent application right
GR01 Patent grant
GR01 Patent grant
EE01 Entry into force of recordation of patent licensing contract

Application publication date: 20141224

Assignee: GUANGZHOU CUBESILI INFORMATION TECHNOLOGY Co.,Ltd.

Assignor: GUANGZHOU HUADUO NETWORK TECHNOLOGY Co.,Ltd.

Contract record no.: X2021980000101

Denomination of invention: Voice communication method based on mobile Internet

Granted publication date: 20180427

License type: Common License

Record date: 20210106

EE01 Entry into force of recordation of patent licensing contract