CN115150592A - Audio and video transmission method, server and computer readable storage medium - Google Patents

Audio and video transmission method, server and computer readable storage medium Download PDF

Info

Publication number
CN115150592A
CN115150592A CN202211072792.4A CN202211072792A CN115150592A CN 115150592 A CN115150592 A CN 115150592A CN 202211072792 A CN202211072792 A CN 202211072792A CN 115150592 A CN115150592 A CN 115150592A
Authority
CN
China
Prior art keywords
node
audio
target
video
nodes
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
CN202211072792.4A
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.)
Zhejiang Dahua Technology Co Ltd
Original Assignee
Zhejiang Dahua 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 Zhejiang Dahua Technology Co Ltd filed Critical Zhejiang Dahua Technology Co Ltd
Priority to CN202211072792.4A priority Critical patent/CN115150592A/en
Publication of CN115150592A publication Critical patent/CN115150592A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N7/00Television systems
    • H04N7/18Closed-circuit television [CCTV] systems, i.e. systems in which the video signal is not broadcast
    • H04N7/181Closed-circuit television [CCTV] systems, i.e. systems in which the video signal is not broadcast for receiving images from a plurality of remote sources
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/23Processing of content or additional data; Elementary server operations; Server middleware
    • H04N21/239Interfacing the upstream path of the transmission network, e.g. prioritizing client content requests
    • H04N21/2393Interfacing the upstream path of the transmission network, e.g. prioritizing client content requests involving handling client requests
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/23Processing of content or additional data; Elementary server operations; Server middleware
    • H04N21/24Monitoring of processes or resources, e.g. monitoring of server load, available bandwidth, upstream requests
    • H04N21/2405Monitoring of the internal components or processes of the server, e.g. server load

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • General Engineering & Computer Science (AREA)
  • Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)

Abstract

The application provides an audio and video transmission method, a server and a computer readable storage medium, which are applied to a management node and used for responding to an audio and video request instruction of a superior streaming media service and acquiring node load information of a plurality of sub-nodes; acquiring equipment request information of an audio and video request instruction, and acquiring service interaction information of a plurality of child nodes and monitoring equipment in the equipment request information according to the equipment request information; and selecting a target node for executing an audio/video request instruction based on the node load information and the service interaction information so that the target node acquires audio/video streams from the monitoring equipment and uploads the audio/video streams to the superior streaming media service. By the method, the appropriate target nodes are selected, so that the flow among the nodes is balanced, the stability of the nodes is improved, the stability and the uninterrupted of the audio and video service of the system are further ensured, the stable stream fetching of the superior streaming media service can be ensured to the outside, and the balanced stream fetching of each sub-node can be ensured to the inside.

Description

Audio and video transmission method, server and computer readable storage medium
Technical Field
The present application relates to the field of audio and video processing technologies, and in particular, to an audio and video transmission method, a server, and a computer-readable storage medium.
Background
In a video monitoring system, audio and video services are the most common and basic service functions, and most of the current systems are multi-server systems. However, how to ensure that the audio and video service of the system is stable and uninterrupted is to fundamentally process the flow balance among the servers and various abnormal conditions of the servers.
Most of the prior art in the industry selects load nodes according to the received streaming task, then dynamically changes the load nodes no longer, considers server exception only in the case that one server is completely unavailable, replaces execution capacity by another server, lacks dynamic migration consideration of the load nodes, lacks consideration of a scene that selected batch servers are unavailable and a scene that the servers are available but not good with network conditions among devices, and further lacks service requirements close to video monitoring requirements for service stability and uninterrupted system flow.
Disclosure of Invention
The application provides an audio and video transmission method, a server and a computer readable storage medium.
In order to solve the technical problem, the present application provides an audio and video transmission method, where the audio and video transmission method includes:
responding to an audio and video request instruction of a superior streaming media service, and acquiring node load information of a plurality of sub-nodes;
acquiring equipment request information of the audio and video request instruction, and acquiring service interaction information of a plurality of child nodes and monitoring equipment in the equipment request information according to the equipment request information;
and selecting a target node for executing the audio and video request instruction based on the node load information and the service interaction information, so that the target node acquires audio and video streams from the monitoring equipment and uploads the audio and video streams to the superior streaming media service.
Wherein the node load information comprises a node load value
The obtaining node load information of a plurality of child nodes includes:
and calculating the node load values of the plurality of child nodes in a preset time period through a one-time exponential smoothing algorithm.
The service interaction information comprises historical interaction sub-nodes of the monitoring equipment;
the selecting a target node for executing the audio and video request instruction based on the node load information and the service interaction information comprises:
acquiring a historical interaction sub-node of the monitoring equipment based on the service interaction information;
detecting whether the node load information of the historical interaction child nodes meets a node load condition;
and if so, setting the historical interaction sub-node as a target node for executing the audio and video request instruction.
The node load information comprises a node load value and a node load state;
after the historical interactive child nodes of the monitoring device are obtained, the audio and video transmission method further includes:
when the node load state of the historical interactive child node is an abnormal state, acquiring candidate child nodes except the historical interactive child node;
and acquiring the candidate child node with the minimum node load value, and setting the candidate child node as a target node for executing the audio and video request instruction.
Wherein the node load state of the abnormal state comprises: heartbeat abnormity between the child nodes and the management node, node load abnormity and node equipment code stream state abnormity;
and/or the node load state of the abnormal state comprises: the node load value of the child node is greater than a standard value determined by the load average value of all the child nodes.
The historical interaction child nodes comprise historical main child nodes and historical standby child nodes, and the node load information comprises node load values and node load states;
after the historical interactive child nodes of the monitoring device are obtained, the audio and video transmission method further includes:
when the node load state of the history main sub-node is a normal state and the node load state of the history standby sub-node is an abnormal state, setting the history main sub-node as a target main node for executing the audio and video request instruction;
and taking candidate sub-nodes except the historical interaction sub-node, obtaining the candidate sub-node with the minimum node load value, and setting the candidate sub-node as a target standby node for executing the audio and video request instruction.
The historical interaction child nodes comprise historical main child nodes and historical standby child nodes, and the node load information comprises node load values and node load states;
after the historical interactive child nodes of the monitoring device are obtained, the audio and video transmission method further includes:
when the node load state of the history master sub-node is an abnormal state and the node load state of the history backup sub-node is a normal state, setting the history backup sub-node as a target master node for executing the audio and video request instruction;
and taking candidate sub-nodes except the historical interaction sub-node, obtaining the candidate sub-node with the minimum node load value, and setting the candidate sub-node as a target standby node for executing the audio and video request instruction.
After the historical interactive child nodes of the monitoring device are obtained, the audio and video transmission method further comprises the following steps:
when the record of the historical interaction child node is null or the node load information of the interaction child node does not meet the node load condition;
acquiring candidate sub-nodes except the historical interaction sub-nodes;
and setting the candidate sub-node which performs service interaction with other monitoring equipment in the candidate sub-nodes as a target node for executing the audio and video request instruction.
The target node comprises a target main node and a target standby node;
after the target node executing the audio and video request instruction is selected, the audio and video transmission method further includes:
uploading the audio and video stream to the superior streaming media service by using the target main node;
the target standby node is used for switching to the target main node when the node load information of the target main node does not meet the node load condition, and uploading the audio and video stream to the upper-level streaming media service.
The target standby node acquires the audio and video stream from the monitoring device according to a preset stream-saving logic, wherein the stream-saving logic comprises: the video recording service sends pause command and/or low multiple playing at regular time.
After the target node executing the audio and video request instruction is selected, the audio and video transmission method further comprises the following steps:
acquiring node load information of the target main node and node load information of the target standby node, and acquiring a node load condition generated based on the node load information of all the child nodes;
and when the node load information of the target main node does not meet the node load condition and the node load information of the target standby node meets the node load condition, canceling the target main node, switching the target standby node to a new target main node, and reselecting a new target standby node from other child nodes.
The obtaining node load information of a plurality of child nodes includes:
acquiring heartbeat information, node load information, equipment code stream state and/or equipment network interaction state which are uploaded by the plurality of child nodes at regular time;
and generating the node load information of the plurality of sub-nodes according to the heartbeat information, the node load information, the equipment code stream state and/or the equipment network interaction state.
In order to solve the above technical problem, the present application provides a server,
the server comprises a memory and a processor, wherein the memory stores program data, and the processor is used for executing the program data to realize the audio and video transmission method.
To solve the above technical problem, the present application proposes a computer-readable storage medium,
the computer-readable storage medium stores program data for implementing the above-described audio-video transmission method when executed by a processor.
Compared with the prior art, the beneficial effect of this application is: the application provides an audio and video transmission method, which is applied to a management node and is used for responding to an audio and video request instruction of a superior streaming media service and acquiring node load information of a plurality of sub-nodes; acquiring equipment request information of an audio and video request instruction, and acquiring service interaction information of a plurality of child nodes and monitoring equipment in the equipment request information according to the equipment request information; and selecting a target node for executing an audio/video request instruction based on the node load information and the service interaction information so that the target node acquires audio/video streams from the monitoring equipment and uploads the audio/video streams to the superior streaming media service. By the method, the appropriate target nodes are selected, so that the flow among the nodes is balanced, the stability of the nodes is improved, the stability and the uninterrupted of the audio and video service of the system are further ensured, the stable stream fetching of the superior streaming media service can be ensured to the outside, and the balanced stream fetching of each sub-node can be ensured to the inside.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings required to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the description below are only some embodiments of the present invention, and it is obvious for those skilled in the art that other drawings can be obtained according to the drawings without creative efforts. Wherein:
fig. 1 is a schematic flowchart of a first embodiment of an audio/video transmission method provided in the present application;
fig. 2 is a schematic diagram of a framework of an audio/video transmission method provided in the present application;
fig. 3 is a schematic overall flow chart of an audio/video transmission method provided in the present application;
fig. 4 is a schematic flowchart of a second embodiment of an audio/video transmission method provided in the present application;
FIG. 5 is a schematic flow diagram illustrating the sub-steps of step S13 in the schematic flow diagram of the first embodiment provided in FIG. 1;
fig. 6 is a schematic flowchart of a third embodiment of an audio/video transmission method provided in the present application;
fig. 7 is a schematic flowchart of a fourth embodiment of an audio/video transmission method provided in the present application;
fig. 8 is a schematic flowchart of a fifth embodiment of an audio-video transmission method provided in the present application;
FIG. 9 is a block diagram of a server according to an embodiment of the present disclosure;
FIG. 10 is a computer storage provided by the present application the structure of one embodiment of the medium is schematically shown.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
The terms "first," "second," "third," "fourth," and the like in the description and in the claims of the present application and in the drawings described above, if any, are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the application described herein are, for example, capable of operation in sequences other than those illustrated or otherwise described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
In order to solve the above problem, the present application provides an audio and video transmission method, where the audio and video transmission method is applied to a management node, and the management node is a management server that has a management function and can execute a corresponding function in a plurality of servers, that is, in the present application, the management node is equal to the management server, and is described below using the management node.
Referring to fig. 1 and fig. 2 in detail, fig. 1 is a schematic flowchart of a first embodiment of an audio/video transmission method provided in the present application; fig. 2 is a schematic diagram of a framework of an audio/video transmission method provided in the present application.
As shown in fig. 1, the audio/video transmission method of the present embodiment specifically includes the following steps:
step S11: and responding to an audio and video request instruction of a superior streaming media service, and acquiring node load information of a plurality of sub-nodes.
Specifically, referring to fig. 2, the management node receives a request instruction of an upper-level streaming media service, where the request instruction optionally includes, but is not limited to, a provide receive stream address and port instruction, a request device stream instruction, an audio, video load instruction, a delete instruction, a modify instruction, and the like. The upper level streaming media can issue commands through a communication line or a remote control system.
In an embodiment of the present application, a management node obtains node load information of a plurality of child nodes through reporting of the plurality of child nodes. Please refer to fig. 2 and fig. 3 continuously, wherein fig. 3 is a general flow diagram of the audio/video transmission method provided by the present application. As shown in fig. 3, the audio/video transmission method according to the embodiment of the present application includes the following specific steps:
the management node acquires heartbeat information, node load information, equipment code stream state and equipment network interaction state which are uploaded by a plurality of child nodes at regular time.
Specifically, as shown in fig. 2 and fig. 3, the management node obtains heartbeat information, node load information, device code stream state, and network interaction state that are uploaded by a plurality of child nodes in a time node or a time period. The heartbeat information is information periodically transmitted between the main server and each device during the monitoring of the industrial equipment, so that the health condition of the device is judged, and whether the other side is alive or not is judged. In the present application, the heartbeat information is used to determine whether a node load is in a working state, and further determine whether the node meets a condition of becoming a target node. The code stream (Data Rate) is the Data flow used by a video file in a unit time, also called code Rate, and is the most important part in picture quality control in video coding. At the same resolution, the larger the code stream of the video file, the smaller the compression ratio, and the better the picture quality. The device code stream state in the application is the code stream of each child node in a certain time node or time period. The device network interaction state in the application is the interaction state between each child node, each child node and the superior streaming media service, and the interaction state between each child node and the monitoring device.
And the management node generates node load information of a plurality of child nodes according to the heartbeat information, the node load information, the equipment code stream state and the equipment network interaction state.
Furthermore, the management node analyzes the information and generates node load information corresponding to a plurality of child nodes according to the analysis result. Execution further continues with step S12.
Through the mode, the audio and video transmission method provided by the application can be compatible with dynamic reselection caused by the abnormality of the main and standby sub nodes, including heartbeat abnormality, node load abnormality, node equipment code stream state abnormality and the like between the main and standby sub nodes and the management node, so that the stability of the node is improved, and the stability and uninterrupted of the audio and video service of the system are further ensured.
Wherein the node load information of each child node may include a node load value.
Specifically, the node load value is used for evaluating the load capacity of the current node, and the management node judges whether the child node can become a target node according to the load capacity, so that load balancing is further realized.
Further, the node load values of the plurality of sub-nodes within the preset time period can be calculated through a one-time exponential smoothing algorithm.
The node load value includes, but is not limited to, bandwidth, CPU occupancy, memory occupancy, number of device channels, total number of pull streams, and the like.
In the prior art, a target node is selected according to an instantaneous fluctuation value of a load, and the load node is selected according to the instantaneous fluctuation value when a flow task is received, so that the load node is not dynamically changed subsequently. In the embodiment, the node load values of the plurality of sub-nodes in the preset period are calculated through the once exponential smoothing algorithm, the recent stable load values of all the nodes can be calculated, whether the node is abnormal or not is further judged according to the recent stable load values of the nodes, the dynamic migration of the load nodes can be calculated and evaluated, the stability and the accuracy are improved, and the technical problem in the prior art is solved.
Step S12: and acquiring the equipment request information of the audio and video request instruction, and acquiring the service interaction information of the monitoring equipment in the equipment request information and the plurality of child nodes according to the equipment request information.
Specifically, the management node analyzes the device request information of the obtained audio/video request instruction, and further obtains service interaction information of the monitoring device in the device request information and the plurality of child nodes.
The service interaction information comprises historical interaction information and current interaction information. Specifically, the historical interaction information is corresponding node information for performing stream pulling on a monitoring video of the monitoring equipment before the current moment; the current interactive information is corresponding node information of the current time when the stream of the monitoring video of the monitoring equipment is being pulled.
Step S13: and selecting a target node for executing the audio and video request instruction based on the node load information and the service interaction information so that the target node acquires audio and video streams from the monitoring equipment and uploads the audio and video streams to the upper-level streaming media service.
Specifically, the management node selects a node which makes the flow between the nodes balanced and stable as a target node according to the node load information and the service interaction information of the corresponding node and according to a preset condition, and the corresponding node selected as the target node further acquires the audio and video stream from the monitoring device and pushes the audio and video stream to a higher-level streaming media service.
By the method, the appropriate target nodes are selected, so that the flow among the nodes is balanced, the stability of the nodes is improved, the stability and the uninterrupted of the audio and video service of the system are further ensured, the stable stream taking of the superior stream media service can be ensured for the external, and the balanced stream pulling of each sub-node can be ensured for the internal.
In an embodiment provided in the present application, a target node that selects to execute an audio/video request instruction may be any node under one or more management nodes, and any embodiment in the present application is applicable to all target nodes, and details are not described here.
In an embodiment provided by the present application, the target node includes a target primary node and a target secondary node. The target nodes in the following embodiments each include a target primary node and a target secondary node.
In an embodiment of the present application, after step 13, please refer to fig. 2 and fig. 3, after a target node for executing the audio/video request instruction is selected, the following steps may be further performed: and uploading the audio and video stream to the upper-level streaming media service by using the target main node.
The target master node and the target standby node both acquire audio and video streams from the monitoring device, and the target master node directly pushes the audio and video streams to a superior streaming media service. And the target standby node is used for switching to the target main node when the node load information of the target main node does not meet the node load condition, and uploading the audio and video stream to a superior streaming media service.
In an embodiment of the application, the target standby node acquires the audio and video stream from the monitoring device according to a preset provincial stream logic.
The preset provincial stream logic includes, but is not limited to, a timed pause command of a video recording service, low-multiple playing, and the like.
Through the stream-saving logic, the conditions of slow stream opening, slow initial key frame loading, unstable initial code stream and the like caused by uncertain factors accompanying the stream opening of the monitoring equipment can be reduced, when the target standby node is switched to the target main node, the target standby node can immediately provide the code stream, and the condition that the superior stream media service code is not lost is ensured.
Further, at any time in the above process, the present application provides an embodiment, which is used to dynamically adjust the master node and the standby node under the abnormal condition in the above process. Referring to fig. 4 specifically, fig. 4 is a schematic flowchart of a second embodiment of the audio/video transmission method provided in the present application.
As shown in fig. 4, the specific steps are as follows:
step S31: the node load information of the target main node and the node load information of the target standby node are obtained, and the node load condition generated based on the node load information of all the child nodes is obtained.
Specifically, the management node obtains load information of the target master node and node load information of the target slave node selected in any step in this embodiment, and the management node analyzes all the node load information to generate a node load condition.
Optionally, in an embodiment of the present application, the node load condition is as follows: when the load information reported by the main child node exceeds the threshold value B times of the load average value of all the current child nodes, or part of the load information exceeds the threshold value C in proportion. For example, when the CPU occupancy rate reaches the product definition critical value, the management node selects the standby child node with the minimum node load value from the standby nodes as a new target master node, and cancels the original target master node.
In another embodiment of the present application, the load condition may also be as follows: when the main sub-node reports the device code stream state, wherein the device code stream state includes, but is not limited to, a frame loss rate and a packet loss rate of the device code stream state. When the frame loss rate reaches the threshold D, if the packet loss rate of the device network interaction state reaches the threshold E at the moment, the network state between the video monitoring device and the target main node is not good, the management node selects the standby sub-node with the minimum node load value from the standby nodes as a new target main node, and the original target main node is cancelled. If only the frame loss rate reaches the threshold value D and the packet loss rate of the network interaction state of the device does not reach the threshold value E, which means that the code stream sent by the device side is originally frame-lost, the management node reports an alarm and further performs operation and maintenance.
Step S32: and when the node load information of the target main node does not meet the node load condition and the node load information of the target standby node meets the node load condition, canceling the target main node, switching the target standby node into a new target main node, and reselecting a new target standby node from the other sub-nodes.
Specifically, in the process of pulling a stream at any node, when the load information of the original target node analyzed by the management node no longer meets the node load condition in step S31, the original target master node is cancelled, the minimum load value in the target slave node is used as the new target master node, and the minimum load value is selected from the remaining child nodes as the new target slave node.
Through the steps S31 to S32, the main and standby child nodes are abnormal in the process of flow pulling, new main and standby child nodes are dynamically selected according to the specific abnormality, and the method is compatible with dynamic reselection caused by various main and standby child node abnormalities, including heartbeat abnormality between the nodes and the management node, node load abnormality and node equipment code stream state abnormality. In this embodiment, dynamic code stream equalization is performed according to actual conditions, and in various abnormal scenarios, in addition to the exception of the single main or standby node, even if the initially selected main/standby sub-nodes are all abnormal, a new main/standby sub-node is dynamically selected to take over the role of pulling and supplying a stream to the outside from the monitoring device. Therefore, the node disaster tolerance rate can be improved, and the stability of the management node is improved.
In an embodiment provided by the present application, the service interaction information includes a history interaction child node of the monitoring device, that is, the history interaction child node may be multiplexed.
Referring to fig. 5, fig. 5 is a schematic flowchart of a sub-step of step S13 in the schematic flowchart of the first embodiment provided in fig. 1, and the specific steps are as follows:
step S131: and acquiring historical interaction child nodes of the monitoring equipment based on the service interaction information.
Specifically, in this embodiment, the service interaction information includes a history interaction child node of the monitoring device, where the history interaction child node manages a master node and a slave node that are selected in the history selection record by using the current time as a standard.
Step S132: and detecting whether the node load information of the historical interaction child nodes meets the node load condition.
In an embodiment of the present application, the node load information includes a node load value and a node load status.
Specifically, in this example, the load condition includes, but is not limited to, a heartbeat exception between the node and the management node, a node load exception, a node device code stream state exception, and whether the node load value exceeds the load mean value of all nodes plus the threshold a.
If the node load condition of the history interaction child node satisfies the node load condition, the process proceeds to step S133.
Step S133: and setting the historical interaction sub-node as a target node for executing the audio and video request instruction.
Specifically, when the management node detects that the node load information of the collocation history interaction sub-node meets the node load condition, the history interaction sub-node meeting the node load condition is set as a target node for executing an audio/video request instruction of a superior streaming media service. For example, when the video monitoring device is already using the node a and the node B to fetch the stream, and receives the stream fetching task of the device again, the node a and the node B may be multiplexed to perform the external distribution of the code stream.
By the mode, the main and standby nodes do not need to be selected again, the node stability is ensured, the additional node selection process is reduced, the strategy not only pays attention to the node load condition, but also considers the node stability of the video monitoring system from the practical perspective, and the original main and standby sub-nodes which can distribute the code stream by the same monitoring equipment stream taking task are multiplexed.
After obtaining the historical interaction child nodes of the monitoring device in step S131, the present application further provides an embodiment for selecting a target node, specifically please refer to fig. 6, where fig. 6 is a flowchart of a third embodiment provided in the present application, and the specific steps are as follows:
step S41: and when the node load state of the historical interaction child node is an abnormal state, acquiring candidate child nodes except the historical interaction child node.
Specifically, the management node analyzes the node load state of the historical interaction child node, and when the analysis result is in an abnormal state, candidate child nodes other than the abnormal historical interaction child node are obtained. In another embodiment of the present application, the node load status of the abnormal status includes, but is not limited to, the node load value of the child node and a standard value determined by being greater than the load average value of all the child nodes, and in this embodiment, the standard value is a value obtained by adding the threshold a to the average value of all the node load values.
Specifically, in an embodiment of the present application, the abnormal state of the node load state includes, but is not limited to, a heartbeat abnormality between the child node and the management node, a node load abnormality, and an abnormal state such as a node device code stream state abnormality.
Step S42: and acquiring the candidate child node with the minimum node load value, and setting the candidate child node as a target node for executing the audio/video request instruction.
By the method, when the node load state of the historical standby child node is in an abnormal state, the candidate child node can be called as a new standby child node, and the flow is pulled to the monitoring equipment again without the need of switching between the standby child node and the standby child node. The node stability is ensured, and the code stream can be uniformly pulled by each sub-node.
In step S131, after obtaining the historical interaction child node of the monitoring device, the audio/video transmission method further includes, referring to fig. 7 specifically, where fig. 7 is a schematic path diagram of a fourth embodiment provided in the present application, and the specific steps are as follows:
step S51: and when the node load state of the history main child node is in a normal state and the node load state of the history standby child node is in an abnormal state, setting the history main child node as a target main node for executing the audio and video request instruction.
Specifically, the management node acquires node load information of the historical master and slave nodes, further analyzes the node load information to obtain corresponding node load states, if the management node analyzes that the node load state of the historical master and slave nodes is a normal state and the node load state of the historical slave node is an abnormal state, the management node sets the historical master and slave nodes as target master nodes for executing the audio and video request instruction, and re-screens the target slave master nodes through step S52.
The abnormal state includes, but is not limited to, a heartbeat information, a node load information, a device code stream state, and a network interaction state.
Step S52: and acquiring candidate sub-nodes except the historical interactive sub-nodes, acquiring the candidate sub-node with the minimum node load value, and setting the candidate sub-node as a target standby node for executing the audio and video request instruction.
By the method, when the node load state of the historical slave node is in an abnormal state, the candidate slave node is called as a new slave node, and the flow is pulled to the monitoring equipment again without the need of master-slave switching. The node stability is ensured, and the code stream can be uniformly pulled by each sub-node.
The present application further provides an embodiment, when the record of the historical interaction child node is null, or the node load information of the interaction child node does not satisfy the node load condition, after step S52, the following steps are specifically executed:
and acquiring candidate child nodes except the historical interactive child nodes.
And setting the candidate sub-node which performs service interaction with other monitoring equipment in the candidate sub-nodes as a target node for executing the audio and video request instruction.
In step S131, after the historical interaction child node of the monitoring device is obtained, the audio/video transmission method further includes, referring to fig. 8 specifically, where fig. 8 is a schematic flowchart of a fifth embodiment provided in the present application, and the specific steps thereof are as follows:
step S61: and when the node load state of the historical master-slave node is an abnormal state and the node load state of the historical slave-slave node is a normal state, setting the historical slave-slave node as a target master node for executing the audio/video request instruction.
Specifically, the management node acquires node load information of a history main child node and a history standby child node, further analyzes the node load information to obtain a corresponding node load state, and sets the history standby child node as a target master node for executing an audio and video request instruction if the management node analyzes that the node load state of the history main child node is an abnormal state and the node load state of the history standby child node is a normal state.
Specifically, the abnormal state includes, but is not limited to, a heartbeat information, a node load information, a device code stream state, and a network interaction state abnormality.
Step S62: and acquiring candidate sub-nodes except the historical interactive sub-nodes, acquiring the candidate sub-node with the minimum node load value, and setting the candidate sub-node as a target standby node for executing the audio and video request instruction.
By the mode, the historical standby child node can be called as the historical main child node in time under the condition that the historical main child node is abnormal, the code stream is perfectly and continuously provided by the switching between the historical standby child node and the historical main child node, the system code stream is guaranteed to be lost as little as possible, and the code stream is not required to be pulled to the monitoring equipment again after the main and standby switching. The node stability is ensured, and the code stream can be uniformly pulled by each sub-node.
The application further provides an embodiment, when the node load states of the target main node and the target standby node are both abnormal states, the management node acquires and analyzes the load information of the historical main child node and the historical standby child node. The management node selects a main sub node with the minimum load value in the history main sub nodes to be set as a target main node for executing the audio and video request instruction, and selects a sub node with the minimum load value in the rest history sub nodes to be set as a target standby node for executing the audio and video request instruction.
Through the mode, the abnormal situation dynamic state can be further compatible, adjustment is made, interaction between the node and the equipment is improved, and the stability of the whole system is further improved.
The application also provides another embodiment, when the node load states of the target main node and the target standby node are both abnormal states, the management node can also acquire and analyze the load information of all current child nodes. And the management node selects the current main sub-node with the minimum node load value from all the current sub-nodes as a new target main node and sets the current main sub-node as a target main node for executing the audio and video request instruction. And selecting the node with the minimum node load value from the rest child nodes as a new standby child node, and setting the node as a target standby node for executing the audio and video request instruction.
Further, in the operation process, the management node may further monitor and adjust a new target master node and a new target standby node, and when the node load information of the target master node does not satisfy any of the criteria described in the above embodiments, the management node reselects from the current master and slave nodes until the entire system is stable and traffic between the nodes is balanced.
Through the mode, the abnormal situation dynamic state can be further compatible, adjustment is made, the interaction stability of the node and the equipment is improved, and the stability of the whole system is further improved.
In order to implement the audio and video transmission method in the foregoing embodiment, the present application further provides a server 500, specifically please refer to fig. 9, and fig. 9 is a schematic frame diagram of an embodiment of the server provided in the present application. The server 500 of the embodiment of the present application includes a processor 51, a memory 52, an input-output device 53, and a bus 54.
The processor 51, the memory 52, and the input/output device 53 are respectively connected to the bus 54, program data is stored in the memory 52, and the processor 51 is configured to execute the program data to implement the audio/video transmission method described in the foregoing embodiment.
In the embodiment of the present application, the processor 51 may also be referred to as a CPU (Central Processing Unit). The processor 51 may be an integrated voltage control system chip with signal processing capability. The processor 51 may also be a general purpose processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic, discrete hardware components. A general purpose processor may be a microprocessor or the processor 51 may be any conventional processor or the like.
Please refer to fig. 10, where fig. 10 is a schematic structural diagram of an embodiment of a computer storage medium provided in the present application, the computer storage medium 600 stores program data 61, and the program data 61 is used to implement the audio/video transmission method of the foregoing embodiment when being executed by a processor.
Embodiments of the present application may be implemented in software functional units and may be stored in a computer readable storage medium when sold or used as a stand-alone product. Based on such understanding, the technical solutions of the present application, which are essential or contributing to the prior art, or all or part of the technical solutions may be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server, a network device, or the like) or a processor (processor) to execute all or part of the steps of the methods according to the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
The above description is only for the purpose of illustrating embodiments of the present application and is not intended to limit the scope of the present application, which is defined by the claims and the accompanying drawings, and the equivalents and equivalent structures and equivalent processes used in the present application and the accompanying drawings are also directly or indirectly applicable to other related technical fields and are all included in the scope of the present application.

Claims (14)

1. An audio and video transmission method is applied to a management node, and comprises the following steps:
responding to an audio and video request instruction of a superior streaming media service, and acquiring node load information of a plurality of sub-nodes;
acquiring equipment request information of the audio and video request instruction, and acquiring service interaction information of a plurality of child nodes and monitoring equipment in the equipment request information according to the equipment request information;
and selecting a target node for executing the audio and video request instruction based on the node load information and the service interaction information, so that the target node acquires audio and video streams from the monitoring equipment and uploads the audio and video streams to the superior streaming media service.
2. Audio-visual transmission method according to claim 1,
the node load information comprises a node load value
The obtaining node load information of a plurality of child nodes includes:
and calculating the node load values of the plurality of child nodes in a preset time period through a one-time exponential smoothing algorithm.
3. Audio-video transmission method according to claim 1,
the service interaction information comprises historical interaction sub-nodes of the monitoring equipment;
the selecting a target node for executing the audio and video request instruction based on the node load information and the service interaction information comprises:
acquiring a historical interaction sub-node of the monitoring equipment based on the service interaction information;
detecting whether the node load information of the historical interaction child nodes meets a node load condition;
and if so, setting the historical interaction sub-node as a target node for executing the audio and video request instruction.
4. Audio-visual transmission method according to claim 3,
the node load information comprises a node load value and a node load state;
after the historical interactive child nodes of the monitoring device are obtained, the audio and video transmission method further includes:
when the node load state of the historical interactive child node is an abnormal state, acquiring candidate child nodes except the historical interactive child node;
and acquiring the candidate child node with the minimum node load value, and setting the candidate child node as a target node for executing the audio and video request instruction.
5. Audio-video transmission method according to claim 4,
the node load state of the abnormal state includes: heartbeat abnormity between the child node and the management node, node load abnormity and node equipment code stream state abnormity;
and/or the node load state of the abnormal state comprises: the node load value of the child node is greater than a standard value determined by the load average value of all the child nodes.
6. Audio-video transmission method according to claim 3,
the historical interactive child nodes comprise historical main child nodes and historical standby child nodes, and the node load information comprises node load values and node load states;
after the historical interactive child nodes of the monitoring device are obtained, the audio and video transmission method further includes:
when the node load state of the history main child node is a normal state and the node load state of the history standby child node is an abnormal state, setting the history main child node as a target main node for executing the audio and video request instruction;
and taking candidate sub-nodes except the historical interaction sub-node, obtaining the candidate sub-node with the minimum node load value, and setting the candidate sub-node as a target standby node for executing the audio and video request instruction.
7. Audio-video transmission method according to claim 3,
the historical interactive child nodes comprise historical main child nodes and historical standby child nodes, and the node load information comprises node load values and node load states;
after the historical interactive child nodes of the monitoring device are obtained, the audio and video transmission method further includes:
when the node load state of the history master sub-node is an abnormal state and the node load state of the history backup sub-node is a normal state, setting the history backup sub-node as a target master node for executing the audio and video request instruction;
and taking candidate sub-nodes except the historical interaction sub-node, obtaining the candidate sub-node with the minimum node load value, and setting the candidate sub-node as a target standby node for executing the audio and video request instruction.
8. Audio-video transmission method according to claim 3,
after the historical interactive child nodes of the monitoring device are obtained, the audio and video transmission method further includes:
when the record of the historical interaction child node is null or the node load information of the interaction child node does not meet the node load condition;
acquiring candidate sub-nodes except the historical interaction sub-nodes;
and setting the candidate sub-node which performs service interaction with other monitoring equipment in the candidate sub-nodes as a target node for executing the audio and video request instruction.
9. Audio-video transmission method according to claim 1,
the target node comprises a target main node and a target standby node;
after the target node executing the audio and video request instruction is selected, the audio and video transmission method further includes:
uploading the audio and video stream to the superior streaming media service by using the target main node;
the target standby node is used for switching to the target main node when the node load information of the target main node does not meet the node load condition, and uploading the audio and video stream to the upper-level streaming media service.
10. Audio-video transmission method according to claim 9,
the target standby node acquires the audio and video stream from the monitoring equipment according to a preset stream-saving logic, wherein the stream-saving logic comprises: the video recording service sends pause command and/or low multiple playing at regular time.
11. Audio-video transmission method according to claim 9,
after the target node executing the audio and video request instruction is selected, the audio and video transmission method further comprises the following steps:
acquiring node load information of the target main node and node load information of the target standby node, and acquiring a node load condition generated based on the node load information of all the child nodes;
and when the node load information of the target main node does not meet the node load condition and the node load information of the target standby node meets the node load condition, canceling the target main node, switching the target standby node to a new target main node, and reselecting a new target standby node from other child nodes.
12. Audio-video transmission method according to claim 1,
the obtaining node load information of a plurality of child nodes includes:
acquiring heartbeat information, node load information, equipment code stream state and/or equipment network interaction state which are uploaded by the plurality of child nodes at regular time;
and generating the node load information of the plurality of sub-nodes according to the heartbeat information, the node load information, the equipment code stream state and/or the equipment network interaction state.
13. A server, characterized in that it comprises a memory, in which program data are stored, and a processor for executing the program data to implement the audio-video transmission method according to any one of claims 1 to 12.
14. A computer-readable storage medium, characterized in that the computer-readable storage medium stores program data for implementing the audio-visual transmission method according to any one of claims 1-12 when the program data is executed by a processor.
CN202211072792.4A 2022-09-02 2022-09-02 Audio and video transmission method, server and computer readable storage medium Pending CN115150592A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211072792.4A CN115150592A (en) 2022-09-02 2022-09-02 Audio and video transmission method, server and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211072792.4A CN115150592A (en) 2022-09-02 2022-09-02 Audio and video transmission method, server and computer readable storage medium

Publications (1)

Publication Number Publication Date
CN115150592A true CN115150592A (en) 2022-10-04

Family

ID=83416230

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211072792.4A Pending CN115150592A (en) 2022-09-02 2022-09-02 Audio and video transmission method, server and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN115150592A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116437158A (en) * 2023-06-13 2023-07-14 浙江大华技术股份有限公司 Video transmission method, video transmission device, and computer-readable storage medium
CN117459537A (en) * 2023-12-21 2024-01-26 广州宇中网络科技有限公司 Multi-cloud-based device interaction method, device and readable storage medium

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101174977A (en) * 2006-10-31 2008-05-07 中兴通讯股份有限公司 Wireless Ad hoc network multimedia video active-standby path transmission method
CN101193023A (en) * 2006-11-20 2008-06-04 中兴通讯股份有限公司 Method for establishing backup path of video transmission in wireless Ad hoc network
CN103926893A (en) * 2014-04-14 2014-07-16 浪潮电子信息产业股份有限公司 Cloud container data center monitoring system
US20170034552A1 (en) * 2015-07-29 2017-02-02 Inventec (Pudong) Technology Corporation Video processing apparatus
CN107220108A (en) * 2017-07-06 2017-09-29 山东超越数控电子有限公司 A kind of method and system for realizing cloud data center load balancing
CN108964948A (en) * 2017-05-19 2018-12-07 北京金山云网络技术有限公司 Principal and subordinate's service system, host node fault recovery method and device
CN109982034A (en) * 2017-12-28 2019-07-05 杭州海康威视系统技术有限公司 Access request processing method and processing device in video monitoring system
CN113055963A (en) * 2021-03-30 2021-06-29 联想(北京)有限公司 Information processing method and service equipment of communication network
CN113891358A (en) * 2021-09-30 2022-01-04 阿里巴巴达摩院(杭州)科技有限公司 Load balancing method and device of cloud network and storage medium
CN114244848A (en) * 2021-12-15 2022-03-25 中国电信股份有限公司 Candidate streaming media determining and load balancing method, device, server and medium

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101174977A (en) * 2006-10-31 2008-05-07 中兴通讯股份有限公司 Wireless Ad hoc network multimedia video active-standby path transmission method
CN101193023A (en) * 2006-11-20 2008-06-04 中兴通讯股份有限公司 Method for establishing backup path of video transmission in wireless Ad hoc network
CN103926893A (en) * 2014-04-14 2014-07-16 浪潮电子信息产业股份有限公司 Cloud container data center monitoring system
US20170034552A1 (en) * 2015-07-29 2017-02-02 Inventec (Pudong) Technology Corporation Video processing apparatus
CN108964948A (en) * 2017-05-19 2018-12-07 北京金山云网络技术有限公司 Principal and subordinate's service system, host node fault recovery method and device
CN107220108A (en) * 2017-07-06 2017-09-29 山东超越数控电子有限公司 A kind of method and system for realizing cloud data center load balancing
CN109982034A (en) * 2017-12-28 2019-07-05 杭州海康威视系统技术有限公司 Access request processing method and processing device in video monitoring system
CN113055963A (en) * 2021-03-30 2021-06-29 联想(北京)有限公司 Information processing method and service equipment of communication network
CN113891358A (en) * 2021-09-30 2022-01-04 阿里巴巴达摩院(杭州)科技有限公司 Load balancing method and device of cloud network and storage medium
CN114244848A (en) * 2021-12-15 2022-03-25 中国电信股份有限公司 Candidate streaming media determining and load balancing method, device, server and medium

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116437158A (en) * 2023-06-13 2023-07-14 浙江大华技术股份有限公司 Video transmission method, video transmission device, and computer-readable storage medium
CN116437158B (en) * 2023-06-13 2023-09-01 浙江大华技术股份有限公司 Video transmission method, video transmission device, and computer-readable storage medium
CN117459537A (en) * 2023-12-21 2024-01-26 广州宇中网络科技有限公司 Multi-cloud-based device interaction method, device and readable storage medium
CN117459537B (en) * 2023-12-21 2024-03-19 广州宇中网络科技有限公司 Multi-cloud-based device interaction method, device and readable storage medium

Similar Documents

Publication Publication Date Title
CN115150592A (en) Audio and video transmission method, server and computer readable storage medium
US10972344B2 (en) Automated adjustment of subscriber policies
CN109819057B (en) Load balancing method and system
CN111818159B (en) Management method, device, equipment and storage medium of data processing node
US7441261B2 (en) Video system varying overall capacity of network of video servers for serving specific video
CN111459750A (en) Private cloud monitoring method and device based on non-flat network, computer equipment and storage medium
EP3361703A1 (en) Load balancing method, related device and system
US20020083169A1 (en) Network monitoring system
CN112003763B (en) Network link monitoring method, monitoring device, monitoring equipment and storage medium
JP2015510201A (en) Method and apparatus for rapid disaster recovery preparation in a cloud network
CN110418154B (en) Multimedia data pushing method, device and system
CN108337127B (en) Application performance monitoring method, system, terminal and computer readable storage medium
CN111324471B (en) Service adjustment method, device, equipment and storage medium
CN108391089B (en) Monitoring flow pushing method and device of multi-path camera and monitoring system
CN110933178A (en) Method for adjusting node configuration in cluster system and server
KR20180092208A (en) Apparatus for diagnosing service error and client device
CN107743700B (en) Method for preserving media plane quality
CN112260946B (en) Link failure processing method and device, terminal equipment and storage medium
EP1679826B1 (en) Terminal apparatus, terminal apparatus control method, network system, network system control method, program and recording medium
US20080086562A1 (en) Management support method, management support system, management support apparatus and recording medium
EP3691261A1 (en) Method and device for locating video service fault, and storage medium
CN109510730B (en) Distributed system, monitoring method and device thereof, electronic equipment and storage medium
CN113489149A (en) Power grid monitoring system service master node selection method based on real-time state perception
GB2552376A (en) Method and device for efficiently generating, based on a video flow, a plurality of video streams required by modules of a video surveillance system
CN111427704B (en) Remote monitoring method, device, equipment and storage medium for configuration instruction

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20221004