Monitoring scheduling method and equipment
By determining the target monitoring group on the server side and establishing a sending and receiving connection, the problems of wasted monitoring and scheduling bandwidth, complex operation and slow transmission speed in the prior art are solved, and efficient and convenient monitoring and scheduling are achieved.
Patent Information
- Application Number
- CN202311785537.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-12-22
- Publication Date
- 2025-06-24
AI Technical Summary
The prior art is wasted bandwidth when performing monitoring and scheduling, complex operations and slow transmission speed.
The server receives monitoring scheduling requests, determines the target monitoring group, and sends messages to each terminal in the target monitoring group, establishes a sending and receiving connection, generates a target session description protocol message, and notifies each terminal in the target monitoring group, so as to realize real-time data exchange between the monitoring terminal and the monitored terminal.
Effectively save bandwidth, simplify operational processes, improve transmission speed, enhance the flexibility and adaptability of monitoring and scheduling, and improve user experience.
Smart Images

Figure CN120201157A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of wireless communication technologies, and particularly to a monitoring and dispatching method and device. Background Art
[0002] In the field of command and dispatching, the monitoring party often needs to perform video monitoring and dispatching to view the audio and video of the monitored party.
[0003] Currently, when performing monitoring and dispatching, in one way, the audio and video streams are transmitted through the intercommunication among internal members, and this way often occupies a relatively high bandwidth and affects the transmission speed; in another way, the video of the concerned party is pulled up separately first, and then a voice conference is established separately. However, this way requires the dispatcher to operate multiple times, the operation process is complex, and there is often a situation where the on-site problem handling cannot be responded to in time.
[0004] Therefore, in order to better perform command and dispatching, there is an urgent need for an efficient and convenient monitoring and dispatching method. Summary of the Invention
[0005] The present invention provides a monitoring and dispatching method and device to solve the problems of bandwidth waste, complex operation, and slow transmission speed in the prior art during monitoring and dispatching.
[0006] In a first aspect, a monitoring and dispatching method of the present application includes:
[0007] After the server receives a monitoring and dispatching request sent by a first terminal, it determines a target monitoring group corresponding to the first terminal; the server sends a first message to each terminal in the target monitoring group, and the first message is used to instruct to create a sending connection and to indicate the target monitoring group identifier; the server receives session description protocol packets returned by each terminal in the target monitoring group; the server generates a target session description protocol packet according to the received session description protocol packets and the interaction protocol supported by the target monitoring group; the server notifies the target session protocol packet to each terminal in the target monitoring group, so that a sending and receiving connection is established between the monitoring terminals and the monitored terminals in the target monitoring group through the server, and the monitoring terminals and the monitored terminals in the target monitoring group perform monitoring and dispatching based on the target session description protocol packet.
[0008] In a possible implementation manner, after the server receives a monitoring and dispatching request sent by a first terminal and determines the target monitoring group corresponding to the first terminal, it includes:
[0009] When the first terminal is a monitoring terminal, the server receives a monitoring scheduling request sent by the first terminal, and determines the target monitoring group according to the identifier of the first terminal and the identifier of the monitored terminal included in the monitoring scheduling request; or,
[0010] When the first terminal is a monitoring terminal, the server receives a monitoring scheduling request sent by the first terminal, and determines the target monitoring group from a preset monitoring group according to the identifier of the first terminal and the relationship between the terminal identifier and the monitoring group identifier; or,
[0011] When the first terminal is a monitored terminal, the server receives a monitoring scheduling request sent by the first terminal, and determines the target monitoring group according to the identifier of the first terminal and the preset monitoring terminal identifier; or when the first terminal is a monitored terminal, the server receives a monitoring scheduling request sent by the first terminal, and determines the target monitoring group according to the identifier of the first terminal and the monitored terminal identifier and / or monitoring terminal identifier included in the monitoring scheduling request; or,
[0012] When the first terminal is a monitored terminal, the server receives a monitoring scheduling request sent by the first terminal, and determines the target monitoring group from a preset monitoring group according to the identifier of the first terminal and the relationship between the terminal identifier and the monitoring group identifier.
[0013] In a possible implementation manner, the server notifies the target session protocol message to each terminal in the target monitoring group, so that the monitoring terminal in the target monitoring group establishes a transceiver connection between the server and the monitored terminal in the target monitoring group, and enables the monitoring terminal and the monitored terminal in the target monitoring group to perform monitoring scheduling based on the target session description protocol message, including:
[0014] When the monitoring scheduling request is used to indicate scheduling to view the monitored terminal, the server notifies the target session description protocol message to the monitored terminal and the monitoring terminal in the target monitoring group, so that the monitored terminal connects to the server according to the interaction protocol, and generates audio and video data according to the target session protocol message;
[0015] The server receives the audio and video data sent by the monitored terminal in the target monitoring group, and forwards the audio and video data to the monitoring terminal in the target monitoring group, so that the monitoring terminal in the target monitoring group receives and plays the audio and video data according to the target session protocol message.
[0016] In a possible implementation, the server notifies the target session protocol message to each terminal in the target monitoring group, so that the monitoring terminals in the target monitoring group establish a transceiver connection between the server and the monitored terminals in the target monitoring group, and the monitoring terminals in the target monitoring group perform monitoring scheduling with the monitored terminals based on the target session description protocol message, including:
[0017] When the monitoring scheduling request is used to indicate sending an audio instruction to the monitored terminal, the server notifies the target session protocol message to the monitored terminal and the monitoring terminals in the target monitoring group, so that the monitoring terminal connects to the server according to the interaction protocol and generates audio data according to the target session protocol message;
[0018] The server receives the audio data sent by the monitoring terminal in the target monitoring group and forwards the audio data to the monitored terminal in the target monitoring group, so that the monitored terminal in the target monitoring group receives and plays the audio data according to the target session protocol message.
[0019] In a possible implementation, the method further includes:
[0020] The server receives a monitoring status request from a first monitoring terminal for a first monitored terminal, and the monitoring status request is used to indicate whether the first monitored terminal is monitored and scheduled by a second monitoring terminal;
[0021] The server returns the monitoring status result to the first monitoring terminal, so that when the first monitoring terminal needs to monitor the first monitored terminal and determines that the first monitored terminal has been monitored, it sends a first session protocol message to the server;
[0022] The server receives the first session protocol message and sends the negotiated target session protocol message and the audio and video data generated by the first monitored terminal to the first monitoring terminal, so that the first monitoring terminal receives and plays the audio and video data according to the target session protocol message.
[0023] In a possible implementation, the method further includes:
[0024] The server receives a monitoring status request from a first monitoring terminal for a first monitored terminal, and the monitoring status request is used to indicate whether the first monitored terminal is monitored and scheduled by a second monitoring terminal;
[0025] The server returns the monitoring status result to the first monitoring terminal, so that when the first monitoring terminal needs to end the monitoring of the first monitored terminal and determines that the first monitored terminal is monitored by the second monitoring terminal, it directly closes the connection; or
[0026] The server returns the monitoring status result to the first monitoring terminal, so that when the first monitoring terminal needs to end the monitoring of the first monitored terminal and determines that the first monitored terminal is not monitored, it sends a release request to the first monitored terminal through the server.
[0027] In a second aspect, the present application further provides a server, including a processor and a memory;
[0028] The processor is configured to, after receiving a monitoring scheduling request sent by a first terminal, determine a target monitoring group corresponding to the first terminal; send a first message to each terminal in the target monitoring group, where the first message is used to indicate creating a sending connection and to indicate the target monitoring group identifier; receive session description protocol packets returned by each terminal in the target monitoring group; generate a target session description protocol packet according to the received session description protocol packets and the interaction protocol supported by the target monitoring group; notify the target session protocol packet to each terminal in the target monitoring group, so that a monitoring terminal in the target monitoring group establishes a transceiver connection between the server and a monitored terminal in the target monitoring group, and so that the monitoring terminal in the target monitoring group and the monitored terminal perform monitoring scheduling based on the target session description protocol packet;
[0029] The memory is used to store program instructions.
[0030] In a possible implementation manner, the processor is specifically configured to:
[0031] When the first terminal is a monitoring terminal, receive the monitoring scheduling request sent by the first terminal, and determine the target monitoring group according to the identifier of the first terminal and the identifier of the monitored terminal included in the monitoring scheduling request; or,
[0032] When the first terminal is a monitoring terminal, receive the monitoring scheduling request sent by the first terminal, and determine the target monitoring group from a preset monitoring group according to the identifier of the first terminal and the relationship between the terminal identifier and the monitoring group identifier; or,
[0033] When the first terminal is a monitored terminal, receive the monitoring scheduling request sent by the first terminal, and determine the target monitoring group according to the identifier of the first terminal and the preset monitoring terminal identifier; or,
[0034] When the first terminal is a monitored terminal, receive a monitoring scheduling request sent by the first terminal, and determine the target monitoring group according to the identifier of the first terminal and the monitored terminal identifier and / or monitoring terminal identifier included in the monitoring scheduling request; or,
[0035] When the first terminal is a monitored terminal, receive a monitoring scheduling request sent by the first terminal, and determine the target monitoring group from a preset monitoring group according to the identifier of the first terminal and the relationship between the terminal identifier and the monitoring group identifier.
[0036] In a possible implementation manner, the processor is specifically configured to:
[0037] When the monitoring scheduling request is used to indicate scheduling to view a monitored terminal, notify the target session description protocol packet to the monitored terminals and the monitoring terminals in the target monitoring group, so that the monitored terminals connect to the server according to the interaction protocol, and generate audio and video data according to the target session protocol packet;
[0038] Receive the audio and video data sent by the monitored terminals in the target monitoring group, and forward the audio and video data to the monitoring terminals in the target monitoring group, so that the monitoring terminals in the target monitoring group receive and play the audio and video data according to the target session protocol packet.
[0039] In a possible implementation manner, the processor is specifically configured to:
[0040] When the monitoring scheduling request is used to indicate sending an audio instruction to a monitored terminal, notify the target session protocol packet to the monitored terminals and the monitoring terminals in the target monitoring group, so that the monitoring terminals connect to the server according to the interaction protocol, and generate audio data according to the target session protocol packet;
[0041] Receive the audio data sent by the monitoring terminals in the target monitoring group, and forward the audio data to the monitored terminals in the target monitoring group, so that the monitored terminals in the target monitoring group receive and play the audio data according to the target session protocol packet.
[0042] In a possible implementation manner, the processor is further configured to:
[0043] Receive a monitoring status request sent by a first monitoring terminal for a first monitored terminal, where the monitoring status request is used to indicate whether the first monitored terminal is monitored and scheduled by a second monitoring terminal; return the monitoring status result to the first monitoring terminal, so that when the first monitoring terminal needs to monitor the first monitored terminal and determines that the first monitored terminal has been monitored, send a first session protocol message to the server; receive the first session protocol message, and send the negotiated target session protocol message and the audio-visual data generated by the first monitored terminal to the first monitoring terminal, so that the first monitoring terminal receives and plays the audio-visual data according to the target session protocol message.
[0044] In a possible implementation manner, the processor is further configured to:
[0045] Receive a monitoring status request sent by a first monitoring terminal for a first monitored terminal, where the monitoring status request is used to indicate whether the first monitored terminal is monitored and scheduled by a second monitoring terminal;
[0046] Return the monitoring status result to the first monitoring terminal, so that when the first monitoring terminal needs to end the monitoring of the first monitored terminal and determines that the first monitored terminal is monitored by the second monitoring terminal, directly close the connection; or
[0047] Return the monitoring status result to the first monitoring terminal, so that when the first monitoring terminal needs to end the monitoring of the first monitored terminal and determines that the first monitored terminal is not monitored, send a release request to the first monitored terminal through the server.
[0048] In a third aspect, the present application further provides a server, and the server includes:
[0049] A transceiver module, configured to determine a target monitoring group corresponding to the first terminal after receiving a monitoring scheduling request sent by the first terminal, notify each terminal in the target monitoring group to create a sending connection and the target monitoring group identifier; receive session description protocol messages returned by each terminal in the target monitoring group;
[0050] A processing module, configured to generate a target session description protocol message according to the received session description protocol message and the interaction protocol supported by the target monitoring group;
[0051] The transceiver module is further configured to notify the target session protocol packet to each terminal in the target monitoring group, so that a transceiver connection is established between the monitoring terminal in the target monitoring group and the monitored terminal in the target monitoring group through the server, and the monitoring terminal in the target monitoring group and the monitored terminal perform monitoring scheduling based on the target session description protocol packet.
[0052] In a possible implementation manner, the transceiver module is specifically configured to:
[0053] When the first terminal is a monitoring terminal, receive a monitoring scheduling request sent by the first terminal, and determine the target monitoring group according to the identifier of the first terminal and the identifier of the monitored terminal included in the monitoring scheduling request; or,
[0054] When the first terminal is a monitoring terminal, receive a monitoring scheduling request sent by the first terminal, and determine the target monitoring group from a preset monitoring group according to the identifier of the first terminal and the relationship between the terminal identifier and the monitoring group identifier; or,
[0055] When the first terminal is a monitored terminal, receive a monitoring scheduling request sent by the first terminal, and determine the target monitoring group according to the identifier of the first terminal and the preset monitoring terminal identifier; or,
[0056] When the first terminal is a monitored terminal, receive a monitoring scheduling request sent by the first terminal, and determine the target monitoring group according to the identifier of the first terminal and the identifier of the monitored terminal and / or the monitoring terminal identifier included in the monitoring scheduling request; or,
[0057] When the first terminal is a monitored terminal, receive a monitoring scheduling request sent by the first terminal, and determine the target monitoring group from a preset monitoring group according to the identifier of the first terminal and the relationship between the terminal identifier and the monitoring group identifier.
[0058] In a possible implementation manner, the transceiver module is specifically configured to:
[0059] When the monitoring scheduling request is used to indicate scheduling to view the monitored terminal, notify the target session description protocol packet to the monitored terminal and the monitoring terminal in the target monitoring group, so that the monitored terminal connects to the server according to the interaction protocol and generates audio and video data according to the target session protocol packet;
[0060] Receive the audio and video data sent by the monitored terminals in the target monitoring group, and forward the audio and video data to the monitoring terminals in the target monitoring group, so that the monitoring terminals in the target monitoring group receive and play the audio and video data according to the target session protocol message.
[0061] In a possible implementation, the transceiver module is specifically configured to:
[0062] When the monitoring scheduling request is used to indicate sending an audio instruction to the monitored terminal, notify the target session protocol message to the monitored terminals and the monitoring terminals in the target monitoring group, so that the monitoring terminals connect to the server according to the interaction protocol and generate audio data according to the target session protocol message;
[0063] Receive the audio data sent by the monitoring terminals in the target monitoring group, and forward the audio data to the monitored terminals in the target monitoring group, so that the monitored terminals in the target monitoring group receive and play the audio data according to the target session protocol message.
[0064] In a possible implementation, the transceiver module is further configured to:
[0065] Receive a monitoring status request from a first monitoring terminal for a first monitored terminal, where the monitoring status request is used to indicate whether the first monitored terminal is monitored and scheduled by a second monitoring terminal; return the monitoring status result to the first monitoring terminal, so that when the first monitoring terminal needs to monitor the first monitored terminal and determines that the first monitored terminal has been monitored, send a first session protocol message to the server; receive the first session protocol message, and send the negotiated target session protocol message and the audio and video data generated by the first monitored terminal to the first monitoring terminal, so that the first monitoring terminal receives and plays the audio and video data according to the target session protocol message.
[0066] In a possible implementation, the transceiver module is further configured to:
[0067] Receive a monitoring status request from a first monitoring terminal for a first monitored terminal, where the monitoring status request is used to indicate whether the first monitored terminal is monitored and scheduled by a second monitoring terminal;
[0068] Return the monitoring status result to the first monitoring terminal, so that when the first monitoring terminal needs to end the monitoring of the first monitored terminal and determines that the first monitored terminal is monitored by the second monitoring terminal, directly close the connection; or
[0069] Return the monitoring status result to the first monitoring terminal, so that when the first monitoring terminal needs to end the monitoring of the first monitored terminal and determines that the first monitored terminal is not being monitored, send a release request to the first monitored terminal through the server.
[0070] In a fourth aspect, an embodiment of the present invention further provides a monitoring terminal, including: at least one processor and a memory:
[0071] The memory is used to store program instructions;
[0072] The processor is configured to send a monitoring scheduling request to the server, where the monitoring scheduling request is used to instruct scheduling to view the monitored terminal; receive a first message sent by the server, generate a first Session Description Protocol (SDP) packet, where the first message is used to instruct to create a sending connection and to indicate the identifier of the corresponding target monitoring group; send the first SDP packet to the server, and receive a target session protocol packet sent by the server; receive and play the audio and video data sent by the monitored terminal in the target monitoring group through the server based on the target session protocol packet; or,
[0073] The processor is configured to send a monitoring scheduling request to the server, where the monitoring scheduling request is used to instruct to send an audio instruction to the monitored terminal; receive a first message sent by the server, generate a first SDP packet; send the first SDP packet to the server, and receive a target session protocol packet sent by the server; generate audio data based on the target session protocol packet, and send the audio data to the monitored terminal in the target monitoring group through the server.
[0074] In a fifth aspect, an embodiment of the present invention further provides a monitored terminal, including: at least one processor and a memory:
[0075] The memory is used to store program instructions;
[0076] The processor is configured to generate a second SDP packet after receiving a first message sent by the server, where the first message is used to instruct to create a sending connection and to indicate the identifier of the corresponding target monitoring group; send the second SDP packet to the server, and receive a target session protocol packet sent by the server; generate audio and video data based on the target session protocol packet, and send the audio and video data to the monitoring terminal in the target monitoring group through the server; or,
[0077] The processor is configured to generate a second Session Description Protocol (SDP) packet after receiving a first message sent by the server; send the second SDP packet to the server, and receive a target session protocol packet sent by the server; and receive and play, based on the target session protocol packet, audio data sent by a monitoring terminal in the target monitoring group through the server.
[0078] In a sixth aspect, an embodiment of the present invention further provides a computer-readable storage medium storing computer-executable instructions for causing a computer to execute the above-described monitoring and scheduling method.
[0079] In a seventh aspect, an embodiment of the present application provides a chip system including a processor and an interface. The processor is configured to call and execute a computer program from the interface. When the processor executes the computer program, the method described in the above first aspect or any possible design of the first aspect can be implemented.
[0080] In an eighth aspect, an embodiment of the present application further provides a computer program product including a computer program. When the computer program is executed, the method described in the above first aspect or any possible design of the first aspect can be implemented.
[0081] The beneficial effects of the present invention are as follows:
[0082] A monitoring and scheduling method and device provided in the present application, after the server receives a monitoring request sent by a terminal in a target monitoring group, determines the target monitoring group, and notifies each terminal in the target monitoring group to create a sending connection and the target monitoring group identifier respectively. Then, the server generates a target session description protocol packet according to the received session description protocol packets returned by each terminal in the target monitoring group, and notifies each terminal in the target monitoring group, so that a transceiver connection is established between the monitoring terminals and the monitored terminals in the target monitoring group through the server, and the monitoring terminals in the target monitoring group and the monitored terminals perform monitoring and scheduling based on the target session description protocol packet. That is, in the embodiment of the present application, by forming a monitoring group, a shared transceiver channel can be established within the group, enabling real-time data communication, controlling video and audio streams, sending corresponding data streams when needed, and flexibly adjusting group members, such as adding or reducing monitoring terminals, adding or reducing monitored terminals, etc. This not only effectively saves bandwidth, is convenient and fast, but also better realizes the flexibility and adaptability of monitoring and scheduling, greatly improving the user experience. BRIEF DESCRIPTION OF THE DRAWINGS
[0083] To more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for the description of the embodiments. Obviously, the drawings in the following description are only some embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other drawings can be obtained based on these drawings.
[0084] Figure 1 The first scenario schematic diagram provided by the embodiment of the present application;
[0085] Figure 2 The second scenario schematic diagram provided by the embodiment of the present application;
[0086] Figure 3 The third scenario schematic diagram provided by the embodiment of the present application;
[0087] Figure 4 The schematic diagram of a monitoring and scheduling method provided by the embodiment of the present application;
[0088] Figure 5 The first interactive schematic diagram of monitoring and scheduling provided by the embodiment of the present application;
[0089] Figure 6 Another interactive schematic diagram of monitoring and scheduling provided by the embodiment of the present application;
[0090] Figure 7 Another interactive schematic diagram of monitoring and scheduling provided by the embodiment of the present application;
[0091] Figure 8 Another interactive schematic diagram of monitoring and scheduling provided by the embodiment of the present application;
[0092] Figure 9 The structural schematic diagram of a monitoring and scheduling device provided by the embodiment of the present application;
[0093] Figure 10 Another structural schematic diagram of a monitoring and scheduling device provided by the embodiment of the present application. Detailed implementation manners
[0094] In order to make the purpose, technical solutions and advantages of the present application clearer, the following will further describe the present application in detail with reference to the drawings. Obviously, the described embodiments are only some embodiments of the present application, rather than all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative efforts belong to the scope of protection of the present application.
[0095] Currently, when performing monitoring and scheduling, one way is to transmit video and audio streams through communication among internal members. However, this way often occupies a relatively high bandwidth and affects the transmission speed. Another way is to pull up the video of the concerned party separately first and then establish a separate voice conference. However, this way requires the dispatcher to operate multiple times, the operation process is complex, and there are often situations where the on-site problem handling cannot be responded to in a timely manner. Therefore, in order to better conduct command and dispatch, an efficient and convenient monitoring and scheduling method is urgently needed.
[0096] Based on this, the present application provides a monitoring and scheduling method. By establishing a monitoring group and simultaneously establishing a voice channel to communicate with the monitored person, the monitoring party and the monitored party can control the audio stream at any time and send corresponding data streams when needed, effectively saving bandwidth and being convenient and fast.
[0097] The following explains the nouns involved in the embodiments of the present application. The specific explanations are not limited to the following descriptions:
[0098] (1) WebRTC (Web Real-Time Communications) is a real-time communication technology that allows web applications or sites to establish peer-to-peer connections between browsers without the help of an intermediate medium, enabling the transmission of video streams and / or audio streams or any other data.
[0099] (2) WebSocket (a full-duplex communication protocol based on TCP) is used to make the data exchange between the client and the server simpler and allows the server to actively push data to the client.
[0100] In the WebSocket API, the browser and the server only need to complete a handshake once, and then a persistent connection can be directly created between them for two-way data transmission.
[0101] (3) SDP (Session Description Protocol) is used to transmit this information to the receiving end. The session description protocol is completely a session description format. It does not belong to the transport protocol and only uses different appropriate transport protocols, including Session Announcement Protocol (SAP), Session Initiation Protocol (SIP), Real-Time Streaming Protocol (RTSP), MIME extension protocol for email, and Hypertext Transfer Protocol (HTTP).
[0102] The method in the embodiments of the present invention is applicable to various scenarios, especially applicable to the scenario of monitoring and scheduling between a monitoring terminal and a monitored terminal.
[0103] Figure 1Schematically shown is an exemplary system architecture that can be applied to monitoring and scheduling according to an embodiment of the present disclosure. The system architecture may include a monitoring terminal 100, a server 200, and a monitored terminal 300.
[0104] Among them, when performing monitoring and scheduling, the monitoring terminal and the monitored terminal can perform multi-party video and audio or audio scheduling.
[0105] It should be noted that the number of the monitoring terminal 100 and the monitored terminal 300 described in the embodiments of the present application can be one or more, and can be specifically determined according to the actual situation, which is not limited herein.
[0106] For example, as Figure 2 shown, the target monitoring group in the embodiments of the present application may include one monitoring terminal 100, one server 200, and three monitored terminals 300; for another example, as Figure 3 shown, the target monitoring group in the embodiments of the present application may include two monitoring terminals 100, one server 200, and four monitored terminals 300.
[0107] The monitoring terminal 100 is configured to send a monitoring and scheduling request to the server, where the monitoring and scheduling request is used to instruct scheduling to view the monitored terminal; receive a first message sent by the server, generate a first Session Description Protocol (SDP) packet, where the first message is used to instruct creating a sending connection and to indicate an identifier of the corresponding target monitoring group; send the first SDP packet to the server, and receive a target session protocol packet sent by the server; receive and play the video and audio data sent by the monitored terminal in the target monitoring group through the server based on the target session protocol packet; or, configured to send a monitoring and scheduling request to the server, where the monitoring and scheduling request is used to instruct sending an audio instruction to the monitored terminal; receive a first message sent by the server, generate a first SDP packet; send the first SDP packet to the server, and receive a target session protocol packet sent by the server; generate audio data based on the target session protocol packet, and send the audio data to the monitored terminal in the target monitoring group through the server.
[0108] The server 200 is configured to, after receiving a monitoring scheduling request sent by a first terminal, determine a target monitoring group corresponding to the first terminal; then, send a first message to each terminal in the target monitoring group, where the first message is used to indicate the creation of a sending connection and to indicate the target monitoring group identifier; then, receive Session Description Protocol (SDP) packets returned from each terminal in the target monitoring group, and generate a target SDP packet according to the received SDP packets and the interaction protocol supported by the target monitoring group; finally, notify the target SDP packet to each terminal in the target monitoring group, so that a monitoring terminal in the target monitoring group establishes a sending and receiving connection with a monitored terminal in the target monitoring group through the server, and enables the monitoring terminal and the monitored terminal in the target monitoring group to perform monitoring scheduling based on the target SDP packet.
[0109] The monitored terminal 300 is configured to, after receiving the first message sent by the server, generate a second SDP packet, where the first message is used to indicate the creation of a sending connection and to indicate the identifier of the corresponding target monitoring group; send the second SDP packet to the server, and receive the target SDP packet sent by the server; generate audio and video data based on the target SDP packet, and send the audio and video data to a monitoring terminal in the target monitoring group through the server; or, after receiving the first message sent by the server, generate a second SDP packet; send the second SDP packet to the server, and receive the target SDP packet sent by the server; receive and play the audio data sent by a monitoring terminal in the target monitoring group through the server based on the target SDP packet.
[0110] It should be noted that the above Figures 1 to 3 is only an example of the system architecture to which the embodiments of the present disclosure can be applied, to help those skilled in the art understand the technical content of the present disclosure, and does not constitute a limitation on the system architecture of the embodiments of the present application, nor does it mean that the embodiments of the present disclosure cannot be used in other devices, systems, environments or scenarios.
[0111] Based on Figures 1 to 3 the scenario shown, Figure 4 an exemplary schematic diagram of a monitoring scheduling method provided by an embodiment of the present invention is shown, which specifically includes the following steps:
[0112] S400. After the server receives a monitoring scheduling request sent by a first terminal, determine the target monitoring group corresponding to the first terminal.
[0113] As an example, the monitoring scheduling request described in the embodiments of the present application can be used to instruct scheduling to view the monitored terminal, and / or to instruct sending an audio instruction to the monitored terminal.
[0114] As an example, the server in the embodiments of the present application can determine the target monitoring group in multiple ways, which are not limited to the following several ways:
[0115] Method 1: When the first terminal is a monitoring terminal, the server receives the monitoring scheduling request sent by the first terminal, and determines the target monitoring group according to the identifier of the first terminal and the identifier of the monitored terminal included in the monitoring scheduling request.
[0116] Method 2: When the first terminal is a monitoring terminal, the server receives the monitoring scheduling request sent by the first terminal, and determines the target monitoring group from the preset monitoring groups according to the identifier of the first terminal and the relationship between the terminal identifier and the monitoring group identifier.
[0117] Method 3: When the first terminal is a monitored terminal, the server receives the monitoring scheduling request sent by the first terminal, and determines the target monitoring group according to the identifier of the first terminal and the preset monitoring terminal identifier.
[0118] Method 4: When the first terminal is a monitored terminal, the server receives the monitoring scheduling request sent by the first terminal, and determines the target monitoring group according to the identifier of the first terminal and the identifier of the monitored terminal and / or the monitoring terminal identifier included in the monitoring scheduling request.
[0119] Method 5: When the first terminal is a monitored terminal, the server receives the monitoring scheduling request sent by the first terminal, and determines the target monitoring group from the preset monitoring groups according to the identifier of the first terminal and the relationship between the terminal identifier and the monitoring group identifier.
[0120] S401. The server sends a first message to each terminal in the target monitoring group;
[0121] As an example, the first message in the embodiments of the present application is used to instruct creating a sending connection and to indicate the target monitoring group identifier.
[0122] As an example, after receiving the monitoring scheduling request sent by the monitoring terminal, the server in the embodiments of the present application can generate a target monitoring group according to the ID of the monitoring terminal and the ID of the monitored terminal that needs to be monitored and scheduled by the monitoring terminal, that is, the target monitoring group includes the monitoring terminal ID and the monitored terminal ID.
[0123] Among them, in the embodiments of the present application, the ID identifiers of each terminal in the target monitoring group can be represented by an array, or by a list, or by a set, etc., which are not limited herein.
[0124] Exemplarily, in the embodiments of the present application, the personnel to be monitored can be selected, and the personnel ID is put into the personnel list (memberList). At the same time, the main creator ID is set as the presenter, and the main creator is also the ID of the video that other members must view.
[0125] Further, in order to effectively distinguish that the content of each different instruction sig sent each time is different, after the server determines the target monitoring group, it can set a group identifier for the target monitoring group and notify the group identifier to the terminals in the group.
[0126] For example, after the server determines the target monitoring group, it generates a room number (room id) for the target monitoring group and returns the room id to the memberList members, thereby effectively preventing the generated meeting numbers from overlapping.
[0127] As an example, in the embodiments of the present application, the terminal sending the target request to the server can be a monitoring terminal or a monitored terminal.
[0128] For example, in case of an emergency, the monitored terminal can actively initiate monitoring and push the video and audio stream to the server for direct monitoring and alarm, that is, the memberList can be empty regardless of whether there is a dispatcher viewing.
[0129] S402. The server receives the Session Description Protocol packets returned by each terminal in the target monitoring group.
[0130] As an example, in the embodiments of the present application, the server can receive the first Session Description Protocol packet sent by the monitoring terminal in the target monitoring group and the second Session Description Protocol packet sent by the monitored terminal in the target monitoring group.
[0131] For example, after the terminals in the target monitoring group receive the creation notice, they will generate an offer, which includes the sdp protocol content conforming to webrtc, used to negotiate the supported audio and video. The Sdp distinguishes its respective functions through the send, receive, and sendreceiver fields, and at the same time, the audio and video related fields are used to confirm whether there is audio and video.
[0132] S403. The server generates a target session description protocol message according to the received session description protocol message and the interaction protocol supported by the target monitoring group.
[0133] As an example, the embodiment of the present application may adopt the websocket signaling interaction protocol for monitoring and scheduling.
[0134] Exemplarily, the embodiment of the present application provides a websocket signaling transmission format as shown in the following content:
[0135] "msgType":"WsOpToServer",
[0136] "sig":"create",
[0137] "callType":"monitor"
[0138] "fromUserId":"user ID",
[0139] "fromUserName":"user name",
[0140] "audioOnly":1 for audio only; 0 for both audio and video
[0141] "roomId" is not generated at this time. Only fill in "000000" for the convenience of processing at this time.
[0142] presenter: ID of the initiator of the monitoring
[0143] memberList: [] is an array, the member array. The calling party should also be added. The first one is the initiator ID.
[0144] It should be noted that the above protocol transmission format is only an example, and the protocol transmission content can be changed according to actual needs.
[0145] S404. The server notifies each terminal in the target monitoring group of the target session protocol message, so that the monitoring terminals in the target monitoring group establish a transceiver connection between the server and the monitored terminals in the target monitoring group, and enable the monitoring terminals in the target monitoring group to perform monitoring and scheduling with the monitored terminals based on the target session description protocol message.
[0146] Furthermore, to better understand the monitoring and scheduling solution in the embodiment of the present application, the following is introduced based on different monitoring and scheduling scenarios, which are not limited to the following two scenarios specifically.
[0147] Scenario 1. The dispatcher performs video and audio monitoring and viewing on the monitored terminal
[0148] As shown in Figure 5 Figure 5 , the following is an interaction schematic diagram of a monitoring and scheduling method under Scenario 1 provided by an embodiment of the present application:
[0149] S501. The monitoring terminal sends a monitoring view request to the server.
[0150] S502. The server receives the monitoring view request and sends a first message to the monitoring terminal and the target monitored terminal. The first message includes a connection creation request and a target monitoring group identifier to which it belongs.
[0151] Among them, the monitoring terminal and the target monitored terminal are grouped by the server into the same target monitoring group.
[0152] For example, after receiving the creation signaling, the server needs to notify each member one by one according to the memberList member information, including the first person who created, and at the same time generate and distribute the roomid.
[0153] S503. The monitoring terminal generates a first Session Description Protocol (SDP) packet supporting video and audio, and the monitored terminal generates a second SDP packet supporting video and audio.
[0154] S504. The monitoring terminal and the monitored terminal respectively send corresponding SDP packets to the server.
[0155] S505. The server receives the SDP packets.
[0156] S506. The server sends a target session protocol packet to the monitored terminal.
[0157] As an example, after receiving the target protocol session packet sent by the server, the monitored party will perform operations such as net punching through the wall according to the WebRTC protocol to connect to the server.
[0158] S507. The monitored terminal generates video and audio data based on the target SDP packet.
[0159] S508. The server sends a target session protocol packet to the monitoring terminal.
[0160] As an example, after receiving the target protocol session packet sent by the server, the monitoring party will perform operations such as net punching through the wall according to the WebRTC protocol to connect to the server.
[0161] S509. The monitored terminal sends the video and audio data to the monitoring terminal through the server.
[0162] S510. The monitoring terminal receives and plays the audio and video data based on the target session description protocol.
[0163] Exemplarily, the monitoring terminal generates and plays the decoded data in audio and video format for playing according to the content negotiated by SDP.
[0164] Scenario 2: The dispatcher sends audio to one or some of the monitored terminals
[0165] As Figure 6 shown, it is an interaction schematic diagram of a monitoring and dispatching method under Scenario 2 provided by an embodiment of the present application:
[0166] S601. The monitoring terminal sends an audio instruction request to the server.
[0167] S602. The server receives the audio instruction request and sends a first message to the monitoring terminal and the target monitored terminal, and the first message includes a connection creation request and the identifier of the target monitoring group to which it belongs.
[0168] Wherein, the monitoring terminal and the target monitored terminal are grouped into the same target monitoring group by the server.
[0169] S603. The monitoring terminal generates a first session description protocol message supporting audio and video, and the monitored terminal generates a second session description protocol message supporting audio and video.
[0170] S604. The monitoring terminal and the monitored terminal respectively send the corresponding session description protocol messages to the server.
[0171] S605. The server receives the session description protocol message.
[0172] S606. The server sends a target session protocol message to the monitoring terminal.
[0173] As an example, after receiving the target protocol session message sent by the server, the monitoring party will perform operations such as net punching through the wall according to the webrtc protocol to connect to the server.
[0174] S607. The server sends a target session protocol message to the monitored terminal.
[0175] As an example, after receiving the target protocol session message sent by the server, the monitored party will perform operations such as net punching through the wall according to the webrtc protocol to connect to the server.
[0176] S608. The monitoring terminal generates audio data based on the target session description protocol message.
[0177] S609. The monitoring terminal sends the audio data to the monitored terminal through the server.
[0178] S610. The monitored terminal receives and plays the audio data based on the target session description protocol.
[0179] Exemplarily, the monitored terminal generates and plays the decoded data in audio format for playing according to the content negotiated by SDP.
[0180] Scenario 3. A new dispatcher monitors and views the video and audio of the monitored terminal
[0181] Among them, for the convenience of introduction, the following Figure 7 The shown example is introduced with the first monitoring device being in a state of being monitored and dispatched.
[0182] Such as Figure 7 As shown, it is an interaction schematic diagram of a monitoring and dispatching method under Scenario 3 provided by an embodiment of the present application:
[0183] S701. The first monitoring terminal sends a monitoring status request based on the first monitored device to the server.
[0184] The monitoring status request is used to indicate whether the first monitored device has been monitored and dispatched by other monitoring devices.
[0185] As an example, the embodiment of the present application can determine the monitoring status of the first monitored device in the following manner:
[0186] The server determines whether the first monitored device exists in the running room number (which can be understood as the session room identifier established based on the members in the target monitoring group). If it exists, it is considered that the first monitored device is in a state of being monitored and dispatched. If it does not exist, it is considered that the first monitored device is in a state of not being monitored and dispatched.
[0187] S702. The server returns the monitoring status result to the first monitoring device.
[0188] S703. After the first monitoring terminal determines that the first monitored device has been monitored, it generates a first session description protocol message supporting video and audio.
[0189] S704. The first monitoring terminal sends the first session protocol message to the server.
[0190] S705. The server receives the first session description protocol message sent by the first monitoring device.
[0191] S706. The server sends a target session description protocol message to the first monitoring terminal.
[0192] S707. The server sends the audio - video data generated by the first monitored device to the first monitoring terminal.
[0193] S708. The first monitoring terminal receives and plays the audio - video data based on the target session description protocol.
[0194] Exemplarily, in the embodiment of the present application, when dispatcher A monitors user A for the first time, the process described in Scenario 1 above will be executed. At this time, dispatcher A and user A belong to the same monitoring group. Later, no matter whether other users are monitored or other dispatchers join, they all belong to this monitoring group.
[0195] For example, when dispatcher B also needs to monitor user A, it will query the server to check if A is already being monitored. If user A is already being monitored, at this time, the dispatcher only needs to execute the operation of adding dispatcher B to this monitoring group according to the relevant steps introduced in Scenario 3. When user A has never been monitored, the operation is carried out according to the process of Scenario 1.
[0196] Scenario 4. The dispatcher ends the monitoring and dispatching of the monitored terminal
[0197] As Figure 8 shown, it is an interaction schematic diagram of a monitoring and dispatching method under Scenario 4 provided by the embodiment of the present application:
[0198] S801. The first monitoring terminal sends a monitoring status request based on the first monitored device to the server.
[0199] The monitoring status request is used to indicate whether the first monitored device is still being monitored and dispatched by other monitoring terminals.
[0200] S802. The server returns the monitoring status result to the first monitoring device.
[0201] S803. The first monitoring terminal determines whether the first monitored terminal is being monitored by other monitoring terminals. If so, execute S804; if not, execute S805.
[0202] S804. The first monitoring terminal directly closes its own connection.
[0203] S805. The first monitoring terminal sends a release instruction to the first monitored terminal through the server.
[0204] Exemplarily, the monitoring terminal directly sends a destroy instruction to the first monitored terminal through the server, which is used to instruct the monitored terminal to release resources and close the connection.
[0205] S806. After receiving the release instruction, the first monitored terminal releases resources and closes the connection.
[0206] Exemplarily, when dispatcher A finishes monitoring A, it is necessary to query from the server whether user A is being viewed by other dispatchers. If not, a destroy instruction is directly sent to user A, and user A releases resources and closes the connection. If there are other dispatchers such as B viewing, there is no need to send the destroy instruction. When a dispatcher closes the monitoring, it needs to release the monitoring resources and close its own connection.
[0207] As an example, an embodiment of the present application provides a format of the Destroy instruction, and the specific format is as follows:
[0208] "msgType":"WsOpToServer",
[0209] "sig":"destroy",
[0210] "callType":"monitor"
[0211] "fromUserId":"user ID",
[0212] "fromUserName":"user name",
[0213] "roomId" the ID of the monitoring group started to be created
[0214] Through the above solution, after the server receives the monitoring requests sent by the terminals in the target monitoring group, it determines the target monitoring group, and notifies the terminals in the target monitoring group of creating a sending connection and the target monitoring group identifier respectively. Then, the server generates a target session description protocol message based on the session description protocol messages returned by each terminal in the target monitoring group received, and notifies each terminal in the target monitoring group, so that the monitoring terminals in the target monitoring group establish a sending and receiving connection through the server and the monitored terminals in the target monitoring group, and enables the monitoring terminals and the monitored terminals in the target monitoring group to perform monitoring scheduling based on the target session description protocol message. That is, the embodiment of the present application forms a monitoring group, establishes a send and receive channel that can be shared simultaneously within the group, enables the monitoring party and the monitored party within the group to communicate data in real time, control the video and audio streams, send corresponding data streams when needed, and can flexibly adjust the group members, such as adding or reducing monitoring terminals, adding or reducing monitored terminals, etc. It not only effectively saves bandwidth, is convenient and fast, but also better realizes the flexibility and adaptability of monitoring scheduling, and greatly improves the user experience.
[0215] Based on the same inventive concept, an embodiment of the present application further provides a monitoring and scheduling device. The principle of the device for solving problems is similar to that of the monitoring and scheduling method provided above. The implementation of the device may refer to the implementation of the method, and the repeated parts will not be elaborated.
[0216] As Figure 9 shown, a monitoring and scheduling device provided by an embodiment of the present application includes a processor 900 and a memory 901. The memory is used to store programs executable by the processor, and the processor is used to read the programs in the memory and execute the following steps:
[0217] After receiving a monitoring and scheduling request sent by a first terminal, determine a target monitoring group corresponding to the first terminal; send a first message to each terminal in the target monitoring group, where the first message is used to indicate creating a sending connection and to indicate the target monitoring group identifier; receive session description protocol packets returned by each terminal in the target monitoring group; generate a target session description protocol packet according to the received session description protocol packets and the interaction protocol supported by the target monitoring group; notify the target session protocol packet to each terminal in the target monitoring group, so that a sending and receiving connection is established between the monitoring terminals and the monitored terminals in the target monitoring group through the server, and the monitoring terminals and the monitored terminals in the target monitoring group perform monitoring and scheduling based on the target session description protocol packet.
[0218] In a possible implementation manner, the processor 900 is specifically used for:
[0219] When the first terminal is a monitoring terminal, receive the monitoring and scheduling request sent by the first terminal, and determine the target monitoring group according to the identifier of the first terminal and the identifier of the monitored terminal included in the monitoring and scheduling request; or,
[0220] When the first terminal is a monitoring terminal, receive the monitoring and scheduling request sent by the first terminal, and determine the target monitoring group from a preset monitoring group according to the identifier of the first terminal and the relationship between the terminal identifier and the monitoring group identifier; or,
[0221] When the first terminal is a monitored terminal, receive the monitoring and scheduling request sent by the first terminal, and determine the target monitoring group according to the identifier of the first terminal and the preset monitoring terminal identifier; or,
[0222] When the first terminal is a monitored terminal, receive the monitoring and scheduling request sent by the first terminal, and determine the target monitoring group according to the identifier of the first terminal and the identifier of the monitored terminal and / or the identifier of the monitoring terminal included in the monitoring and scheduling request; or,
[0223] When the first terminal is the monitored terminal, receive the monitoring scheduling request sent by the first terminal, and determine the target monitoring group from the preset monitoring groups according to the identifier of the first terminal and the relationship between the terminal identifier and the monitoring group identifier.
[0224] In a possible implementation manner, the processor 900 is specifically configured to:
[0225] When the monitoring scheduling request is used to indicate scheduling to view the monitored terminal, notify the target session description protocol packet to the monitored terminals and the monitoring terminals in the target monitoring group, so that the monitored terminals connect to the server according to the interaction protocol and generate audio and video data according to the target session protocol packet;
[0226] Receive the audio and video data sent by the monitored terminals in the target monitoring group, and forward the audio and video data to the monitoring terminals in the target monitoring group, so that the monitoring terminals in the target monitoring group receive and play the audio and video data according to the target session protocol packet.
[0227] In a possible implementation manner, the processor 900 is specifically configured to:
[0228] When the monitoring scheduling request is used to indicate sending an audio instruction to the monitored terminal, notify the target session protocol packet to the monitored terminals and the monitoring terminals in the target monitoring group, so that the monitoring terminals connect to the server according to the interaction protocol and generate audio data according to the target session protocol packet;
[0229] Receive the audio data sent by the monitoring terminals in the target monitoring group, and forward the audio data to the monitored terminals in the target monitoring group, so that the monitored terminals in the target monitoring group receive and play the audio data according to the target session protocol packet.
[0230] In a possible implementation manner, the processor 900 is further configured to:
[0231] Receive a monitoring status request for the first monitored terminal sent by the first monitoring terminal, where the monitoring status request is used to indicate whether the first monitored terminal is monitored and scheduled by the second monitoring terminal; return the monitoring status result to the first monitoring terminal, so that when the first monitoring terminal needs to monitor the first monitored terminal and determines that the first monitored terminal has been monitored, send a first session protocol message to the server; receive the first session protocol message, and send the negotiated target session protocol message and the audio and video data generated by the first monitored terminal to the first monitoring terminal, so that the first monitoring terminal receives and plays the audio and video data according to the target session protocol message.
[0232] In a possible implementation manner, the processor 900 is further configured to:
[0233] Receive a monitoring status request for the first monitored terminal sent by the first monitoring terminal, where the monitoring status request is used to indicate whether the first monitored terminal is monitored and scheduled by the second monitoring terminal;
[0234] Return the monitoring status result to the first monitoring terminal, so that when the first monitoring terminal needs to end the monitoring of the first monitored terminal and determines that the first monitored terminal is monitored by the second monitoring terminal, directly close the connection; or
[0235] Return the monitoring status result to the first monitoring terminal, so that when the first monitoring terminal needs to end the monitoring of the first monitored terminal and determines that the first monitored terminal is not monitored, send a release request to the first monitored terminal through the server.
[0236] Based on the same inventive concept, an embodiment of the present application further provides another monitoring and scheduling device. The principle of the device for solving problems is similar to that of the monitoring and scheduling method provided above. The implementation of the device can refer to the implementation of the method, and the repeated parts will not be elaborated.
[0237] As Figure 10 shown, a monitoring and scheduling device provided by an embodiment of the present application includes:
[0238] A transceiver module 1001, configured to determine a target monitoring group corresponding to the first terminal after receiving a monitoring and scheduling request sent by the first terminal, notify each terminal in the target monitoring group to create a sending connection and the target monitoring group identifier; receive session description protocol messages returned by each terminal in the target monitoring group;
[0239] A processing module 1002, configured to generate a target session description protocol message according to the received session description protocol message and the interaction protocol supported by the target monitoring group;
[0240] The transceiver module 1001 is further configured to notify the target session protocol message to each terminal in the target monitoring group, so that the monitoring terminals in the target monitoring group establish a transceiver connection between the server and the monitored terminals in the target monitoring group, and enable the monitoring terminals and the monitored terminals in the target monitoring group to perform monitoring scheduling based on the target session description protocol message.
[0241] In a possible implementation manner, the transceiver module 1001 is specifically configured to:
[0242] When the first terminal is a monitoring terminal, receive a monitoring scheduling request sent by the first terminal, and determine the target monitoring group according to the identifier of the first terminal and the identifier of the monitored terminal included in the monitoring scheduling request; or,
[0243] When the first terminal is a monitoring terminal, receive a monitoring scheduling request sent by the first terminal, and determine the target monitoring group from the preset monitoring groups according to the identifier of the first terminal and the relationship between the terminal identifier and the monitoring group identifier; or,
[0244] When the first terminal is a monitored terminal, receive a monitoring scheduling request sent by the first terminal, and determine the target monitoring group according to the identifier of the first terminal and the preset monitoring terminal identifier; or,
[0245] When the first terminal is a monitored terminal, receive a monitoring scheduling request sent by the first terminal, and determine the target monitoring group according to the identifier of the first terminal and the identifier of the monitored terminal and / or the monitoring terminal identifier included in the monitoring scheduling request; or,
[0246] When the first terminal is a monitored terminal, receive a monitoring scheduling request sent by the first terminal, and determine the target monitoring group from the preset monitoring groups according to the identifier of the first terminal and the relationship between the terminal identifier and the monitoring group identifier.
[0247] In a possible implementation manner, the transceiver module 1001 is specifically configured to:
[0248] When the monitoring scheduling request is used to indicate scheduling to view the monitored terminal, notify the target session description protocol message to the monitored terminals and the monitoring terminals in the target monitoring group, so that the monitored terminals connect to the server according to the interaction protocol and generate audio and video data according to the target session protocol message;
[0249] Receive the audio and video data sent by the monitored terminals in the target monitoring group, and forward the audio and video data to the monitoring terminals in the target monitoring group, so that the monitoring terminals in the target monitoring group receive and play the audio and video data according to the target session protocol message.
[0250] In a possible implementation, the transceiver module 1001 is specifically configured to:
[0251] When the monitoring scheduling request is used to indicate sending an audio instruction to the monitored terminal, notify the target session protocol message to the monitored terminals and the monitoring terminals in the target monitoring group, so that the monitoring terminals connect to the server according to the interaction protocol and generate audio data according to the target session protocol message;
[0252] Receive the audio data sent by the monitoring terminals in the target monitoring group, and forward the audio data to the monitored terminals in the target monitoring group, so that the monitored terminals in the target monitoring group receive and play the audio data according to the target session protocol message.
[0253] In a possible implementation, the transceiver module 1001 is further configured to:
[0254] Receive a monitoring status request from a first monitoring terminal for a first monitored terminal, where the monitoring status request is used to indicate whether the first monitored terminal is monitored and scheduled by a second monitoring terminal; return the monitoring status result to the first monitoring terminal, so that when the first monitoring terminal needs to monitor the first monitored terminal and determines that the first monitored terminal has been monitored, send a first session protocol message to the server; receive the first session protocol message, and send the negotiated target session protocol message and the audio and video data generated by the first monitored terminal to the first monitoring terminal, so that the first monitoring terminal receives and plays the audio and video data according to the target session protocol message.
[0255] In a possible implementation, the transceiver module 1001 is further configured to:
[0256] Receive a monitoring status request from a first monitoring terminal for a first monitored terminal, where the monitoring status request is used to indicate whether the first monitored terminal is monitored and scheduled by a second monitoring terminal;
[0257] Return the monitoring status result to the first monitoring terminal, so that when the first monitoring terminal needs to end the monitoring of the first monitored terminal and determines that the first monitored terminal is monitored by the second monitoring terminal, directly close the connection; or
[0258] Return the monitoring status result to the first monitoring terminal, so that when the first monitoring terminal needs to end the monitoring of the first monitored terminal and determines that the first monitored terminal is not being monitored, send a release request to the first monitored terminal through the server.
[0259] Based on the same inventive concept, an embodiment of the present invention further provides a computer storage medium, on which a computer program is stored, and when the program is executed by a processor, the following steps are implemented:
[0260] After receiving a monitoring scheduling request sent by a first terminal, determine a target monitoring group corresponding to the first terminal; notify each terminal in the target monitoring group to create a sending connection and the target monitoring group identifier; receive Session Description Protocol (SDP) packets returned from each terminal in the target monitoring group; generate a target SDP packet according to the received SDP packets and the interaction protocol supported by the target monitoring group;
[0261] Notify the target SDP packet to each terminal in the target monitoring group, so that a sending and receiving connection is established between the monitoring terminal and the monitored terminal in the target monitoring group through the server, and the monitoring terminal and the monitored terminal in the target monitoring group perform monitoring scheduling based on the target SDP packet.
[0262] The present application is described above with reference to the block diagrams and / or flowcharts showing methods, apparatuses (systems) and / or computer program products according to embodiments of the present application. It should be understood that one block of the block diagrams and / or flowcharts and combinations of blocks in the block diagrams and / or flowcharts can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, and / or other programmable data processing devices to generate a machine, so that the instructions executed by the computer processor and / or other programmable data processing devices create a method for implementing the functions / actions specified in the blocks of the block diagrams and / or flowcharts.
[0263] Correspondingly, the present application can also be implemented by hardware and / or software (including firmware, resident software, microcode, etc.). Further, the present application can take the form of a computer program product on a computer-usable or computer-readable storage medium, which has computer-usable or computer-readable program code implemented in the medium for use by or in connection with an instruction execution system. In the context of the present application, a computer-usable or computer-readable medium can be any medium that can contain, store, communicate, transmit, or transfer a program for use by or in connection with an instruction execution system, apparatus, or device.
[0264] Obviously, those skilled in the art can make various changes and modifications to the present invention without departing from the spirit and scope of the present invention. Thus, if these modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalent technologies, the present invention is also intended to include these modifications and variations.
Claims
1. A monitoring and scheduling method, characterized in that, The method includes: After receiving a monitoring scheduling request sent by a first terminal, the server determines a target monitoring group corresponding to the first terminal; The server sends a first message to each terminal in the target monitoring group, where the first message is used to indicate creating a sending connection and to indicate the target monitoring group identifier; The server receives Session Description Protocol (SDP) packets returned from each terminal in the target monitoring group; The server generates a target SDP packet according to the received SDP packets and the interaction protocol supported by the target monitoring group; The server notifies the target SDP packet to each terminal in the target monitoring group, so that a monitoring terminal in the target monitoring group establishes a sending and receiving connection between the server and a monitored terminal in the target monitoring group, and so that the monitoring terminal and the monitored terminal in the target monitoring group perform monitoring scheduling based on the target SDP packet.
2. The method according to claim 1, wherein After receiving a monitoring scheduling request sent by a first terminal, the server determines a target monitoring group corresponding to the first terminal, including: When the first terminal is a monitoring terminal, the server receives the monitoring scheduling request sent by the first terminal, and determines the target monitoring group according to the identifier of the first terminal and the identifier of the monitored terminal included in the monitoring scheduling request; or, When the first terminal is a monitoring terminal, the server receives the monitoring scheduling request sent by the first terminal, and determines the target monitoring group from a preset monitoring group according to the identifier of the first terminal and the relationship between the terminal identifier and the monitoring group identifier; or, When the first terminal is a monitored terminal, the server receives the monitoring scheduling request sent by the first terminal, and determines the target monitoring group according to the identifier of the first terminal and a preset monitoring terminal identifier.
3. The method according to claim 1, characterized in that The server notifies the target session protocol packet to each terminal in the target monitoring group, so that a monitoring terminal in the target monitoring group establishes a sending and receiving connection between the server and a monitored terminal in the target monitoring group, and so that the monitoring terminal and the monitored terminal in the target monitoring group perform monitoring scheduling based on the target SDP packet, including: When the monitoring scheduling request is used to indicate scheduling to view a monitored terminal, the server notifies the target SDP packet to the monitored terminal and the monitoring terminal in the target monitoring group, so that the monitored terminal connects to the server according to the interaction protocol and generates audio and video data according to the target session protocol packet; The server receives the audio and video data sent by the monitored terminal in the target monitoring group, and forwards the audio and video data to the monitoring terminal in the target monitoring group, so that the monitoring terminal in the target monitoring group receives and plays the audio and video data according to the target session protocol packet.
4. The method according to claim 1, wherein The server notifies the target session protocol message to each terminal in the target monitoring group, so that the monitoring terminals in the target monitoring group establish a transceiver connection through the server and the monitored terminals in the target monitoring group, and the monitoring terminals and the monitored terminals in the target monitoring group perform monitoring scheduling based on the target session description protocol message, including: When the monitoring scheduling request is used to indicate sending an audio instruction to the monitored terminal, the server notifies the target session protocol message to the monitored terminals and the monitoring terminals in the target monitoring group, so that the monitoring terminals connect to the server according to the interaction protocol and generate audio data according to the target session protocol message; The server receives the audio data sent by the monitoring terminals in the target monitoring group and forwards the audio data to the monitored terminals in the target monitoring group, so that the monitored terminals in the target monitoring group receive and play the audio data according to the target session protocol message.
5. The method according to any one of claims 1 to 4, characterized in that The method further includes: The server receives a monitoring status request sent by a first monitoring terminal for a first monitored terminal, and the monitoring status request is used to indicate whether the first monitored terminal is monitored and scheduled by a second monitoring terminal; The server returns the monitoring status result to the first monitoring terminal, so that when the first monitoring terminal needs to monitor the first monitored terminal and determines that the first monitored terminal has been monitored, it sends a first session protocol message to the server; The server receives the first session protocol message and sends the negotiated target session protocol message and the audio and video data generated by the first monitored terminal to the first monitoring terminal, so that the first monitoring terminal receives and plays the audio and video data according to the target session protocol message.
6. The method according to any one of claims 1 to 4, characterized in that, The method further includes: The server receives a monitoring status request sent by a first monitoring terminal for a first monitored terminal, and the monitoring status request is used to indicate whether the first monitored terminal is monitored and scheduled by a second monitoring terminal; The server returns the monitoring status result to the first monitoring terminal, so that when the first monitoring terminal needs to end the monitoring of the first monitored terminal and determines that the first monitored terminal is monitored by the second monitoring terminal, it directly closes the connection; or The server returns the monitoring status result to the first monitoring terminal, so that when the first monitoring terminal needs to end the monitoring of the first monitored terminal and determines that the first monitored terminal is not monitored, it sends a release request to the first monitored terminal through the server.
7. A server, characterized in that, Including: At least one processor and a memory: The memory is used to store program instructions; The processor is used to call the program instructions stored in the memory and execute the method according to any one of claims 1-6 according to the obtained program.
8. A monitoring terminal, characterized in that, Including: At least one processor and a memory: The memory is used to store program instructions; The processor is configured to send a monitoring scheduling request to the server, where the monitoring scheduling request is used to instruct scheduling to view the monitored terminal; receive a first message sent by the server, generate a first Session Description Protocol (SDP) packet, where the first message is used to instruct to create a sending connection and to indicate the identifier of the corresponding target monitoring group; send the first SDP packet to the server, and receive a target session protocol packet sent by the server; receive and play the audio and video data sent by the monitored terminal in the target monitoring group through the server based on the target session protocol packet; or, The processor is configured to send a monitoring scheduling request to the server, where the monitoring scheduling request is used to instruct to send an audio instruction to the monitored terminal; receive a first message sent by the server, generate a first SDP packet; send the first SDP packet to the server, and receive a target session protocol packet sent by the server; generate audio data based on the target session protocol packet, and send the audio data to the monitored terminal in the target monitoring group through the server.
9. A monitored terminal, characterized in that, Comprising: at least one processor and a memory: The memory is configured to store program instructions; The processor is configured to, after receiving a first message sent by the server, generate a second SDP packet, where the first message is used to instruct to create a sending connection and to indicate the identifier of the corresponding target monitoring group; send the second SDP packet to the server, and receive a target session protocol packet sent by the server; generate audio and video data based on the target session protocol packet, and send the audio and video data to the monitoring terminal in the target monitoring group through the server; or, The processor is configured to, after receiving a first message sent by the server, generate a second SDP packet; send the second SDP packet to the server, and receive a target session protocol packet sent by the server; receive and play the audio data sent by the monitoring terminal in the target monitoring group through the server based on the target session protocol packet.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions, and when the computer instructions run on a computer, the computer is caused to execute the method according to any one of claims 1-6.