CN114286039A - Audio and video call method and system - Google Patents

Audio and video call method and system Download PDF

Info

Publication number
CN114286039A
CN114286039A CN202111634696.XA CN202111634696A CN114286039A CN 114286039 A CN114286039 A CN 114286039A CN 202111634696 A CN202111634696 A CN 202111634696A CN 114286039 A CN114286039 A CN 114286039A
Authority
CN
China
Prior art keywords
receiving client
client
audio
server
request
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
Application number
CN202111634696.XA
Other languages
Chinese (zh)
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.)
Fullsee Technology Co ltd
Original Assignee
Fullsee 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 Fullsee Technology Co ltd filed Critical Fullsee Technology Co ltd
Priority to CN202111634696.XA priority Critical patent/CN114286039A/en
Publication of CN114286039A publication Critical patent/CN114286039A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Information Transfer Between Computers (AREA)

Abstract

The invention relates to an audio and video communication method and a system, wherein the method comprises the following steps: the initiating client initiates an audio and video chat signaling request through an http or https protocol; the server receives the request and judges the chat state of the receiving client; and when the receiving client is judged to be in the call, informing the initiating client and ending the request, and when the receiving client is judged not to be in the call, sending a websocket message to the receiving client. Under the condition that the software such as WeChat and the like can not be used in an intranet system, the audio and video communication method is adopted, and the service system can be used for carrying out audio and video communication with each client of the system, so that the efficient communication of services in the intranet system is realized, and safety supervision measures are ensured.

Description

Audio and video call method and system
Technical Field
The invention relates to the technical field of audio data processing, in particular to an audio and video communication method and system.
Background
A WebSocket link is a protocol for full duplex communication over a single TCP connection. The WebSocket link enables data exchange between the client and the server to be simpler, allows the server to actively push data to the client, and meets the requirement that scheduling timely pushes other clients to the server to the client. WebSocket links support persistent connections. The Websocket link allows the server to actively push data to the client, the functional requirements of the existing service system cannot be met, and scheduling notification cannot be realized without maintaining the Websocket long link.
The http protocol is based on a B/S architecture for communication, and the implementation program of the client is mainly a Web browser, which is a standard (TCP) for request and response of the client and the server. The method can meet the functional requirements of the service system, but can not meet the scheduling functions of pushing requests of other clients to the server to the client in time and the like. The http protocol does not support persistent connections.
The invention combines the WebSocket link and the http protocol, combines the WebSocket link and the response http service, binds the user and the client type into one link, and realizes the scheduling before the multi-user audio and video chat.
Disclosure of Invention
In order to solve the defects of the prior art, the invention provides an audio and video conversation method and system, which can realize the signaling scheduling before audio and video chatting when a single account logs in a plurality of terminals.
In order to achieve the above purpose, the technical scheme adopted by the invention comprises the following steps:
an audio and video communication method is characterized by comprising the following steps:
the initiating client initiates an audio and video chat signaling request through an http or https protocol;
the server receives the request and judges the chat state of the receiving client;
when the receiving client is judged to be in a call, informing the initiating client and ending the request;
and when the receiving client is judged not to be in the call, sending a websocket message to the receiving client.
Further, sending the websocket message to the receiving client includes sending the websocket message to the web side and the app side of the receiving client at the same time.
Further, the web side and the app side are associated through a unique account ID.
Further, when the app end of the receiving client receives the message, the app end of the receiving client notifies the server end through an http or https protocol, the server end updates the chat state of the receiving client, and notifies the web end of the receiving client to close the window through a websocket message.
Further, when the web end of the receiving client receives the message, the web end of the receiving client notifies the server end through an http or https protocol, the server end updates the chat state of the receiving client, and notifies the app end of the receiving client to close the window through a websocket message.
Further, when the initiating client or the receiving client requests the server to end the conversation through the http or https protocol, the server notifies the other party of closing the window through the websocket message, and updates the chat state of the initiating client or the receiving client.
An audio/video call system, comprising:
the initiating client is used for initiating an audio and video chat signaling request through an http or https protocol;
the server is used for receiving the request and judging the chat state of the receiving client; and when the receiving client is judged to be in the call, informing the initiating client and ending the request, and when the receiving client is judged not to be in the call, sending a websocket message to the receiving client.
The invention also relates to a computer-readable storage medium, characterized in that the storage medium has stored thereon a computer program which, when being executed by a processor, carries out the above-mentioned method.
The invention also relates to an electronic device, characterized in that it comprises a processor and a memory;
the memory is used for storing operation instructions;
the processor is used for executing the method by calling the operation instruction.
A computer program product comprising a computer program and/or instructions, characterized in that the computer program and/or instructions, when executed by a processor, implement the steps of the method as described above.
The invention has the beneficial effects that:
by adopting the audio and video communication method and the system, the signaling scheduling notification before the audio and video chat is carried out when a plurality of terminals are logged in through a single account. Under the condition that the software such as WeChat and the like can not be used in an intranet system, the audio and video communication method is adopted, and the service system can be used for carrying out audio and video communication with each client of the system, so that the efficient communication of services in the intranet system is realized, and safety supervision measures are ensured.
Drawings
Fig. 1 is a schematic flow chart of an audio and video call method according to the present invention.
Fig. 2 is a schematic structural diagram of an audio/video call system according to the present invention.
Detailed Description
For a clearer understanding of the contents of the present invention, reference will be made to the accompanying drawings and examples.
The invention relates to an audio and video communication method with a step flow shown in figure 1, which comprises the following steps:
the initiating client initiates an audio and video chat signaling request through an http or https protocol;
the server receives the request and judges the chat state of the receiving client;
when the receiving client is judged to be in a call, informing the initiating client and ending the request;
and when the receiving client is judged not to be in the call, sending a websocket message to the receiving client.
The step of sending the websocket message to the receiving client comprises the step of sending the websocket message to a web end and an app end of the receiving client simultaneously.
And the web end and the app end are associated through a unique account ID. Illustratively, the association may be through an identification number or a telephone number.
Preferably, when the app of the receiving client receives the message, the app of the receiving client notifies the server through an http or https protocol, and the server updates the chat state of the receiving client and notifies the web of the receiving client to close the window through a websocket message.
Preferably, when the web end of the receiving client receives the message, the web end of the receiving client notifies the server through an http or https protocol, the server updates the chat state of the receiving client, and notifies the app end of the receiving client to close the window through a websocket message.
Preferably, when the originating client or the receiving client requests the server to end the call through the http or https protocol, the server notifies the other party of closing the window through the websocket message, and updates the chat state of the originating client or the receiving client.
In the embodiment of the application, the client login server can login through an account number + password mode and can also login through a telephone number + short message verification code mode, so that the server has a mapping maintenance relationship in two modes. The server side can establish a websocket link for each client side; two modes of websocket link maintenance are adopted in the system, including a mode I: the mapping relation of the account number + the client type and the websocket link is in a second mode: the mapping relation of the mobile phone number + the client type and the websocket link.
When a user A wants to chat with a user B in an audio-video mode, the user A initiates a video chat signaling request through an http or https protocol, and if the user B logs in both a web end and an app end (namely, a link for response can be found by an account number or a mobile phone number in the memory maintenance of a server). Then, the user B and the server are linked by two websockets, the server checks whether the current audio/video chat state maintained by the user B in the system memory is in a call, and if the server checks that the user B has a call and a called record of the user B in the call (connected audio/video session object (connAudioVideoMap)) or has been initiated by another user with an audio/video request (requesting an audio/video session object (reqAudioVideoMap)) in the set, the server notifies the user a of the websocket message: user B is in an audio-video session and please try again later. The audio-video chat session is then ended. If the system memory checks that the user B is not in the call (the system can take the audio and video request initiated by the user A to the user B according to the rule source client type + the source user + the target user as key, and the request entity is put into the reqAudioVideoMap set as Value), then the websocket link of the web end and the websocket link of the app end of the user B are taken out from the system memory, and websocket messages are sent to the two terminals at the same time, the web end of the user B and the app end of the user B both receive audio and video call request interfaces, if the user B clicks and receives the video chat at the app end point, the user B can send http or https request to the server (telling the server that I has received the audio and video chat), after the server receives the request of the app end, the current audio and video chat state of the user B account or the mobile phone number in the memory is updated, (the system can find the corresponding object from the reqAudioVideoVideoVideo VideoMap set and put the chat object established by the nAConMap set buffer, the method comprises the steps that audio and video chatting of a user A and a user B is carried out by taking a source client type + a source user + a target user as a key according to a rule, a request entity is taken as a Value and put into a connAudioVideoMap set and removed from a reqAudiovideomap set, other client websocket links of the user B (except the websocket link of the app of the user B) are obtained in a memory, a message is sent through the other client websocket links of the user B (the user B has received the message at the app end), the web end of the user B receives the websocket message, and a web audio and video window of the user B is automatically closed. When any party of the initiating client or the receiving client requests the server to finish the conversation through an http or https protocol, the server sends a websocket message: and the other party is hung up, and the cache record in the connAudioVideoMap set is deleted. And informing the other party to close the window and updating the chat state of the initiating client or the receiving client.
By adopting the audio and video call method, when a plurality of terminals are logged in through a single account, signaling scheduling notification before audio and video chat is carried out, and the audio and video call can be realized by scheduling interactive logics in two caches. Under the condition that the software such as WeChat and the like can not be used in an intranet system, the audio and video communication method is adopted, and the service system can be used for carrying out audio and video communication with each client of the system, so that the efficient communication of services in the intranet system is realized, and safety supervision measures are ensured.
Another aspect of the present invention also relates to an audio/video communication system, whose structure is shown in fig. 2, including:
the initiating client is used for initiating an audio and video chat signaling request through an http or https protocol;
the server is used for receiving the request and judging the chat state of the receiving client; and when the receiving client is judged to be in the call, informing the initiating client and ending the request, and when the receiving client is judged not to be in the call, sending a websocket message to the receiving client.
By using this system, the above-described arithmetic processing method can be executed and a corresponding technical effect can be achieved.
Embodiments of the present invention also provide a computer-readable storage medium capable of implementing all the steps of the method in the above embodiments, the computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements all the steps of the method in the above embodiments.
Embodiments of the present invention also provide an electronic device for executing the method, as an implementation apparatus of the method, the electronic device at least has a processor and a memory, in particular, the memory stores data required for executing the method and related computer programs, such as the like, and all steps of the implementation method are executed by calling the data and programs in the memory by the processor, and corresponding technical effects are obtained.
Preferably, the electronic device may comprise a bus architecture, which may include any number of interconnected buses and bridges linking together various circuits including one or more processors and memory. The bus may also link various other circuits such as peripherals, voltage regulators, power management circuits, and the like, which are well known in the art, and therefore, will not be described any further herein. A bus interface provides an interface between the bus and the receiver and transmitter. The receiver and transmitter may be the same element, i.e., a transceiver, providing a means for communicating with various other systems over a transmission medium. The processor is responsible for managing the bus and general processing, while the memory may be used for storing data used by the processor in performing operations.
Additionally, the electronic device may further include a communication module, an input unit, an audio processor, a display, a power source, and the like. The processor (or controller, operational controls) employed may include a microprocessor or other processor device and/or logic device that receives input and controls the operation of various components of the electronic device; the memory may be one or more of a buffer, a flash memory, a hard drive, a removable medium, a volatile memory, a non-volatile memory or other suitable devices, and may store the above-mentioned related data information, and may also store a program for executing the related information, and the processor may execute the program stored in the memory to realize information storage or processing, etc.; the input unit is used for providing input to the processor, and can be a key or a touch input device; the power supply is used for supplying power to the electronic equipment; the display is used for displaying display objects such as images and characters, and may be an LCD display, for example. The communication module is a transmitter/receiver that transmits and receives signals via an antenna. The communication module (transmitter/receiver) is coupled to the processor to provide an input signal and receive an output signal, which may be the same as in the case of a conventional mobile communication terminal. Based on different communication technologies, a plurality of communication modules, such as a cellular network module, a bluetooth module, and/or a wireless local area network module, may be disposed in the same electronic device. The communication module (transmitter/receiver) is also coupled to a speaker and a microphone via an audio processor to provide audio output via the speaker and receive audio input from the microphone to implement the usual telecommunication functions. The audio processor may include any suitable buffers, decoders, amplifiers and so forth. In addition, the audio processor is also coupled to the central processor, so that recording on the local machine can be realized through the microphone, and sound stored on the local machine can be played through the loudspeaker.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create a system for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including an instruction system which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks. While preferred embodiments of the present invention have been described, additional variations and modifications in those embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. Therefore, it is intended that the appended claims be interpreted as including preferred embodiments and all such alterations and modifications as fall within the scope of the invention.
The above description is only for the preferred embodiment of the present invention, but the scope of the present invention is not limited thereto, and any changes or substitutions that can be easily conceived by those skilled in the art within the technical scope of the present invention are included in the scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

Claims (10)

1. An audio and video communication method is characterized by comprising the following steps:
the initiating client initiates an audio and video chat signaling request through an http or https protocol;
the server receives the request and judges the chat state of the receiving client;
when the receiving client is judged to be in a call, informing the initiating client and ending the request;
and when the receiving client is judged not to be in the call, sending a websocket message to the receiving client.
2. The method of claim 1, wherein sending the websocket message to the receiving client comprises sending the websocket message to both the web-side and the app-side of the receiving client.
3. The method of claim 2, wherein the web peer and the app peer are associated by a unique account ID.
4. The method as claimed in claim 2, wherein when the app of the receiving client receives the message, the app of the receiving client notifies the server through an http or https protocol, the server updates the chat state of the receiving client, and notifies the web of the receiving client to close the window through a websocket message.
5. The method of claim 2, wherein when the web end of the receiving client receives the message, the web end of the receiving client notifies the server through an http or https protocol, the server updates the chat state of the receiving client, and notifies the app end of the receiving client to close the window through a websocket message.
6. The method of any one of claims 1 to 5, wherein when the originating client or the receiving client requests the server to end the call through an http or https protocol, the server notifies the other party of closing the window through a websocket message, and updates the chat status of the originating client or the receiving client.
7. An audio/video call system, comprising:
the initiating client is used for initiating an audio and video chat signaling request through an http or https protocol;
the server is used for receiving the request and judging the chat state of the receiving client; and when the receiving client is judged to be in the call, informing the initiating client and ending the request, and when the receiving client is judged not to be in the call, sending a websocket message to the receiving client.
8. A computer-readable storage medium, characterized in that the storage medium has stored thereon a computer program which, when being executed by a processor, carries out the method of any one of claims 1 to 6.
9. An electronic device comprising a processor and a memory;
the memory is used for storing operation instructions;
the processor is used for executing the method of any one of claims 1 to 6 by calling the operation instruction.
10. A computer program product comprising a computer program and/or instructions, characterized in that the computer program and/or instructions, when executed by a processor, implement the steps of the method of any one of claims 1 to 6.
CN202111634696.XA 2021-12-29 2021-12-29 Audio and video call method and system Pending CN114286039A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111634696.XA CN114286039A (en) 2021-12-29 2021-12-29 Audio and video call method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111634696.XA CN114286039A (en) 2021-12-29 2021-12-29 Audio and video call method and system

Publications (1)

Publication Number Publication Date
CN114286039A true CN114286039A (en) 2022-04-05

Family

ID=80877688

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111634696.XA Pending CN114286039A (en) 2021-12-29 2021-12-29 Audio and video call method and system

Country Status (1)

Country Link
CN (1) CN114286039A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117177059A (en) * 2023-10-27 2023-12-05 荣耀终端有限公司 Camera control method for video call, electronic device and storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2014192591A1 (en) * 2013-05-29 2014-12-04 グリー株式会社 Method, system and program for communicating messages
CN108881779A (en) * 2018-07-17 2018-11-23 聚好看科技股份有限公司 Video calling between smart machine answers transfer method, system and server
CN112751842A (en) * 2020-12-25 2021-05-04 广东南方新媒体科技有限公司 High-performance instant messaging method
CN112968963A (en) * 2021-02-23 2021-06-15 上海昊沧系统控制技术有限责任公司 WebSocket-based method for user forced real-time offline
CN113259337A (en) * 2021-05-07 2021-08-13 中国联合网络通信集团有限公司 Multi-terminal audio and video answering control method, server, terminal, equipment and medium
CN113572678A (en) * 2021-06-30 2021-10-29 中企云链(北京)金融信息服务有限公司 Instant messaging method realized based on websocket

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2014192591A1 (en) * 2013-05-29 2014-12-04 グリー株式会社 Method, system and program for communicating messages
CN108881779A (en) * 2018-07-17 2018-11-23 聚好看科技股份有限公司 Video calling between smart machine answers transfer method, system and server
CN112751842A (en) * 2020-12-25 2021-05-04 广东南方新媒体科技有限公司 High-performance instant messaging method
CN112968963A (en) * 2021-02-23 2021-06-15 上海昊沧系统控制技术有限责任公司 WebSocket-based method for user forced real-time offline
CN113259337A (en) * 2021-05-07 2021-08-13 中国联合网络通信集团有限公司 Multi-terminal audio and video answering control method, server, terminal, equipment and medium
CN113572678A (en) * 2021-06-30 2021-10-29 中企云链(北京)金融信息服务有限公司 Instant messaging method realized based on websocket

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
DDSSINGSONG: "webrtc_server_java", pages 1 - 14, Retrieved from the Internet <URL:https://github.com/ddssingsong/webrtc_server_java/commit/7cd2bca85e548ac24fe7c76a2da469a460509ee1> *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117177059A (en) * 2023-10-27 2023-12-05 荣耀终端有限公司 Camera control method for video call, electronic device and storage medium
CN117177059B (en) * 2023-10-27 2024-04-12 荣耀终端有限公司 Camera control method for video call, electronic device and storage medium

Similar Documents

Publication Publication Date Title
CN110266810B (en) Message receiving method, device and storage medium based on MQTT protocol
US9065666B2 (en) System and method of multi-media conferencing between universal plug and play (UPnP) enabled telephony devices and wireless area network (WAN) devices
JP2003179642A (en) Data transmission system, information processor, information processing method, repeater, relaying method, recording medium and program
CN109586929B (en) Conference content transmission method and device, electronic equipment and storage medium
US20200028955A1 (en) Communication system and api server, headset, and mobile communication terminal used in communication system
KR20090071995A (en) Method for providing multimedia streaming service and system for performing the same
WO2013127163A1 (en) Call terminal enrollment method and device
CN112738559A (en) Screen projection implementation method, device and system
US20150035934A1 (en) Video message record terminal, video message transmitting server and method for leaving video message
CN112738575A (en) Screen projection implementation method, device and system
CN111510493B (en) Distributed data transmission method and device
CN112689012A (en) Cross-network proxy communication method and device
US10855846B1 (en) Encrypting multiple party calls
CN103024687A (en) Method and equipment for establishing instant messaging
CN111767558B (en) Data access monitoring method, device and system
CN114286039A (en) Audio and video call method and system
CN109819278B (en) Optimization method of live video
CN111666589A (en) Block chain distributed risk data sharing system and method
WO2016095510A1 (en) Path selection method, device and system
JP7366115B2 (en) Delivering notifications to mobile devices
CN103701879A (en) Method and device for automatically realizing business processing
WO2016150334A1 (en) Method for realizing voice mailbox server and voice mailbox system
CN111818144B (en) Message transmission method, device and system under remote service calling framework
CN115086263B (en) IM message sending method, system, storage medium and computer equipment of IOS terminal
CN115550324B (en) Automatic switching method, device, storage medium and system for conference modes

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