CN113542331B - Data stream scheduling method and device - Google Patents

Data stream scheduling method and device Download PDF

Info

Publication number
CN113542331B
CN113542331B CN202010318119.9A CN202010318119A CN113542331B CN 113542331 B CN113542331 B CN 113542331B CN 202010318119 A CN202010318119 A CN 202010318119A CN 113542331 B CN113542331 B CN 113542331B
Authority
CN
China
Prior art keywords
client
source node
data transmission
transmission link
streaming media
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202010318119.9A
Other languages
Chinese (zh)
Other versions
CN113542331A (en
Inventor
刘亚峰
尹义文
何代钦
李燕舞
凌长宾
缪平平
臧席潭
唐启勇
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Bnc Technologies Co ltd
Original Assignee
Bnc Technologies 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 Bnc Technologies Co ltd filed Critical Bnc Technologies Co ltd
Priority to CN202010318119.9A priority Critical patent/CN113542331B/en
Publication of CN113542331A publication Critical patent/CN113542331A/en
Application granted granted Critical
Publication of CN113542331B publication Critical patent/CN113542331B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/14Session management
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/02Details
    • H04L12/16Arrangements for providing special services to substations
    • H04L12/18Arrangements for providing special services to substations for broadcast or conference, e.g. multicast
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/14Session management
    • H04L67/141Setup of application sessions

Abstract

The embodiment of the invention provides a scheduling method and a scheduling device of a data stream, relates to the technical field of data transmission, and is used for reducing occupation of network resources when a source node transmits data to a plurality of clients. The method comprises the following steps: under the condition that a first client needs to acquire a data stream output by a first source node in a streaming media system, determining whether a second client exists according to a link state table, wherein the link state table stores data transmission links established between each client and each source node, and the second client is a client which establishes a data transmission link with the first source node; if the second client exists, acquiring a data stream output by the first source node through the second client; if the second client does not exist, a data transmission link between the first client and the first source node is established, and the data flow output by the first source node is acquired based on the data transmission link between the first client and the first source node. The embodiment of the invention is used for scheduling the data flow.

Description

Data stream scheduling method and device
Technical Field
The present invention relates to the field of data transmission technologies, and in particular, to a method and an apparatus for scheduling a data stream.
Background
With the development of modern computers and network technologies, the amount of data that needs to be transmitted by network nodes is increasing, and great pressure is put on network bandwidth.
At present, in a high-speed local area network system, when a plurality of clients need to acquire data from a certain source node, the clients respectively establish data transmission links with the source node and acquire the data output by the source node through the data transmission links established with the source node, however, in the mode that each client establishes the data transmission links with the source node and acquires the data output by the source node through the data transmission links established with the source node, a great deal of network resources are required to be occupied, and the waste of the network resources is caused.
Disclosure of Invention
In view of the above, the present invention provides a method and apparatus for scheduling a data stream, which are used to reduce occupation of network resources when a source node transmits data to a plurality of clients.
In order to achieve the above object, the technical solution provided by the embodiments of the present invention is as follows:
in a first aspect, a method for scheduling a data stream is provided, including:
under the condition that a first client needs to acquire a data stream output by a first source node in a streaming media system, determining whether a second client exists in the streaming media system according to a link state table, wherein the link state table stores data transmission links established between each client and each source node in the streaming media system, and the second client is a client which establishes a data transmission link with the first source node in the streaming media system;
if the second client exists in the streaming media system, acquiring a data stream output by the first source node through the second client;
if the second client does not exist in the streaming media system, a data transmission link between the first client and the first source node is established, and a data stream output by the first source node is acquired based on the data transmission link between the first client and the first source node.
As an optional implementation manner of the embodiment of the present invention, after establishing a data transmission link between the first client and the first source node, the method further includes:
broadcasting first indication information to other clients except the first client in the streaming media system;
the first indication information is used for indicating that a data transmission link is established between the first client and the first source node.
As an optional implementation manner of the embodiment of the present invention, the broadcasting, by the first client, first indication information to clients other than the first client in the streaming media system includes:
and broadcasting the first indication information to other clients except the first client in the streaming media system once every interval for a first preset duration under the condition that a data transmission link between the first client and the first source node is not disconnected.
As an optional implementation manner of the embodiment of the present invention, the method further includes:
receiving second indication information broadcast by a third client, wherein the second indication information is used for indicating that a data transmission link is established between the third client and a second source node;
and adding a data transmission link established between the third client and the second source node in the link state table according to the second indication information.
As an optional implementation manner of the embodiment of the present invention, after adding, according to the second indication information, a data transmission link established between the third client and the second source node in the link state table, the method further includes:
and deleting the data transmission link between the third client and the second source node from the link state table under the condition that the time length of not receiving the second indication information is longer than a second preset time length.
In a second aspect, a scheduling apparatus for a data stream is provided, where the scheduling apparatus for a data stream belongs to a first client in a streaming media system, and the apparatus includes:
the processing unit is used for determining whether a second client exists in the streaming media system according to a link state table when the first client needs to acquire a data stream output by a first source node, wherein the link state table stores data transmission links established between each client and each source node in the streaming media system, and the second client is a client which establishes a data transmission link with the first source node in the streaming media system;
the first acquisition unit is used for acquiring the data stream output by the first source node through the second client when the processing unit determines that the second client exists in the streaming media system;
the establishing unit is used for establishing a data transmission link between the first client and the first source node under the condition that the processing unit determines that the second client does not exist in the streaming media system;
and the second acquisition unit is used for acquiring the data flow output by the first source node based on the data transmission link between the first client and the first source node.
As an alternative implementation manner of the embodiment of the present invention, the apparatus further includes:
a broadcasting unit, configured to broadcast first indication information to other clients in the streaming media system except the first client after a data transmission link between the first client and the first source node is established;
the first indication information is used for indicating that a data transmission link is established between the first client and the first source node.
As an optional implementation manner of the embodiment of the present invention, the broadcasting unit is specifically configured to broadcast, when a data transmission link between the first client and the first source node is not disconnected, the first indication information to other clients in the streaming media system except for the first client once every interval for a first preset duration.
As an alternative implementation manner of the embodiment of the present invention, the apparatus further includes:
the receiving unit is used for receiving second indication information broadcast by a third client, wherein the second indication information is used for indicating that a data transmission link is established between the third client and a second source node;
and the updating unit is used for adding the data transmission link established between the third client and the second source node in the link state table according to the second indication information.
As an optional implementation manner of the embodiment of the present invention, the updating unit is further configured to delete, after adding, according to the second indication information, the data transmission link established between the third client and the second source node in the link state table, in a case where a time length during which the second indication information is not received is greater than a second preset time length, the data transmission link between the third client and the second source node from the link state table in the link state table.
In a third aspect, an embodiment of the present invention provides a computer readable storage medium, on which a computer program is stored, where the computer program when executed by a processor implements a method for scheduling a data stream according to any one of the foregoing first aspect or an optional implementation manner of the first aspect.
In a fourth aspect, an embodiment of the present invention provides a computer readable storage medium, where a computer program is stored, where the computer program is executed by a processor to implement a method for scheduling a data stream according to the first aspect or any optional implementation manner of the first aspect.
In the data stream scheduling method provided by the embodiment of the invention, under the condition that a first client needs to acquire a data stream output by a first source node in a streaming media system, whether a second client which establishes a data transmission link with the first source node exists in the streaming media system is determined according to a link state table, and if so, the data stream output by the first source node is acquired through the second client; if the data stream is not stored, a data transmission link between the first client and the first source node is established, and the data stream output by the first source node is acquired based on the data transmission link between the first client and the first source node. When the first client in the embodiment of the invention needs to acquire the data stream output by the first source node, whether the client which has established the data transmission link with the first source node exists or not is judged, if so, the data transmission link is not established with the first source node, and the data stream output by the first source node is acquired through the client which has established the data transmission link with the first source node.
Drawings
Various other advantages and benefits will become apparent to those of ordinary skill in the art upon reading the following detailed description of the preferred embodiments. The drawings are only for purposes of illustrating the preferred embodiments and are not to be construed as limiting the invention. Also, like reference numerals are used to designate like parts throughout the figures.
Fig. 1 is a flowchart of steps of a method for scheduling a data stream according to an embodiment of the present invention;
fig. 2 is a schematic diagram of a streaming media system according to an embodiment of the present invention;
FIG. 3 is a second schematic diagram of a streaming media system according to an embodiment of the present invention;
FIG. 4 is a third schematic diagram of a streaming media system according to an embodiment of the present invention;
FIG. 5 is a schematic diagram of a streaming media system according to an embodiment of the present invention;
FIG. 6 is one of schematic block diagrams of a scheduling apparatus for data flows according to an embodiment of the present invention;
FIG. 7 is a second schematic block diagram of a scheduling apparatus for data flow according to an embodiment of the present invention;
fig. 8 is a schematic hardware structure of a scheduling apparatus for data flow according to an embodiment of the present invention.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and fully with reference to the accompanying drawings, in which it is evident that the embodiments described are some, but not all embodiments of the invention. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
The term "and/or" is herein merely an association relationship describing an associated object, meaning that there may be three relationships, e.g., a and/or B, may represent: a exists alone, A and B exist together, and B exists alone.
The terms first and second and the like in the description and in the claims, are used for distinguishing between synchronous objects and not for describing a particular sequential order of objects. For example, a first client and a second client, etc., are used to distinguish between different clients, rather than to describe a particular order of clients.
In embodiments of the invention, words such as "exemplary" or "such as" are used to mean serving as an example, instance, or illustration. Any embodiment or design described herein as "exemplary" or "e.g." in an embodiment should not be taken as preferred or advantageous over other embodiments or designs. Rather, the use of words such as "exemplary" or "such as" is intended to present related concepts in a concrete fashion. Furthermore, in the description of the embodiments of the present invention, unless otherwise indicated, the meaning of "plurality" means two or more.
The data stream scheduling method provided by the embodiment of the invention can be applied to any application scene comprising a plurality of source nodes outputting data streams and clients receiving the data streams. For example: port remote monitoring system, market monitoring, district monitoring, traffic station monitoring, etc. The description of the application scenario in the embodiment of the present invention is only an exemplary description, and the application scenario of the scheduling method of the data stream in the embodiment of the present invention is not limited.
Referring to fig. 1, an embodiment of the present invention provides a method for scheduling a data stream, where the method for scheduling a data stream includes the following steps:
s11, under the condition that a first client needs to acquire a data stream output by a first source node in a streaming media system, determining whether a second client exists in the streaming media system according to a link state table.
The link state table stores data transmission links established between each client and each source node in the streaming media system, and the second client is a client establishing a data transmission link with the first source node in the streaming media system.
By way of example, the link state table in the embodiments of the present invention may be as shown in table 1 below:
TABLE 1
When the link state table is shown in table 1, it can be known from the link state table that a data transmission link is established between the source node 1 and the client 3, a data transmission link is established between the source node 2 and the client 1, and a data transmission link … … is established between the source node 3 and the client 2.
When any client in the streaming media system establishes a data transmission link with the first source node, a second client exists in the streaming media system, and when all clients in the streaming media system do not establish a data transmission link with the first source node, the second client does not exist in the streaming media system.
In the above step S11, if the second client exists in the streaming media system, the following step S12 is executed; if the second client exists in the streaming media system, the following step S13 is executed.
S12, acquiring the data stream output by the first source node through the second client.
That is, if a data transmission link is established between the existing client and the first source node, the client establishing the data transmission link with the first source node obtains the data stream output by the first source node.
For example, a data transmission link may be established between the first client and the second client, where the first client receives the data stream output by the first source node through the data transmission link between the first client and the second client.
S13, establishing a data transmission link between the first client and the first source node, and acquiring a data stream output by the first source node based on the data transmission link between the first client and the first source node.
That is, if all the clients in the streaming media system do not establish a data transmission link with the first source node, the first client establishes a data transmission link with the first source node, and obtains a data stream output by the first source node through the established data transmission link.
In the data stream scheduling method provided by the embodiment of the invention, under the condition that a first client needs to acquire a data stream output by a first source node in a streaming media system, whether a second client which establishes a data transmission link with the first source node exists in the streaming media system is determined according to a link state table, and if so, the data stream output by the first source node is acquired through the second client; if the data stream is not stored, a data transmission link between the first client and the first source node is established, and the data stream output by the first source node is acquired based on the data transmission link between the first client and the first source node. When the first client in the embodiment of the invention needs to acquire the data stream output by the first source node, whether the client which has established the data transmission link with the first source node exists or not is judged, if so, the data transmission link is not established with the first source node, and the data stream output by the first source node is acquired through the client which has established the data transmission link with the first source node.
As an optional embodiment of the present invention, after the step S13 (the data transmission link between the first client and the first source node is established), the method provided by the embodiment of the present invention further includes:
broadcasting first indication information to other clients except the first client in the streaming media system;
the first indication information is used for indicating that a data transmission link is established between the first client and the first source node.
Specifically, the implementation manner of broadcasting the first indication information to the other clients except the first client in the streaming media system may be:
and broadcasting the first indication information to other clients except the first client in the streaming media system once every interval for a first preset duration under the condition that a data transmission link between the first client and the first source node is not disconnected.
That is, as long as the data transmission link between the first client and the first source node is not disconnected, the first client broadcasts the first indication information once every predetermined time period.
The first preset duration may be set by a person skilled in the art according to requirements, and in the embodiment of the present invention, the time length of the first preset duration is not limited. Illustratively, the first preset duration may be 10 seconds, 30 seconds, etc.
As an optional implementation manner of the embodiment of the present invention, the scheduling method of the data stream provided by the embodiment of the present invention further includes:
receiving second indication information broadcast by a third client, wherein the second indication information is used for indicating that a data transmission link is established between the third client and a second source node;
and adding a data transmission link established between the third client and the second source node in the link state table according to the second indication information.
That is, the manner in which each client in the streaming media system updates the locally stored link state table includes: and receiving indication information which is sent by other clients in the streaming media system and is used for indicating that a data transmission link is established between a certain client and the second source node, and maintaining the data transmission link indicated by the indication information to a locally stored link state table.
Further, after adding the data transmission link established between the third client and the second source node in the link state table according to the second indication information, the method provided by the embodiment of the present invention further includes:
and deleting the data transmission link between the third client and the second source node from the link state table under the condition that the time length of not receiving the second indication information is longer than a second preset time length.
That is, the manner in which each client in the streaming media system updates the locally stored link state table further includes: and if the time length of the indication information for indicating a certain data transmission link is not received and exceeds the second preset time length, deleting the data transmission link from the locally stored link state table.
Likewise, the second preset duration may be set by a person skilled in the art according to requirements, and in the embodiment of the present invention, the time length of the second preset duration is not limited. The second preset time period may be, for example, 20 seconds or 60 seconds.
It should be noted that, in the embodiment of the present invention, the second preset duration needs to be longer than the first preset duration, otherwise, the client in the streaming media system may broadcast the indication information twice in the gap between other clients, delete the data transmission links established between other clients and the source node in the link state table, thereby causing inaccuracy or incompleteness of the data transmission links recorded in the link state table.
The following exemplifies the data scheduling method provided by the embodiment of the present invention by taking the streaming media system shown in fig. 2 as an example. As shown in fig. 2, the streaming media system to which the data stream scheduling method provided by the embodiment of the present invention is applied includes a plurality of source nodes (camera 1, camera 2, and camera 3) and a plurality of clients (client 1, client 2, and client 3), where any client can acquire data output by any source node. The client 1 includes a service module (i.e., a service program) S1 and a monitoring module (i.e., a monitoring program) C1, the client 2 includes a service module S2 and a monitoring module C2, the client 3 includes a service module S3 and a monitoring module C3, the service module of each client is configured to maintain a link state table, establish a data transmission link with a source node, and broadcast indication information to other terminal devices, and the monitoring module of each client is configured to perform data processing on a received data stream sent by the source node, for example: and displaying the image according to the received video data stream.
The first stage: referring to fig. 3, when the client 1 needs to acquire a data stream output by the camera 1, since no data transmission link is established between each client and each camera, there is no client that establishes a data transmission link with the camera 1 in the streaming media system, so that a data transmission link between the client 1 and the camera 1 is established, the client 1 acquires the data stream output by the camera 1 through the data transmission link between the client 1 and the camera 1 (see the data stream 1 in fig. 3), and the indication information for indicating that the data transmission link is established between the client 1 and the camera 1 is broadcast to the client 2 and the client 3 once every first preset time period. After receiving the indication information, which is broadcasted by the client 1 and is used for indicating that the data transmission link is established between the client 1 and the camera 1, the client 2 and the client 3 add the data transmission link established between the client 1 and the camera 1 in a locally stored link state table.
And a second stage: referring to fig. 4, when the client 2 needs to acquire the data stream output by the camera 1, it is known from the locally stored link state that there is a client that has established a data transmission link with the camera 1 in the streaming media system, and it is known that the client that has established a data transmission link with the camera 1 is the client 1, the client 2 acquires the data stream output by the camera 1 through the client 1 (see the data stream 2 in fig. 4).
And a third stage: the client 1 no longer needs to obtain the data stream output by the camera 1 or the client 1 fails, and the data transmission link established between the client 1 and the camera 1 is disconnected. Since the data transmission link established between the client 1 and the camera 1 is disconnected, the client 1 does not broadcast the indication information to the client 2 and the client 3 once every interval for a first preset duration, and the client 2 and the client 3 delete the data transmission link established between the client 1 and the camera 1 from the locally stored link state table when the time length of not receiving the indication information is longer than a second preset duration. At this time, the state of the streaming media system returns to the state shown in fig. 2 (no data transmission link is established between each client and each camera).
Fourth stage: referring to fig. 5, when the client 3 needs to acquire the data stream output by the camera 1, since there is no client in the streaming media system that has established a data transmission link with the camera 1, the client 3 establishes a data transmission link with the camera 1, acquires the data stream output by the camera 1 through the data transmission link (see the data stream 3 in fig. 5), and broadcasts indication information for indicating that the data transmission link is established between the client 3 and the camera 1 to the client 1 and the client 2 once every a first preset period of time. After receiving the indication information, which is broadcasted by the client 3 and is used for indicating that the data transmission link is established between the client 3 and the camera 1, the client 1 and the client 2 add the data transmission link established between the client 3 and the camera 1 in the locally stored link state table.
Based on the same inventive concept, as an implementation of the method, the embodiment of the present invention further provides a scheduling device for a data stream, where the embodiment of the device corresponds to the embodiment of the method, and for convenience of reading, the embodiment of the present invention does not describe details in the embodiment of the method one by one, but it should be clear that the device in the embodiment can correspondingly implement all the details in the embodiment of the method.
Fig. 6 is a schematic structural diagram of a scheduling apparatus for data flow according to an embodiment of the present invention, as shown in fig. 6, a scheduling apparatus 600 for data flow according to the present embodiment includes:
the processing unit 61 is configured to determine, when the first client needs to obtain a data stream output by a first source node, whether a second client exists in the streaming media system according to a link state table, where the link state table stores data transmission links established between each client and each source node in the streaming media system, and the second client is a client in the streaming media system that establishes a data transmission link with the first source node;
a first obtaining unit 62, configured to obtain, by the second client, a data stream output by the first source node when the processing unit determines that the second client exists in the streaming media system;
an establishing unit 63, configured to establish a data transmission link between the first client and the first source node when the processing unit determines that the second client does not exist in the streaming media system;
a second obtaining unit 64, configured to obtain a data stream output by the first source node based on a data transmission link between the first client and the first source node.
Referring to fig. 7, as an alternative implementation manner of the embodiment of the present invention, the scheduling apparatus 600 of the data stream further includes:
a broadcasting unit 65, configured to broadcast first indication information to other clients in the streaming media system than the first client after establishing a data transmission link between the first client and the first source node;
the first indication information is used for indicating that a data transmission link is established between the first client and the first source node.
As an optional implementation manner of this embodiment of the present invention, the broadcasting unit 75 is specifically configured to broadcast the first indication information to clients other than the first client in the streaming media system once every interval for a first preset duration in a case where a data transmission link between the first client and the first source node is not disconnected.
Referring to fig. 7, as an alternative implementation manner of the embodiment of the present invention, the scheduling apparatus 600 of the data stream further includes:
a receiving unit 66, configured to receive second indication information broadcast by a third client, where the second indication information is used to indicate that a data transmission link is established between the third client and a second source node;
and an updating unit 67, configured to add, in the link state table, a data transmission link established between the third client and the second source node according to the second instruction information.
As an optional implementation manner of the embodiment of the present invention, the updating unit 77 is further configured to delete, after adding, according to the second instruction information, the data transmission link established between the third client and the second source node in the link state table, in a case where a time length during which the second instruction information is not received is greater than a second preset time length, the data transmission link between the third client and the second source node from the link state table in the link state table.
When a first client needs to acquire a data stream output by a first source node in a streaming media system, the scheduling device of the data stream provided by the embodiment of the invention firstly determines whether a second client which establishes a data transmission link with the first source node exists in the streaming media system according to a link state table through a processing unit, and if so, acquires the data stream output by the first source node through the second client through a first acquisition unit; if the data stream is not stored, a data transmission link between the first client and the first source node is established through the establishing unit, and the data stream output by the first source node is acquired through the second acquiring unit based on the data transmission link between the first client and the first source node. When the first client in the embodiment of the invention needs to acquire the data stream output by the first source node, whether the client which has established the data transmission link with the first source node exists or not is judged, if so, the data transmission link is not established with the first source node, and the data stream output by the first source node is acquired through the client which has established the data transmission link with the first source node.
Based on the same inventive concept, referring to fig. 8, an embodiment of the present invention further provides a scheduling apparatus for a data stream, including: a memory 81 and a processor 82, the memory 81 for storing a computer program; the processor 82 is configured to execute the scheduling method of the data stream according to any of the above embodiments when the computer program is invoked.
The scheduling device of the data stream provided by the embodiment of the invention can be a mobile phone, a personal computer, a television, a display and the like.
The scheduling device for data streams provided in this embodiment may execute the scheduling method for data streams provided in the foregoing method embodiment, and its implementation principle and technical effects are similar, and are not repeated here.
Based on the same inventive concept, the embodiment of the invention also provides a computer readable storage medium, wherein the computer readable storage medium stores a computer program, and the computer program realizes the scheduling method of the data stream when being executed by a processor.
It will be appreciated by those skilled in the art that embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media having computer-usable program code embodied therein.
The processor may be a central processing unit (CentralProcessingUnit, CPU), but may also be other general purpose processors, digital signal processors (DigitalSignalProcessor, DSP), application specific integrated circuits (ApplicationSpecificIntegratedCircuit, ASIC), off-the-shelf programmable gate arrays (Field-ProgrammableGateArray, FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, or the like. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The memory may include volatile memory in a computer-readable medium, random Access Memory (RAM) and/or nonvolatile memory, etc., such as Read Only Memory (ROM) or flash memory (flashRAM). Memory is an example of a computer-readable medium.
Computer readable media include both non-transitory and non-transitory, removable and non-removable storage media. Storage media may embody any method or technology for storage of information, which may be computer readable instructions, data structures, program modules, or other data. Examples of storage media for a computer include, but are not limited to, phase change memory (PRAM), static Random Access Memory (SRAM), dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), read Only Memory (ROM), electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), digital Versatile Disks (DVD) or other optical storage, magnetic cassettes, magnetic disk storage or other magnetic storage devices, or any other non-transmission medium which can be used to store information that can be accessed by a computing device. Computer-readable media, as defined herein, does not include transitory computer-readable media (transshipment) such as modulated data signals and carrier waves.
Finally, it should be noted that: the above embodiments are only for illustrating the technical solution of the present invention, and not for limiting the same; although the invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some or all of the technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit of the invention.

Claims (8)

1. A method for scheduling a data stream, comprising:
under the condition that a first client needs to acquire a data stream output by a first source node in a streaming media system, determining whether a second client exists in the streaming media system according to a link state table, wherein the link state table stores data transmission links established between each client and each source node in the streaming media system, and the second client is a client which establishes a data transmission link with the first source node in the streaming media system;
if the second client exists in the streaming media system, acquiring a data stream output by the first source node through the second client;
if the second client does not exist in the streaming media system, a data transmission link between the first client and the first source node is established, and a data stream output by the first source node is acquired based on the data transmission link between the first client and the first source node;
after establishing the data transmission link between the first client and the first source node, the method further comprises:
broadcasting first indication information to other clients except the first client in the streaming media system;
the first indication information is used for indicating that a data transmission link is established between the first client and the first source node.
2. The method of claim 1, wherein the first client broadcasting first indication information to clients other than the first client in the streaming media system comprises:
and broadcasting the first indication information to other clients except the first client in the streaming media system once every interval for a first preset duration under the condition that a data transmission link between the first client and the first source node is not disconnected.
3. The method according to claim 1, wherein the method further comprises:
receiving second indication information broadcast by a third client, wherein the second indication information is used for indicating that a data transmission link is established between the third client and a second source node;
and adding a data transmission link established between the third client and the second source node in the link state table according to the second indication information.
4. A method according to claim 3, wherein after adding the data transmission link established between the third client and the second source node in the link state table according to the second indication information, the method further comprises:
and deleting the data transmission link between the third client and the second source node from the link state table under the condition that the time length of not receiving the second indication information is longer than a second preset time length.
5. A scheduling device for a data stream, wherein the scheduling device for a data stream belongs to a first client in a streaming media system, and the device comprises:
the processing unit is used for determining whether a second client exists in the streaming media system according to a link state table when the first client needs to acquire a data stream output by a first source node, wherein the link state table stores data transmission links established between each client and each source node in the streaming media system, and the second client is a client which establishes a data transmission link with the first source node in the streaming media system;
the first acquisition unit is used for acquiring the data stream output by the first source node through the second client when the processing unit determines that the second client exists in the streaming media system;
the establishing unit is used for establishing a data transmission link between the first client and the first source node under the condition that the processing unit determines that the second client does not exist in the streaming media system;
a second obtaining unit, configured to obtain a data stream output by the first source node based on a data transmission link between the first client and the first source node;
the apparatus further comprises:
a broadcasting unit, configured to broadcast first indication information to other clients in the streaming media system except the first client after a data transmission link between the first client and the first source node is established;
the first indication information is used for indicating that a data transmission link is established between the first client and the first source node.
6. The apparatus according to claim 5, wherein the broadcasting unit is specifically configured to broadcast the first indication information to clients other than the first client in the streaming media system once every interval for a first preset duration in a case where a data transmission link between the first client and the first source node is not disconnected.
7. The apparatus of claim 5, wherein the apparatus further comprises:
the receiving unit is used for receiving second indication information broadcast by a third client, wherein the second indication information is used for indicating that a data transmission link is established between the third client and a second source node;
and the updating unit is used for adding the data transmission link established between the third client and the second source node in the link state table according to the second indication information.
8. The apparatus according to claim 7, wherein the updating unit is further configured to delete the data transmission link between the third client and the second source node from the link state table if a length of time during which the second indication information is not received is greater than a second preset length of time after adding the data transmission link established between the third client and the second source node in the link state table according to the second indication information.
CN202010318119.9A 2020-04-21 2020-04-21 Data stream scheduling method and device Active CN113542331B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010318119.9A CN113542331B (en) 2020-04-21 2020-04-21 Data stream scheduling method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010318119.9A CN113542331B (en) 2020-04-21 2020-04-21 Data stream scheduling method and device

Publications (2)

Publication Number Publication Date
CN113542331A CN113542331A (en) 2021-10-22
CN113542331B true CN113542331B (en) 2023-07-18

Family

ID=78123840

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010318119.9A Active CN113542331B (en) 2020-04-21 2020-04-21 Data stream scheduling method and device

Country Status (1)

Country Link
CN (1) CN113542331B (en)

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1669341A (en) * 2002-09-23 2005-09-14 Lg电子株式会社 Radio communication scheme for providing multimedia broadcast and multicast services (MBMS)
CN101557513A (en) * 2009-05-26 2009-10-14 中国地质大学(北京) DVB router-sharing method and DVB router-sharing device
CN101848201A (en) * 2009-03-25 2010-09-29 中兴通讯股份有限公司 Method and system for sharing multimedia broadcasting program
CN101867574A (en) * 2010-05-19 2010-10-20 中兴通讯股份有限公司 Method and system for realizing video sharing, and mobile terminal
CN103024523A (en) * 2012-12-07 2013-04-03 康佳集团股份有限公司 Method and system for sharing television programs based on set top box (STB)
WO2014201876A1 (en) * 2013-06-17 2014-12-24 华为技术有限公司 Screen sharing method and relevant device, and communications system
CN106210797A (en) * 2016-07-29 2016-12-07 北京小米移动软件有限公司 Live network broadcast method and device
CN106341408A (en) * 2016-09-20 2017-01-18 武汉斗鱼网络科技有限公司 Live broadcast sharing method and system in LAN of TV device
CN110493245A (en) * 2019-08-28 2019-11-22 北京云端智度科技有限公司 A kind of stream medium data dissemination system based on distributed parallel system

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1669341A (en) * 2002-09-23 2005-09-14 Lg电子株式会社 Radio communication scheme for providing multimedia broadcast and multicast services (MBMS)
CN101848201A (en) * 2009-03-25 2010-09-29 中兴通讯股份有限公司 Method and system for sharing multimedia broadcasting program
CN101557513A (en) * 2009-05-26 2009-10-14 中国地质大学(北京) DVB router-sharing method and DVB router-sharing device
CN101867574A (en) * 2010-05-19 2010-10-20 中兴通讯股份有限公司 Method and system for realizing video sharing, and mobile terminal
CN103024523A (en) * 2012-12-07 2013-04-03 康佳集团股份有限公司 Method and system for sharing television programs based on set top box (STB)
WO2014201876A1 (en) * 2013-06-17 2014-12-24 华为技术有限公司 Screen sharing method and relevant device, and communications system
CN106210797A (en) * 2016-07-29 2016-12-07 北京小米移动软件有限公司 Live network broadcast method and device
CN106341408A (en) * 2016-09-20 2017-01-18 武汉斗鱼网络科技有限公司 Live broadcast sharing method and system in LAN of TV device
CN110493245A (en) * 2019-08-28 2019-11-22 北京云端智度科技有限公司 A kind of stream medium data dissemination system based on distributed parallel system

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
在局域网中建立基于P2P技术的流媒体系统的研究;姜丽娟;《中国优秀硕士学位论文全文数据库信息科技辑》;全文 *

Also Published As

Publication number Publication date
CN113542331A (en) 2021-10-22

Similar Documents

Publication Publication Date Title
CN112218100B (en) Content distribution network, data processing method, device, equipment and storage medium
US11509744B2 (en) Resource request management using bandwidth allocation and time slots
WO2016124101A1 (en) Information display method, apparatus and system
CN108810657B (en) Method and system for setting video cover
CN109842781A (en) Monitor video playback method, device, system, media server and storage medium
CN110691282B (en) Video processing method and device, storage medium and electronic equipment
CN111600965A (en) Consensus method and system in block chain
US10038732B2 (en) Method and system for dynamic proximity-based media sharing
CN109982034B (en) Access request processing method and device in video monitoring system
FR2910776A1 (en) COMMUNICATION METHOD BETWEEN AT LEAST ONE CLIENT STATION AND AT LEAST TWO BASE STATIONS
CN105357590A (en) Method and device for achieving terminal multimedia broadcast
CN111541711A (en) Live broadcast data mixing method and device based on edge calculation
CN113542331B (en) Data stream scheduling method and device
CN112532665A (en) Server load balancing method and device and CDN node
US20210377972A1 (en) Transmission configuration method and apparatus, device, system, and storage medium
US20210266879A1 (en) Methods and apparatuses for transmitting information and receiving information, base station and user equipment
CN112559642A (en) Data classification storage method and device and related products
CN114844870B (en) Media stream acquisition method and device, electronic equipment and storage medium
CN114296869A (en) Server node service method and device based on TCP long connection
CN113301100A (en) Data disaster tolerance method, device, equipment and medium based on content distribution network
US20160275090A1 (en) News publishing system and method
CN105684428A (en) Conference distribution method and system for video web conference
CN116887009B (en) End cloud integrated video structuring method and system based on 5G network
CN115037745B (en) Method and device for electing in distributed system
CN116472736A (en) Communication method, electronic device, and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant