CN109889922B - Method, device, equipment and storage medium for forwarding streaming media data - Google Patents

Method, device, equipment and storage medium for forwarding streaming media data Download PDF

Info

Publication number
CN109889922B
CN109889922B CN201910294762.XA CN201910294762A CN109889922B CN 109889922 B CN109889922 B CN 109889922B CN 201910294762 A CN201910294762 A CN 201910294762A CN 109889922 B CN109889922 B CN 109889922B
Authority
CN
China
Prior art keywords
media data
streaming media
current
timestamp
sending information
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
CN201910294762.XA
Other languages
Chinese (zh)
Other versions
CN109889922A (en
Inventor
李春
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangzhou Shiyuan Electronics Thecnology Co Ltd
Guangzhou Shizhen Information Technology Co Ltd
Original Assignee
Guangzhou Shiyuan Electronics Thecnology Co Ltd
Guangzhou Shizhen Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangzhou Shiyuan Electronics Thecnology Co Ltd, Guangzhou Shizhen Information Technology Co Ltd filed Critical Guangzhou Shiyuan Electronics Thecnology Co Ltd
Priority to CN201910294762.XA priority Critical patent/CN109889922B/en
Publication of CN109889922A publication Critical patent/CN109889922A/en
Application granted granted Critical
Publication of CN109889922B publication Critical patent/CN109889922B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

The embodiment of the invention discloses a method, a device, equipment and a storage medium for forwarding streaming media data, wherein the method comprises the following steps: comparing the current sending information of the received current streaming media data with prestored sending information to obtain a comparison result; determining a target timestamp corresponding to the current streaming media data based on the comparison result; and forwarding the current streaming media data and the corresponding target timestamp to a receiving end so that the receiving end plays the current streaming media data based on the target timestamp. The embodiment of the invention resets the timestamps of the streaming media data of different sending ends according to the same reference, ensures that the timestamps of the streaming media data received by the receiving end are monotonically increased and are not repeated, and improves the playing accuracy of the streaming media data.

Description

Method, device, equipment and storage medium for forwarding streaming media data
Technical Field
The embodiment of the invention relates to the technical field of computer multimedia, in particular to a method, a device, equipment and a storage medium for forwarding streaming media data.
Background
With the continuous development of communication technology, in order to improve the communication efficiency, a mode of realizing remote communication and interaction of multiple users through a network is developed, and the interaction mode enables the multiple users to realize the same interaction without being personally on the scene.
Currently, in a multi-party conference scenario, a client of one party typically receives video data of a multi-party client. For example, referring to fig. 1, fig. 1 is a schematic diagram of a receiving end of one receiving end receiving video data of a hexagonal transmitting end, where a receiving end G is the receiving end, and transmitting ends a to F are the transmitting ends, and sending seven paths of video data to a Selective Forwarding Unit (SFU), and the SFU forwards the video data to the receiving end G through four Forwarding paths. In order to reduce the delay, four forwarding paths are established in advance, and then four paths of video data selected by the SFU are forwarded through the four forwarding paths.
The problem with the above scheme is that both sender a-sender F have their own timestamps, and the timestamps may not be identical and correlated. At this time, if the video data of the sending end a is sent to the receiving end G through the forwarding path 1 first, and then the video data of the sending end B is sent to the receiving end G through the forwarding path 1, because the timestamps are inconsistent, it is very likely that the timestamp of the video data of the sending end B that is forwarded later is smaller than the timestamp of the video data of the sending end a that is forwarded earlier, and further processing errors after the receiving end G receives the video data are caused.
Disclosure of Invention
The invention provides a method, a device, equipment and a storage medium for forwarding streaming media data, which can solve processing errors caused by different timestamps in the prior art.
In a first aspect, an embodiment of the present invention provides a method for forwarding streaming media data, including:
comparing the current sending information of the received current streaming media data with prestored sending information to obtain a comparison result;
determining a target timestamp corresponding to the current streaming media data based on the comparison result;
and forwarding the current streaming media data and the corresponding target timestamp to a receiving end so that the receiving end plays the current streaming media data based on the target timestamp.
In a second aspect, an embodiment of the present invention further provides a device for forwarding streaming media data, where the device includes:
the comparison module is used for comparing the current sending information of the received current streaming media data with the prestored sending information to obtain a comparison result;
a timestamp determining module, configured to determine, based on the comparison result, a target timestamp corresponding to the current streaming media data;
and the forwarding module is used for forwarding the current streaming media data and the corresponding target timestamp to a receiving end so that the receiving end plays the current streaming media data based on the target timestamp.
Further, the timestamp determination module comprises:
a first timestamp determining unit, configured to determine, according to a current clock value, a target timestamp corresponding to the current streaming media data if the comparison result indicates that the current sending information is different from a sending end identifier included in the pre-stored sending information;
and a second timestamp determining unit, configured to determine, according to the current sending information and pre-stored sending information, a target timestamp corresponding to the current streaming media data if the comparison result indicates that the current sending information is the same as a sending end identifier included in the pre-stored sending information.
Further, the first timestamp determining unit is specifically configured to:
calculating to obtain a forwarding timestamp according to the current clock value and the network time offset value, wherein the forwarding timestamp is monotonically increased;
determining the target timestamp as the forwarding timestamp.
Further, the second timestamp determining unit is specifically configured to:
and determining the target timestamp according to the difference value of the original timestamps, wherein the difference value of the original timestamps is the difference value between the original timestamp in the current sending information and the original timestamp in the pre-stored sending information.
Further, the second timestamp determination unit includes:
and the first difference subunit is used for determining the target timestamp as the sum of the difference of the original timestamps and the target timestamp in the pre-stored sending information if the difference of the original timestamps is less than or equal to a preset difference threshold value.
Further, the second timestamp determining unit further includes:
and the second difference subunit is used for determining the target timestamp as the forwarding timestamp if the difference value of the original timestamp is greater than a preset difference threshold value.
Further, the apparatus further comprises: an update module to:
and determining the current sending information of the current streaming media data as new pre-stored sending information.
In a third aspect, an embodiment of the present invention further provides an apparatus, where the apparatus includes:
one or more processors;
storage means for storing one or more programs;
when the one or more programs are executed by the one or more processors, the one or more processors implement the streaming media data forwarding method as described above.
In a fourth aspect, the embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the method for forwarding streaming media data as described above.
The embodiment of the invention compares the current sending information of the received current streaming media data with the prestored sending information to obtain a comparison result, determines the target timestamp corresponding to the current streaming media data based on the comparison result, and forwards the current streaming media data and the corresponding target timestamp to the receiving end so that the receiving end plays the current streaming media data based on the target timestamp. The embodiment of the invention resets the timestamps of the streaming media data of different sending ends according to the same reference, avoids processing errors possibly caused by different timestamps when the streaming media data of a plurality of sending ends are forwarded to one receiving end, ensures that the timestamps of the streaming media data received by the receiving end are monotonically increased and are not repeated, and improves the playing accuracy of the streaming media data.
Drawings
Fig. 1 is a schematic diagram of a receiving end receiving video data from a hexagonal transmitting end;
fig. 2 is a flowchart of a method for forwarding streaming media data according to a first embodiment of the present invention;
fig. 3 is a flowchart of a method for forwarding streaming media data according to a second embodiment of the present invention;
fig. 4 is a schematic structural diagram of a forwarding device for streaming media data according to a third embodiment of the present invention;
fig. 5 is a schematic structural diagram of an apparatus according to a fourth embodiment of the present invention.
Detailed Description
The present invention will be described in further detail with reference to the accompanying drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the invention and are not limiting of the invention. It should be further noted that, for the convenience of description, only some of the structures related to the present invention are shown in the drawings, not all of the structures.
Example one
Fig. 2 is a flowchart of a method for forwarding streaming media data according to a first embodiment of the present invention, where the method is applicable to a situation where streaming media data from multiple sending ends is forwarded to one receiving end, the method may be executed by a forwarding device for streaming media data, the forwarding device may be implemented in a software and/or hardware manner, and the forwarding device may be configured in equipment, for example, the equipment may be a computer, a tablet computer, a smart phone, and the like. The Forwarding device of the streaming media data in this embodiment is described by taking a Selective Forwarding Unit (SFU) as an example, as shown in fig. 2, the method may specifically include:
s110, comparing the current sending information of the received current streaming media data with the prestored sending information to obtain a comparison result.
The streaming media data may be continuous time-based media that adopts streaming technology when transmitting, such as audio data, video data, or multimedia data, and the specific type of the streaming media data is not limited in this embodiment, and the video data forwarded in fig. 1 is only one example. The current sending information represents related information of the current streaming media data, and the current sending information may include an original timestamp and a sending end identifier of the current streaming media data. The pre-stored sending information is related information which is stored locally and represents the previous streaming media data, and the pre-stored sending information may include an original timestamp, a target timestamp and a sending end identifier of the previous streaming media data. The sender identification can be identified by using 32-bit SSRC (synchronization source) identifier. The target timestamp of the last streaming media data is the newly set timestamp. In this embodiment, if the current streaming media data is the first data of the forwarding device of the streaming media data, the pre-stored transmission information is empty. In this embodiment, at least two sending ends of the streaming media data are provided, and the number of the sending ends in fig. 1 is 6 only as an example.
Specifically, the forwarding device of the streaming media data receives current streaming media data to be forwarded, and compares a sending end identifier in current sending information of the received current streaming media data with a sending end identifier in locally pre-stored sending information, so as to determine whether the sending end of the current streaming media data is the same as the sending end of the previous streaming media data, and obtain a comparison result.
And S120, determining a target timestamp corresponding to the current streaming media data based on the comparison result.
The comparison result comprises two types, namely the difference between the current sending information and the sending end identification contained in the pre-stored sending information and the difference between the current sending information and the sending end identification contained in the pre-stored sending information. The target timestamp is a new timestamp set by the forwarding device of the streaming media data for the current streaming media data.
Specifically, determining a target timestamp corresponding to the current streaming media data based on the comparison result includes: if the comparison result is that the current sending information is different from the sending end identification contained in the pre-stored sending information, determining a target timestamp corresponding to the current streaming media data according to the current clock value; and if the comparison result is that the current sending information is the same as the sending end identification contained in the pre-stored sending information, determining a target timestamp corresponding to the current streaming media data according to the current sending information and the pre-stored sending information.
If the comparison result is that the current sending information is different from the sending end identifier contained in the pre-stored sending information, that is, the sending end of the current streaming media data is different from the sending end of the previous streaming media data, determining a target timestamp corresponding to the current streaming media data according to the current clock value, including: calculating to obtain a forwarding timestamp according to the current clock value and the network time offset value, wherein the forwarding timestamp is monotonically increased; the target timestamp is determined to be a forwarding timestamp. The forwarding timestamp is calculated by a preset formula, where the preset formula may be represented as T-90 × (T + N), where T represents the forwarding timestamp, T represents a current clock value, N represents a Network Time offset value, and the Network Time offset value is a Time offset value between the current clock value and a Network Time Protocol (NTP). Since the forwarding timestamp is related to the current clock value, the forwarding timestamp is monotonically increasing. When the sending end of the current streaming media data is different from the sending end of the previous streaming media data, the target timestamp of the current streaming media data is set as the forwarding timestamp.
If the comparison result is that the current sending information is the same as the sending end identifier contained in the pre-stored sending information, that is, the sending end of the current streaming media data is the same as the sending end of the previous streaming media data, the target timestamp of the current streaming media data can be set according to the original timestamp of the previous streaming media data.
Further, determining a target timestamp corresponding to the current streaming media data according to the current sending information and the pre-stored sending information, including: and determining a target timestamp according to the difference value of the original timestamps, wherein the difference value of the original timestamps is the difference value between the original timestamp in the current sending information and the original timestamp in the pre-stored sending information. And determining the target timestamp as the sum of the difference value of the original timestamps and the target timestamp in the pre-stored sending information, namely the target timestamp is equal to the sum of the difference value of the original timestamps and the target timestamp of the previous streaming media data.
S130, forwarding the current streaming media data and the corresponding target timestamp to a receiving end so that the receiving end plays the current streaming media data based on the target timestamp.
Wherein the receiving end is unique. After the target timestamp corresponding to the current streaming media data is determined, forwarding the current streaming media data and the corresponding target timestamp to the receiving end, so that the receiving end plays the current streaming media data based on the target timestamp.
According to the technical scheme of the embodiment, the comparison result is obtained by comparing the current sending information of the received current streaming media data with the pre-stored sending information, the target timestamp corresponding to the current streaming media data is determined based on the comparison result, and the current streaming media data and the corresponding target timestamp are forwarded to the receiving end, so that the receiving end plays the current streaming media data based on the target timestamp. According to the embodiment, the timestamps of the streaming media data of different sending ends are reset according to the same reference, processing errors possibly caused by different timestamps when the streaming media data of a plurality of sending ends are forwarded to one receiving end are avoided, the fact that the timestamps of the streaming media data received by the receiving end are monotonically increased and are not repeated is ensured, and the playing accuracy rate of the streaming media data is improved.
Example two
Fig. 3 is a flowchart of a method for forwarding streaming media data according to a second embodiment of the present invention. The present embodiment further embodies the method for forwarding streaming media data on the basis of the foregoing embodiment. Correspondingly, as shown in fig. 3, the method of the embodiment specifically includes:
s210, comparing the current sending information of the received current streaming media data with the prestored sending information to obtain a comparison result.
Specifically, the forwarding device of the streaming media data receives current streaming media data to be forwarded, and compares a sending end identifier in current sending information of the received current streaming media data with a sending end identifier in locally pre-stored sending information, so as to determine whether the sending end of the current streaming media data is the same as the sending end of the previous streaming media data, and obtain a comparison result.
S220, whether the comparison result is that the current sending information is the same as the sending end identification contained in the pre-stored sending information or not is judged.
If the comparison result is that the current sending information is the same as the sending end identifier contained in the pre-stored sending information, S232 is executed, and if the comparison result is that the current sending information is different from the sending end identifier contained in the pre-stored sending information, S231 is executed.
And S231, determining a target timestamp corresponding to the current streaming media data according to the current clock value.
Specifically, determining a target timestamp corresponding to the current streaming media data according to the current clock value includes: calculating to obtain a forwarding timestamp according to the current clock value and the network time offset value, wherein the forwarding timestamp is monotonically increased; the target timestamp is determined to be a forwarding timestamp.
And S232, determining a target timestamp corresponding to the current streaming media data according to the current sending information and the pre-stored sending information.
Specifically, the target timestamp is determined according to the difference value of the original timestamps, and the difference value of the original timestamps is the difference value between the original timestamp in the current sending information and the original timestamp in the pre-stored sending information.
And further, judging whether the difference value of the original timestamps is greater than a preset difference threshold value, and if the difference value of the original timestamps is less than or equal to the preset difference threshold value, determining the target timestamp as the sum of the difference value of the original timestamps and the target timestamp in the pre-stored sending information. And if the difference value of the original timestamps is larger than a preset difference threshold value, determining the target timestamp as the forwarding timestamp.
The preset difference threshold may be set according to an actual situation, for example, the preset difference threshold may be set to 500 ms. If the difference value of the original timestamps is greater than the preset difference threshold value, it indicates that the sending end does not send data, and the sending end of the current streaming media data can be considered to be different from the sending end of the previous streaming media data, and the target timestamp is determined as the forwarding timestamp.
If the difference value of the original timestamps is less than or equal to the preset difference threshold value, it can be considered that the sending end of the current streaming media data is the same as the sending end of the previous streaming media data, the target timestamp is determined as the sum of the difference value of the original timestamps and the target timestamp in the pre-stored sending information, that is, the target timestamp is the sum of the difference value of the original timestamps and the target timestamp of the previous streaming media data.
And S240, determining the current sending information of the current streaming media data as new pre-stored sending information.
Specifically, the original timestamp, the target timestamp and the sending end identifier of the previous streaming media data in the locally stored pre-stored sending information are deleted, and the original timestamp, the target timestamp and the sending end identifier of the current streaming media data are stored as new pre-stored sending information.
And S250, forwarding the current streaming media data and the corresponding target timestamp to a receiving end so that the receiving end plays the current streaming media data based on the target timestamp.
It should be noted that the forwarding device of the streaming media data may forward the streaming media data through a preset number of forwarding paths, where the preset number may be set according to an actual situation. Referring to fig. 1, the provision of 4 forwarding paths is merely an example. The forwarding time stamp may be associated with a forwarding path, each forwarding path maintains an independent forwarding time stamp, and when the target time stamp corresponding to the current streaming media data is set in the above step, the forwarding time stamp may be the forwarding time stamp of the forwarding path allocated by the forwarding device of the streaming media data.
According to the technical scheme provided by the embodiment, the current sending information of the received current streaming media data is compared with the pre-stored sending information to obtain a comparison result, the target timestamp corresponding to the current streaming media data is determined based on the comparison result, the current sending information of the current streaming media data is determined as new pre-stored sending information, and the current streaming media data and the corresponding target timestamp are forwarded to the receiving end, so that the receiving end plays the current streaming media data based on the target timestamp. In this embodiment, the timestamps of the streaming media data of different sending ends are reset according to the same reference, so that processing errors possibly caused by different timestamps when the streaming media data of a plurality of sending ends are forwarded to one receiving end are avoided, the timestamps of the streaming media data received by the receiving end are ensured to be monotonically increased and not repeated, and the playing accuracy of the streaming media data is improved; and the target time stamps are related to the original time stamp intervals, so that the target time stamps of the streaming media data are distributed according to the original time intervals.
EXAMPLE III
Fig. 4 is a schematic structural diagram of a forwarding device for streaming media data in a third embodiment of the present invention, where this embodiment is applicable to a case where streaming media data from multiple sending ends is forwarded to one receiving end, and the method may be executed by the forwarding device for streaming media data. The communication device provided by the embodiment of the invention can execute the streaming media data forwarding method provided by any embodiment of the invention, and has the corresponding functional modules and beneficial effects of the execution method. The apparatus specifically includes a comparison module 310, a timestamp determination module 320, and a forwarding module 330, where:
a comparing module 310, configured to compare the current sending information of the received current streaming media data with pre-stored sending information, so as to obtain a comparison result;
a timestamp determining module 320, configured to determine, based on the comparison result, a target timestamp corresponding to the current streaming media data;
the forwarding module 330 is configured to forward the current streaming media data and the corresponding target timestamp to the receiving end, so that the receiving end plays the current streaming media data based on the target timestamp.
The embodiment of the invention compares the current sending information of the received current streaming media data with the prestored sending information to obtain a comparison result, determines the target timestamp corresponding to the current streaming media data based on the comparison result, and forwards the current streaming media data and the corresponding target timestamp to the receiving end so that the receiving end plays the current streaming media data based on the target timestamp. The embodiment of the invention resets the timestamps of the streaming media data of different sending ends according to the same reference, avoids processing errors possibly caused by different timestamps when the streaming media data of a plurality of sending ends are forwarded to one receiving end, ensures that the timestamps of the streaming media data received by the receiving end are monotonically increased and are not repeated, and improves the playing accuracy of the streaming media data.
Further, the timestamp determining module 320 includes:
a first timestamp determining unit, configured to determine, according to a current clock value, a target timestamp corresponding to the current streaming media data if the comparison result is that the current sending information is different from a sending end identifier included in pre-stored sending information;
and the second timestamp determining unit is used for determining a target timestamp corresponding to the current streaming media data according to the current sending information and the pre-stored sending information if the comparison result shows that the current sending information is the same as the sending end identifier contained in the pre-stored sending information.
Further, the first timestamp determining unit is specifically configured to:
calculating to obtain a forwarding timestamp according to the current clock value and the network time offset value, wherein the forwarding timestamp is monotonically increased;
the target timestamp is determined to be a forwarding timestamp.
Further, the second timestamp determining unit is specifically configured to:
and determining a target timestamp according to the difference value of the original timestamps, wherein the difference value of the original timestamps is the difference value between the original timestamp in the current sending information and the original timestamp in the pre-stored sending information.
Further, the second time stamp determining unit includes:
and the first difference subunit is used for determining the target timestamp as the sum of the difference of the original timestamps and the target timestamp in the pre-stored sending information if the difference of the original timestamps is less than or equal to the preset difference threshold.
Further, the second timestamp determining unit further includes:
and the second difference subunit is used for determining the target timestamp as the forwarding timestamp if the difference value of the original timestamps is greater than the preset difference threshold value.
Further, the apparatus further comprises: an update module to:
and determining the current sending information of the current streaming media data as new pre-stored sending information.
The forwarding device of the streaming media data provided by the embodiment of the invention can execute the forwarding method of the streaming media data provided by any embodiment of the invention, and has corresponding functional modules and beneficial effects of the execution method.
Example four
Fig. 5 is a schematic structural diagram of an apparatus according to a fourth embodiment of the present invention. FIG. 5 illustrates a block diagram of an exemplary device 412 suitable for use in implementing embodiments of the present invention. The device 412 shown in fig. 5 is only an example and should not impose any limitation on the functionality or scope of use of embodiments of the present invention.
As shown in fig. 5, the device 412 is in the form of a general purpose device. The components of device 412 may include, but are not limited to: one or more processors 416, a storage device 428, and a bus 418 that couples the various system components including the storage device 428 and the processors 416.
Bus 418 represents one or more of any of several types of bus structures, including a memory device bus or memory device controller, a peripheral bus, an accelerated graphics port, and a processor or local bus using any of a variety of bus architectures. By way of example, such architectures include, but are not limited to, Industry Standard Architecture (ISA) bus, Micro Channel Architecture (MAC) bus, enhanced ISA bus, Video Electronics Standards Association (VESA) local bus, and Peripheral Component Interconnect (PCI) bus.
Device 412 typically includes a variety of computer system readable media. Such media can be any available media that is accessible by device 412 and includes both volatile and nonvolatile media, removable and non-removable media.
Storage 428 may include computer system readable media in the form of volatile Memory, such as Random Access Memory (RAM) 430 and/or cache Memory 432. The device 412 may further include other removable/non-removable, volatile/nonvolatile computer system storage media. By way of example only, storage system 434 may be used to read from and write to non-removable, nonvolatile magnetic media (not shown in FIG. 5, commonly referred to as a "hard drive"). Although not shown in FIG. 5, a magnetic disk drive for reading from and writing to a removable, nonvolatile magnetic disk (e.g., a "floppy disk") and an optical disk drive for reading from or writing to a removable, nonvolatile optical disk such as a Compact disk Read-Only Memory (CD-ROM), Digital Video disk Read-Only Memory (DVD-ROM) or other optical media may be provided. In these cases, each drive may be connected to bus 418 by one or more data media interfaces. Storage 428 may include at least one program product having a set (e.g., at least one) of program modules that are configured to carry out the functions of embodiments of the invention.
A program/utility 440 having a set (at least one) of program modules 442 may be stored, for instance, in storage 428, such program modules 442 including, but not limited to, an operating system, one or more application programs, other program modules, and program data, each of which examples or some combination thereof may comprise an implementation of a network environment. The program modules 442 generally perform the functions and/or methodologies of the described embodiments of the invention.
The device 412 may also communicate with one or more external devices 414 (e.g., keyboard, pointing terminal, display 424, etc.), with one or more terminals that enable a user to interact with the device 412, and/or with any terminals (e.g., network card, modem, etc.) that enable the device 412 to communicate with one or more other computing terminals. Such communication may occur via input/output (I/O) interfaces 422. Further, the device 412 may also communicate with one or more networks (e.g., a Local Area Network (LAN), Wide Area Network (WAN), and/or a public Network, such as the internet) via the Network adapter 420. As shown in FIG. 5, network adapter 420 communicates with the other modules of device 412 via bus 418. It should be appreciated that although not shown in the figures, other hardware and/or software modules may be used in conjunction with the device 412, including but not limited to: microcode, end drives, Redundant processors, external disk drive Arrays, RAID (Redundant Arrays of Independent Disks) systems, tape drives, and data backup storage systems, among others.
The processor 416 executes various functional applications and data processing by running programs stored in the storage device 428, for example, implementing a method for forwarding streaming media data provided by an embodiment of the present invention, the method includes:
comparing the current sending information of the received current streaming media data with prestored sending information to obtain a comparison result;
determining a target timestamp corresponding to the current streaming media data based on the comparison result;
and forwarding the current streaming media data and the corresponding target timestamp to a receiving end so that the receiving end plays the current streaming media data based on the target timestamp.
EXAMPLE five
The fifth embodiment of the present invention further 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 forwarding streaming media data provided in the fifth embodiment of the present invention, where the method includes:
comparing the current sending information of the received current streaming media data with prestored sending information to obtain a comparison result;
determining a target timestamp corresponding to the current streaming media data based on the comparison result;
and forwarding the current streaming media data and the corresponding target timestamp to a receiving end so that the receiving end plays the current streaming media data based on the target timestamp.
Computer storage media for embodiments of the invention may employ any combination of one or more computer-readable media. The computer readable medium may be a computer readable signal medium or a computer readable storage medium. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples (a non-exhaustive list) of the computer readable storage medium would include the following: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this document, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
A computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.
Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
Computer program code for carrying out operations for aspects of the present invention may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Smalltalk, C + + or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or terminal. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
It is to be noted that the foregoing is only illustrative of the preferred embodiments of the present invention and the technical principles employed. It will be understood by those skilled in the art that the present invention is not limited to the particular embodiments described herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the invention. Therefore, although the present invention has been described in greater detail by the above embodiments, the present invention is not limited to the above embodiments, and may include other equivalent embodiments without departing from the spirit of the present invention, and the scope of the present invention is determined by the scope of the appended claims.

Claims (9)

1. A method for forwarding streaming media data is characterized by comprising the following steps:
comparing the current sending information of the received current streaming media data with prestored sending information to obtain a comparison result; wherein, the comparison result comprises: the sending end of the current media data is the same as the sending end of the previous media data, or the sending end of the current streaming media data is different from the sending end of the previous streaming media data;
determining a target timestamp corresponding to the current streaming media data based on the comparison result;
forwarding the current streaming media data and the corresponding target timestamp to a receiving end so that the receiving end plays the current streaming media data based on the target timestamp;
the determining, based on the comparison result, a target timestamp corresponding to the current streaming media data includes:
if the current streaming media data is different from the sending end of the previous streaming media data, calculating to obtain a forwarding timestamp according to the current clock value and the network time offset value, wherein the forwarding timestamp is monotonically increased; determining the target timestamp as the forwarding timestamp;
and if the current streaming media data is the same as the sending end of the previous streaming media data, determining a target timestamp corresponding to the current streaming media data according to the current sending information and pre-stored sending information.
2. The method of claim 1, wherein determining the target timestamp corresponding to the current streaming media data based on the comparison result comprises:
if the comparison result is that the current sending information is different from the sending end identification contained in the pre-stored sending information, determining a target timestamp corresponding to the current streaming media data according to the current clock value;
and if the comparison result is that the current sending information is the same as the sending end identification contained in the pre-stored sending information, determining a target timestamp corresponding to the current streaming media data according to the current sending information and the pre-stored sending information.
3. The method according to claim 1, wherein determining the target timestamp corresponding to the current streaming media data according to the current sending information and pre-stored sending information comprises:
and determining the target timestamp according to the difference value of the original timestamps, wherein the difference value of the original timestamps is the difference value between the original timestamp in the current sending information and the original timestamp in the pre-stored sending information.
4. The method of claim 3, wherein determining the target timestamp from the original timestamp difference comprises:
and if the difference value of the original time stamps is smaller than or equal to a preset difference threshold value, determining the target time stamp as the sum of the difference value of the original time stamps and the target time stamp in the pre-stored sending information.
5. The method of claim 3, wherein determining the target timestamp from the original timestamp difference comprises:
and if the difference value of the original timestamps is larger than a preset difference threshold value, determining the target timestamp as a forwarding timestamp.
6. The method according to claim 1, wherein after determining the target timestamp corresponding to the current streaming media data based on the comparison result, further comprising:
and determining the current sending information of the current streaming media data as new pre-stored sending information.
7. A forwarding device of streaming media data is characterized by comprising;
the comparison module is used for comparing the current sending information of the received current streaming media data with the prestored sending information to obtain a comparison result; wherein, the comparison result comprises: the sending end of the current media data is the same as the sending end of the previous media data, or the sending end of the current streaming media data is different from the sending end of the previous streaming media data;
a timestamp determining module, configured to determine, based on the comparison result, a target timestamp corresponding to the current streaming media data;
a forwarding module, configured to forward the current streaming media data and the corresponding target timestamp to a receiving end, so that the receiving end plays the current streaming media data based on the target timestamp;
the timestamp determination module comprises:
a first timestamp determining unit, configured to determine, if the current streaming media data is different from a sending end of the previous streaming media data, a target timestamp corresponding to the current streaming media data according to a current clock value;
a second timestamp determining unit, configured to determine, if the current streaming media data is the same as the sending end of the previous streaming media data, a target timestamp corresponding to the current streaming media data according to the current sending information and pre-stored sending information;
the first timestamp determining unit is specifically configured to: calculating to obtain a forwarding timestamp according to the current clock value and the network time offset value, wherein the forwarding timestamp is monotonically increased; the target timestamp is determined to be a forwarding timestamp.
8. An apparatus, characterized in that the apparatus comprises:
one or more processors;
storage means for storing one or more programs;
when executed by the one or more processors, cause the one or more processors to implement the method for forwarding streaming media data according to any one of claims 1-6.
9. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, implements the method for forwarding streaming media data according to any one of claims 1-6.
CN201910294762.XA 2019-04-12 2019-04-12 Method, device, equipment and storage medium for forwarding streaming media data Active CN109889922B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910294762.XA CN109889922B (en) 2019-04-12 2019-04-12 Method, device, equipment and storage medium for forwarding streaming media data

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910294762.XA CN109889922B (en) 2019-04-12 2019-04-12 Method, device, equipment and storage medium for forwarding streaming media data

Publications (2)

Publication Number Publication Date
CN109889922A CN109889922A (en) 2019-06-14
CN109889922B true CN109889922B (en) 2021-09-24

Family

ID=66937241

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910294762.XA Active CN109889922B (en) 2019-04-12 2019-04-12 Method, device, equipment and storage medium for forwarding streaming media data

Country Status (1)

Country Link
CN (1) CN109889922B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112491937A (en) * 2019-09-11 2021-03-12 北京陌陌信息技术有限公司 Data transmission method, device, equipment and storage medium
CN112671696B (en) * 2019-10-16 2023-05-12 华为技术有限公司 Message transmission method, device, computer equipment and computer storage medium
CN114390302A (en) * 2020-10-21 2022-04-22 深圳迈瑞生物医疗电子股份有限公司 Consultation streaming media data processing method and related equipment

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103428250A (en) * 2012-05-23 2013-12-04 联想(北京)有限公司 Equipment matching Method, server and terminal device
CN103685430A (en) * 2012-09-26 2014-03-26 中国电信股份有限公司 A mobile terminal combined display method, a system, and a server
CN105578199A (en) * 2016-02-22 2016-05-11 北京佰才邦技术有限公司 Virtual reality panorama multimedia processing system and method and client device
CN107682715A (en) * 2016-08-01 2018-02-09 腾讯科技(深圳)有限公司 Video synchronization method and device
JP2018117259A (en) * 2017-01-19 2018-07-26 達陞企業股▲ふん▼有限公司 One-to-many audio video streaming method by audio video synchronous take in

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103428250A (en) * 2012-05-23 2013-12-04 联想(北京)有限公司 Equipment matching Method, server and terminal device
CN103685430A (en) * 2012-09-26 2014-03-26 中国电信股份有限公司 A mobile terminal combined display method, a system, and a server
CN105578199A (en) * 2016-02-22 2016-05-11 北京佰才邦技术有限公司 Virtual reality panorama multimedia processing system and method and client device
CN107682715A (en) * 2016-08-01 2018-02-09 腾讯科技(深圳)有限公司 Video synchronization method and device
JP2018117259A (en) * 2017-01-19 2018-07-26 達陞企業股▲ふん▼有限公司 One-to-many audio video streaming method by audio video synchronous take in

Also Published As

Publication number Publication date
CN109889922A (en) 2019-06-14

Similar Documents

Publication Publication Date Title
CN110113407B (en) Applet state synchronization method, apparatus and computer storage medium
CN109889922B (en) Method, device, equipment and storage medium for forwarding streaming media data
CN104539977A (en) Live broadcast previewing method and device
CN109521956B (en) Cloud storage method, device, equipment and storage medium based on block chain
EP3697088A1 (en) Video sending and receiving method, device, and terminal
WO2020248649A1 (en) Audio and video data synchronous playback method, apparatus and system, electronic device and medium
WO2022111027A1 (en) Video acquisition method, electronic device, and storage medium
EP4287591A1 (en) Data transmission method and apparatus, and server, storage medium and program product
CN111259022A (en) Information synchronization method, synchronization system, computer equipment and medium
CN114500633B (en) Data forwarding method, related device, program product and data transmission system
CN113115120B (en) Video slicing method and device, electronic equipment and storage medium
CN108810575B (en) Method and device for sending target video
CN113542856A (en) Reverse playing method, device, equipment and computer readable medium for online video
CN111225255B (en) Target video push playing method and device, electronic equipment and storage medium
CN111478916B (en) Data transmission method, device and storage medium based on video stream
WO2020233171A1 (en) Song list switching method, apparatus and system, terminal, and storage medium
WO2021012741A1 (en) Abnormal front-end operation reminder method based on experience library and related device
CN111835801B (en) File downloading method, device, server, edge equipment, terminal and medium
WO2021120124A1 (en) Method and apparatus for video display, and computer storage medium
CN113346973B (en) Event prompting method and device, electronic equipment and computer readable storage medium
CN112153322B (en) Data distribution method, device, equipment and storage medium
CN111787420B (en) Data processing method and device, electronic equipment and readable storage medium
CN112291573B (en) Live stream pushing method and device, electronic equipment and computer readable medium
CN108200481B (en) RTP-PS stream processing method, device, equipment and storage medium
CN113612962A (en) Video conference processing method, system and device

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