CN114449291A - Data transmission method, device and computer storage medium - Google Patents

Data transmission method, device and computer storage medium Download PDF

Info

Publication number
CN114449291A
CN114449291A CN202210101651.4A CN202210101651A CN114449291A CN 114449291 A CN114449291 A CN 114449291A CN 202210101651 A CN202210101651 A CN 202210101651A CN 114449291 A CN114449291 A CN 114449291A
Authority
CN
China
Prior art keywords
data
target transmission
transmission data
original data
original
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202210101651.4A
Other languages
Chinese (zh)
Inventor
杨宽
袁程炫
金子才
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Alibaba China Co Ltd
Original Assignee
Alibaba China 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 Alibaba China Co Ltd filed Critical Alibaba China Co Ltd
Priority to CN202210101651.4A priority Critical patent/CN114449291A/en
Publication of CN114449291A publication Critical patent/CN114449291A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/30Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using hierarchical techniques, e.g. scalability
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L1/00Arrangements for detecting or preventing errors in the information received
    • H04L1/004Arrangements for detecting or preventing errors in the information received by using forward error control
    • H04L1/0041Arrangements at the transmitter end
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L51/00User-to-user messaging in packet-switching networks, transmitted according to store-and-forward or real-time protocols, e.g. e-mail
    • H04L51/04Real-time or near real-time messaging, e.g. instant messaging [IM]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L51/00User-to-user messaging in packet-switching networks, transmitted according to store-and-forward or real-time protocols, e.g. e-mail
    • H04L51/07User-to-user messaging in packet-switching networks, transmitted according to store-and-forward or real-time protocols, e.g. e-mail characterised by the inclusion of specific contents
    • H04L51/10Multimedia information
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L65/00Network arrangements, protocols or services for supporting real-time applications in data packet communication
    • H04L65/80Responding to QoS
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/23Processing of content or additional data; Elementary server operations; Server middleware
    • H04N21/234Processing of video elementary streams, e.g. splicing of video streams or manipulating encoded video stream scene graphs
    • H04N21/2343Processing of video elementary streams, e.g. splicing of video streams or manipulating encoded video stream scene graphs involving reformatting operations of video signals for distribution or compliance with end-user requests or end-user device requirements
    • H04N21/234327Processing of video elementary streams, e.g. splicing of video streams or manipulating encoded video stream scene graphs involving reformatting operations of video signals for distribution or compliance with end-user requests or end-user device requirements by decomposing into layers, e.g. base layer and one or more enhancement layers

Landscapes

  • Engineering & Computer Science (AREA)
  • Signal Processing (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Multimedia (AREA)
  • Detection And Prevention Of Errors In Transmission (AREA)

Abstract

The embodiment of the application provides a data transmission method, data transmission equipment and a computer storage medium. The data transmission method comprises the following steps: acquiring original data to be transmitted; determining a scalable coding (SVC) extension header used for transmitting original data and an actual sequence number corresponding to the original data; and performing Forward Error Correction (FEC) processing on the original data based on the SVC extended header and the actual sequence number to generate target transmission data corresponding to the original data. According to the technical scheme, the FEC encoding processing is carried out on the original data based on the SVC expansion head and the actual serial number to generate the target transmission data, then the target transmission data can be sent to the server, and the server has different operation modes, so that the data transmission operation based on various modes is effectively realized, the data transmission cost and the bandwidth cost are reduced, the data packet loss resistance effect can be considered, and meanwhile, the method can be suitable for various application scenes.

Description

Data transmission method, device and computer storage medium
Technical Field
The present application relates to the field of network technologies, and in particular, to a data transmission method, a data transmission device, and a computer storage medium.
Background
With the rapid development of network technologies, Real-Time streaming media transmission enters the era of Real-Time Communication (RTC), and low-delay scenes are increasing, wherein a Forward Error Correction (FEC) is used as one of Quality of Service (QOS) optimization schemes of a full link, so that a general coding and decoding function of FEC can be realized, and problems of link packet loss, jamming and delay are reduced.
At present, when a sending end transmits real-time streaming media data to a receiving end through a network server, the network server often directly transmits the real-time streaming media data to the receiving end, so that the quality and effect of data transmission are not guaranteed, and the data transmission cost and bandwidth cost corresponding to the network server are increased.
Disclosure of Invention
The embodiment of the application provides a data transmission method, data transmission equipment and a computer storage medium, and a server has different operation modes, so that the data transmission cost and the bandwidth cost corresponding to the server can be reduced while the compatible anti-packet loss effect is achieved.
In a first aspect, an embodiment of the present application provides a data transmission method, including:
acquiring original data to be transmitted;
determining a hierarchically encoded SVC extension header used for transmitting the original data and an actual sequence number corresponding to the original data;
and performing Forward Error Correction (FEC) processing on the original data based on the SVC extended header and the actual sequence number to generate target transmission data corresponding to the original data.
In a second aspect, an embodiment of the present application provides a data transmission apparatus, including:
the first acquisition module is used for acquiring original data to be transmitted;
a first determining module, configured to determine a scalable coding SVC extension header for transmitting the original data and an actual sequence number corresponding to the original data;
and the first processing module is used for carrying out Forward Error Correction (FEC) processing on the original data based on the SVC extended header and the actual sequence number to generate target transmission data corresponding to the original data.
In a third aspect, an embodiment of the present application provides an electronic device, including: a memory, a processor; wherein the memory is configured to store one or more computer instructions, wherein the one or more computer instructions, when executed by the processor, implement the data transmission method according to the first aspect.
In a fourth aspect, an embodiment of the present invention provides a computer storage medium for storing a computer program, where the computer program is used to enable a computer to implement the data transmission method shown in the first aspect when executed.
In a fifth aspect, an embodiment of the present invention provides a computer program product, including: a computer program which, when executed by a processor of an electronic device, causes the processor to carry out the data transmission method of the first aspect.
In a sixth aspect, an embodiment of the present invention provides a data transmission method, including:
receiving target transmission data sent by a sending end;
determining an operation mode for transmitting the target transmission data, wherein the operation mode comprises any one of the following modes: a transparent transmission mode, a decoding mode and an encoding and decoding mode;
and sending the target transmission data to a receiving end based on the operation mode.
In a seventh aspect, an embodiment of the present invention provides a data transmission apparatus, including:
the second receiving module is used for receiving the target transmission data sent by the sending end;
a second determining module, configured to determine an operation mode for transmitting the target transmission data, where the operation mode includes any one of: a transparent transmission mode, a decoding mode and an encoding and decoding mode;
and the second processing module is used for sending the target transmission data to a receiving end based on the operation mode.
In an eighth aspect, an embodiment of the present application provides an electronic device, including: a memory, a processor; wherein the memory is configured to store one or more computer instructions, wherein the one or more computer instructions, when executed by the processor, implement the data transmission method of the sixth aspect.
In a ninth aspect, an embodiment of the present invention provides a computer storage medium for storing a computer program, where the computer program is used to make a computer implement the data transmission method shown in the above sixth aspect when executed.
In a tenth aspect, an embodiment of the present invention provides a computer program product, including: a computer program which, when executed by a processor of an electronic device, causes the processor to carry out the data transmission method of the sixth aspect described above.
In an eleventh aspect, an embodiment of the present application provides a data transmission method, including:
receiving target transmission data sent by a server, wherein the target transmission data comprises at least one of the following data: FEC data, original data;
when a packet loss occurs in a network, acquiring a virtual sequence number corresponding to target transmission data based on an SVC extension header included in the target transmission data, wherein the virtual sequence number is used for enabling sequence numbers of all received data to be continuous, and the SVC extension header includes a frame boundary of the original data;
framing the target transmission data based on the virtual serial number to obtain an image frame corresponding to the target transmission data.
In a twelfth aspect, an embodiment of the present application provides a data transmission apparatus, including:
a third receiving module, configured to receive target transmission data sent by a server, where the target transmission data includes at least one of the following: FEC data, original data;
a third obtaining module, configured to obtain, when a packet loss occurs in a network, a virtual sequence number corresponding to the target transmission data based on an SVC extension header included in the target transmission data, where the virtual sequence number is used to make sequence numbers of all received data continuous, and the SVC extension header includes a frame boundary of the original data;
and the third processing module is used for framing the target transmission data based on the virtual serial number to obtain an image frame corresponding to the target transmission data.
In a thirteenth aspect, an embodiment of the present application provides an electronic device, including: a memory, a processor; wherein the memory is configured to store one or more computer instructions, wherein the one or more computer instructions, when executed by the processor, implement the data transmission method of the eleventh aspect.
In a fourteenth aspect, an embodiment of the present invention provides a computer storage medium for storing a computer program, where the computer program is used to enable a computer to implement the data transmission method in the eleventh aspect when executed.
In a fifteenth aspect, an embodiment of the present invention provides a computer program product, including: a computer program which, when executed by a processor of an electronic device, causes the processor to carry out the data transmission method of the eleventh aspect described above.
The technical scheme provided by the embodiment of the application, after the sending end acquires the original data, forward error correction FEC processing operation is carried out on the original data based on the SVC extended header and the actual serial number, thereby ensuring the quality and the effect of generating the target transmission data, when the target transmission data is sent to the server, when the receiving end receives the target transmission data sent by the server, if the network has a packet loss situation, in order to ensure that the serial numbers of all data received by the receiving end are continuous serial numbers, the virtual serial number corresponding to the target transmission data can be determined based on the SVC extended header included in the target transmission data, and then framing operation can be carried out on the target transmission data based on the virtual serial number, thus effectively improving the quality and the effect of acquiring the image frame, and further improving the practicability of the method, is beneficial to the popularization and the application of the market.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings used in the embodiments or the prior art descriptions will be briefly described below, and it is obvious that the drawings in the following descriptions are some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative efforts.
Fig. 1 is a schematic view of a scenario of a data transmission method according to an embodiment of the present application;
fig. 2 is a schematic flowchart of a data transmission method according to an embodiment of the present application;
fig. 3 is a schematic diagram of an SVC extension header provided in an embodiment of the present application;
fig. 4 is a first schematic flowchart of a process of performing forward error correction FEC processing on the original data based on the SVC extension header and the actual sequence number to generate target transmission data corresponding to the original data according to an embodiment of the present application;
fig. 5a is a schematic diagram of an original data RTP packet provided in an embodiment of the present application;
fig. 5b is a schematic diagram of a fec data provided in the present application;
fig. 6 is a schematic diagram illustrating that FEC encoding is performed on header information and load information of the original data RTP packet to obtain FEC encoded data according to the embodiment of the present application;
fig. 7 is a second flowchart illustrating a process of performing forward error correction FEC processing on the original data based on the SVC extension header and an actual sequence number to generate target transmission data corresponding to the original data according to the embodiment of the present application;
fig. 8 is a schematic flowchart of another data transmission method according to an embodiment of the present application;
fig. 9 is a schematic flowchart of another data transmission method according to an embodiment of the present application;
fig. 10 is a schematic flowchart of sending the target transmission data to a receiving end based on the operation mode according to the embodiment of the present application;
fig. 11 is a schematic flowchart of another data transmission method according to an embodiment of the present application;
fig. 12 is a schematic structural diagram of a data transmission device according to an embodiment of the present application;
fig. 13 is a schematic structural diagram of an electronic device corresponding to the data transmission apparatus shown in fig. 12;
fig. 14 is a schematic structural diagram of another data transmission device according to an embodiment of the present application;
fig. 15 is a schematic structural diagram of an electronic device corresponding to the data transmission apparatus shown in fig. 14;
fig. 16 is a schematic structural diagram of a data transmission device according to an embodiment of the present application;
fig. 17 is a schematic structural diagram of an electronic device corresponding to the data transmission device shown in fig. 16.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are some embodiments of the present application, but not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
The terminology used in the embodiments of the present application is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. As used in the examples of this application and the appended claims, the singular forms "a", "an", and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise, and "a" and "an" typically include at least two, but do not exclude the presence of at least one.
It should be understood that the term "and/or" as used herein is merely one type of association that describes an associated object, meaning that three relationships may exist, e.g., a and/or B may mean: a exists alone, A and B exist simultaneously, and B exists alone. In addition, the character "/" herein generally indicates that the former and latter related objects are in an "or" relationship.
The words "if", as used herein, may be interpreted as "at … …" or "at … …" or "in response to a determination" or "in response to a detection", depending on the context. Similarly, the phrase "if determined" or "if detected (a stated condition or event)" may be interpreted as "upon determining" or "in response to determining" or "upon detecting (a stated condition or event)" or "in response to detecting (a stated condition or event)", depending on the context.
It is also noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a good or system that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such good or system. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a commodity or system that includes the element.
In addition, the sequence of steps in each method embodiment described below is only an example and is not strictly limited.
Interpretation of terms:
forward Error Correction (FEC) is an Error control method, which refers to a technique that a signal is encoded in advance according to a certain algorithm before being sent to a transmission channel, a redundant code with the characteristics of the signal itself is added, and the received signal is decoded at a receiving end according to the corresponding algorithm, so as to find out and correct an Error code generated in the transmission process.
Scalable Video Coding (SVC) is a technique used to be compatible with different terminal devices and link bandwidths. It features that the code stream is layered, the lower layer code stream can be decoded separately, and the higher layer code stream can enhance the quality of video.
In order to solve the problems that, in the prior art, "when a sending end transmits real-time streaming media data to a receiving end through a network server, the network server often directly transmits the real-time streaming media data to the receiving end, so that the quality and effect of data transmission are not guaranteed, and the data transmission cost and bandwidth cost corresponding to the network server are also increased", and the like, the present embodiment provides a data transmission method, a device, and a computer storage medium, wherein an execution main body of the data transmission method is a data transmission system, and as shown in reference to fig. 1, the data transmission system may include: the system comprises a sending end, a server and a receiving end, wherein the sending end can be in communication connection with the receiving end through the server, specifically,
the sending end and the receiving end can be any computing equipment with certain data transmission capacity, and in the concrete implementation, the sending end and the receiving end can be a mobile phone, a tablet computer, a set application program and the like. In addition, the basic structure of the transmitting end and the receiving end may include: at least one processor. The number of processors depends on the configuration and type of the sender and receiver. The sending end may also include a Memory, which may be volatile, such as RAM, or non-volatile, such as Read-Only Memory (ROM), flash Memory, or both types. The memory typically stores an Operating System (OS), one or more application programs, and may also store program data and the like. Besides the processing unit and the memory, the transmitting end and the receiving end also include some basic configurations, such as a network card chip, an IO bus, a display component, some peripheral devices, and the like. Alternatively, some peripheral devices may include, for example, a keyboard, a mouse, a stylus, a printer, and the like. Other peripheral devices are well known in the art and will not be described in detail herein.
The server refers to a device that can provide data transmission service in a network virtual environment, and generally refers to a device that performs information planning and data transmission operations using a network. In physical implementation, a server may be any device capable of providing computing services, responding to service requests, and performing processing, such as: can be cluster servers, regular servers, cloud hosts, virtual centers, and the like. The server mainly comprises a processor, a hard disk, a memory, a system bus and the like, and is similar to a general computer framework.
In the above embodiment, the sending end and the receiving end may perform network connection with the server, where the network connection may be a wireless or wired network connection. If the sending end and the receiving end are in communication connection with the server, the network format of the mobile network may be any one of 2G (gsm), 2.5G (gprs), 3G (WCDMA, TD-SCDMA, CDMA2000, UTMS), 4G (LTE), 4G + (LTE +), WiMax, 5G, and the like.
The method includes the steps that a sending end is used for obtaining original data to be transmitted, in order to guarantee the quality and effect of transmission of the original data, a hierarchical coding SVC extension header used for transmitting the original data and an actual sequence number corresponding to the original data can be determined, then forward error correction code (FEC) processing operation can be conducted on the original data based on the SVC extension header and the actual sequence number, and therefore target transmission data corresponding to the original data can be generated. After generating the target transmission data, the target transmission data may be sent to a server.
The server is configured to receive target transmission data sent by the sending end, and the server may correspond to multiple different operation modes, and different operation modes may correspond to different data transmission modes, so that, in order to ensure flexible reliability of transmission of the target transmission data, an operation mode for transmitting the target transmission data may be determined, where the operation mode may include any one of: a transparent transmission mode, a decoding mode and an encoding and decoding mode; the targeted transmission data may then be sent to the receiving end based on the operational mode.
The receiving end is configured to receive the target transmission data sent by the server, and because the target transmission data transmitted by different operation modes of the server are not very identical, the target transmission data received by the receiving end may include at least one of the following: FEC data, original data; when a packet loss situation occurs in a network, in order to enable serial numbers of all data received by a receiving end to be continuous, a virtual serial number corresponding to target transmission data can be obtained based on an SVC extension header included in the target transmission data, and then framing operation can be performed on the target transmission data based on the virtual serial number, so that an image frame can be obtained based on framing of the target transmission data with the continuous serial number, and accuracy and reliability of obtaining the image frame are further ensured.
According to the technical scheme provided by the embodiment, after the sending end acquires the original data, Forward Error Correction (FEC) processing operation is carried out on the original data based on the SVC extended header and the actual serial number, so that the quality and the effect of generating the target transmission data are ensured, when the target transmission data are sent to the server, the server can correspond to different operation modes, so that the operation mode of the server for transmitting the target transmission data can be determined, then the target transmission data are transmitted to the receiving end based on the operation modes, the data transmission operation based on various modes can be effectively realized, the data transmission cost and the bandwidth cost corresponding to the server are reduced, the data packet loss resistance effect can be considered, and meanwhile, the technical scheme can be suitable for various application scenes; when a receiving end receives target transmission data sent by a server, if a network loses packets, in order to ensure that serial numbers of all data received by the receiving end are continuous serial numbers, a virtual serial number corresponding to the target transmission data can be determined, and then framing operation can be performed on the target transmission data based on the virtual serial number, so that the quality and the effect of acquiring image frames are effectively improved, the practicability of the method is further improved, and the method is favorable for popularization and application in the market.
Some embodiments of the invention are described in detail below with reference to the accompanying drawings. The features of the embodiments and examples described below may be combined with each other without conflict between the embodiments. In addition, the sequence of steps in each method embodiment described below is only an example and is not strictly limited.
Fig. 2 is a schematic flowchart of a data transmission method according to an embodiment of the present application; referring to fig. 2, the present embodiment provides a data transmission method, where an execution subject of the method may be a data transmission apparatus, the data transmission apparatus may be implemented as software, or as a combination of software and hardware, and in some examples, the data transmission apparatus may be implemented as a sending end, and specifically, the data transmission method may include the following steps:
step S201: original data to be transmitted are obtained.
Step S202: a hierarchically encoded SVC extension header for transmission of the original data and an actual sequence number corresponding to the original data are determined.
Step S203: and performing Forward Error Correction (FEC) processing on the original data based on the SVC extended header and the actual sequence number to generate target transmission data corresponding to the original data.
The following is a detailed description of each of the above steps:
step S201: original data to be transmitted are obtained.
When a user has a transmission requirement of real-time data or a transmission requirement of non-real-time data, the data transmission device may acquire original data to be transmitted, where the original data may be real-time transmission data or non-real-time transmission data, and specifically, when the original data is real-time transmission data, the original data may include at least one of the following data: real-time sound stream data, real-time video stream data, real-time image stream data, real-time animation stream data, etc., and those skilled in the art can configure different real-time transmission data according to a specific application scenario.
In addition, the specific obtaining manner of the original data to be transmitted is not limited in this embodiment, and in some examples, obtaining the original data to be transmitted may include: acquiring a display interface on a sending terminal for realizing interactive operation with a user, acquiring data generation operation input by the user in the display interface, and generating and acquiring original data to be transmitted based on the data generation operation; or, the original data to be transmitted is stored in a preset area or preset equipment, and the original data to be transmitted can be acquired by accessing the preset area or the preset equipment. Of course, the obtaining method of the original data is not limited to the above implementation manner, and a person skilled in the art may also obtain the original data to be transmitted in other manners as long as the accuracy and reliability of obtaining the original data to be transmitted can be ensured, which is not described herein again.
Step S202: a hierarchically encoded SVC extension header for transmission of the original data and an actual sequence number corresponding to the original data are determined.
After the original data is acquired, in order to ensure the quality and effect of transmission of the original data, a scalable coding SVC extension header for transmitting the original data and an actual sequence number corresponding to the original data may be determined, and it should be noted that when different original data is acquired, different SVC extension headers and different actual sequence numbers corresponding to different original data may be determined. Specifically, as shown in fig. 3, the SVC extension header may include:
a T field is 1bit and is used for identifying whether the TID field is effective or not, and the default is 0;
a TID field, which is identification layer information, 2 bits of identification information, and may generally include 3 layers (0,1, 2);
an I field, which is 1bit, for identifying whether the data frame is an I frame;
an S field which is 1bit and is used for identifying whether the StartSeq | EndSeq field is valid or not;
e field, for identifying whether there is an extension following it, and extensions (specifically pending, mainly for extending Picture _ ID and ref ID) may be added newly 1: the method has the following expansion: picture _ ID;
a StartSeq field of 16 bits, the starting sequence number of this frame;
an EndSeq field of 16 bits, the ending sequence number of this frame;
RES field, which is 1bit followed by real seq, 1bit reserved field for future expansion, and defaults to 0;
a Picture _ ID field, 16 bits, for identifying a frame sequence number.
The actual sequence number corresponding to the original data may be used to transmit a real sequence number, where the length of the real sequence number is 2 bytes and is unsigned, and specifically, the actual sequence number may be obtained by a Uniform Resource Identifier (Uniform Resource Identifier, URI), for example: the uniform resource identifier "uri" may be identified by: taobao: rtc-hdrext: video: compositionmeme "to obtain the actual serial number.
In addition, the embodiment does not limit a specific implementation manner of determining the scalable coding SVC extension header used for transmitting the original data and the actual sequence number corresponding to the original data, and in some examples, the SVC extension header and the real sequence number may be preconfigured, at this time, the preconfigured SVC extension header and the actual sequence number may be stored in a preset region, and when the original data to be transmitted is obtained, the SVC extension header and the actual sequence number corresponding to the original data may be obtained by accessing the preset region. In other examples, the SVC extension header and the actual sequence number may be generated based on an execution operation input by a user, and in particular, determining the hierarchically encoded SVC extension header for transmitting the original data and the actual sequence number corresponding to the original data may comprise: the method comprises the steps of obtaining an interactive interface used for interactive operation with a user, obtaining execution operation input by the user in the interactive interface, and generating and determining the SVC extended header and the actual serial number based on the execution operation, so that the accuracy and reliability of determining the SVC extended header and the actual serial number are effectively guaranteed.
Step S203: and performing Forward Error Correction (FEC) processing on the original data based on the SVC extended header and the actual sequence number to generate target transmission data corresponding to the original data.
After the SVC extension header and the actual sequence number are obtained, forward error correction FEC processing may be performed on the original data based on the SVC extension header and the actual sequence number to generate target transmission data corresponding to the original data, where the generated target transmission data may include the SVC extension header and the actual sequence number, and because the target transmission data includes the SVC extension header and the actual sequence number, in a process of transmitting the target transmission data, quality and efficiency of transmitting the target transmission data may be guaranteed based on the SVC extension header and the actual sequence number, so that the technical scheme may be applicable to different congestion control scenarios.
In the data transmission method provided by this embodiment, the original data to be transmitted is obtained, then the scalable coding SVC extension header for transmitting the original data and the actual sequence number corresponding to the original data are determined, and forward error correction FEC processing is performed on the original data based on the SVC extension header and the actual sequence number, so that target transmission data corresponding to the original data and including the SVC extension header and the actual sequence number can be generated.
Fig. 4 is a first flowchart illustrating a process of performing forward error correction FEC processing on original data based on an SVC extension header and an actual sequence number to generate target transmission data corresponding to the original data according to an embodiment of the present application; referring to fig. 4, this embodiment provides an implementation manner of generating target transmission data corresponding to original data, and specifically, the performing forward error correction FEC processing on the original data based on an SVC extension header and an actual sequence number in this embodiment may include:
step S401: and generating an RTP data packet of the original data based on the original data, the SVC extended header and the actual sequence number.
After the original data, the SVC extension header, and the actual sequence number are obtained, the original data, the SVC extension header, and the actual sequence number may be analyzed and processed, and specifically, the original data, the SVC extension header, and the actual sequence number may be processed, so that an RTP packet of the original data may be generated. For the original data RTP packet, it may include not only the SVC extension header and the actual sequence number, but also an RTP header, specifically, as shown in fig. 5a, the RTP header may appear in each RTP packet, and specifically, the RTP header may include:
version (V): 2bit, this field defines the version of RTP. The version of this protocol definition may be 2. (value 1 times RTP draft version used, value 0 used in the protocol used for the final "vat" voice tool)
Filling (P): 1bit, if the filler bits are set, the packet contains one to more filler bits appended to the end, the filler bits not counting as part of the payload. The last byte of the padding indicates how many padding bits can be ignored. Padding may be used for certain encryption algorithms with fixed length or for transmitting multiple RTP packets in the underlying data unit.
Extension (X): 1bit, and if an extension bit is set, the fixed header (only) is followed by a header extension.
CSRC Count (CC): 4bit, the CSRC count contains the number of CSRC identifiers that follow the fixed header.
Symbol (M): 1bit, the interpretation of the flag being specified by the specific protocol. It is used to allow important events, such as frame boundaries, to be marked in the bitstream.
Load type (PT): 7bit, which defines the format of the payload, whose interpretation is determined by the specific application, the protocol may specify a default match between the payload type code and the payload format. Other load type codes may be dynamically defined by non-RTP methods. An RTP sending end sends out a single RTP load type at any given time; this domain is not used to multiplex different media streams.
Sequence number (sequence number): when a 16bit RTP data packet is sent, the sequence number is added with 1, and the receiving end can detect packet loss and rebuild the packet sequence according to the sequence number. The initial value of the sequence number is random (unpredictable) so that even when the source itself is not encrypted (sometimes the packet passes through a translator, which does it), common text attacks that are generic to the encryption algorithm can be more difficult.
Timestamp (timestamp): 32 bits and the timestamp reflects the sampling time of the first byte in the RTP packet. The clock frequency depends on the payload data format and is described in a description file. The payload format may also be described dynamically by the RTP method.
Synchronization Source (SSRC) identifier: takes 32 bits to identify the synchronization source. The identifier is randomly chosen and two synchronized sources participating in the same video conference cannot have the same SSRC. ssrc — len (actual RTP packet length).
Special source (CSRC) identifier: each CSRC identifier takes 32 bits, and can be 0-15. Each CSRC identifies all of the contracted sources contained in the RTP packet payload.
In addition, before the forward error correction FEC processing operation is performed on the original data, the rtp header information header and the load information payload may be protected in the FEC data, and specifically, the FEC packet may implement the protection operation on the rtp header information header and the load information payload by adding the corresponding svc extension header and the actual sequence number seq number.
Referring to fig. 5b, the payload information payload corresponds to original data, and the rtp header information may include a sn _ base field for identifying a sequence number seq _ num (16bit) of a first original packet in the fec packet, a k field for identifying an original packet format (8bit), a n field for identifying a total number of original packets and redundant packets (8bit), a i field for identifying a relative sequence number of each packet in the packet (8bit), a max _ grp _ pkt _ size field for identifying a maximum packet length in the fec packet (16bit), a c field of 1bit for identifying whether to cross frames, a 0 field for identifying intra coding, a 1 field for identifying inter coding, and a reserved field (7bit), wherein the inter coding may perform a coding operation on a set of non-key frames, therefore, coding secondary elements can be saved, so that the balance between data processing cost and data delay can be realized, and intra-frame coding is used for coding key frames or large frames; generally, without paying attention to delay, the data frame can be encoded by adopting interframe coding preferentially, and in the real-time transmission scene, the data frame can be encoded by adopting intraframe coding preferentially.
In addition, after the forward error correction code FEC processing is performed on the original data, the FEC data may be configured with a synchronization source identifier ssrc and a pt identifier for identifying a payload type separately, and management and maintenance operations on the FEC data are facilitated through the separately configured ssrc. The ssrc can also be used for identifying the actual rtp packet length, and during the transmission of the data, since the ssrc does not change, during the fec encoding processing of the original data, no processing operation on the ssrc is required. Similarly, since the pt identifier for identifying the load type may change during data transmission, before transmitting the original data, the pt may be set to zero, that is, the pt is equal to 0, then the pt after the zero setting may be subjected to encoding transmission operation, and after the receiving end acquires the pt, the data recovery operation may be performed on the pt to determine the load type. The sequence number seq may be changed during the transmission of the original data, and thus, an extension header of an actual sequence number needs to be added. the timestamp information is not changed in the transmission process, and any processing operation is not needed in the transmission process of the original data. Other frame-level extension headers (e.g., cts extension headers) may be placed in an extension module (i.e., ext info module) in the FEC packet, and in addition, the FEC packet may further include an identification bit (C bit) for identifying whether to perform a cross-frame operation, and intra-frame encoding or inter-frame encoding may be implemented through the identification bit.
Step S402: and performing FEC encoding operation on the header information and the load information of the original data RTP data packet to obtain FEC encoded data.
After the original data RTP packet is obtained, FEC encoding operation may be performed on header information and load information of the original data RTP packet, so that FEC encoded data may be obtained. Specifically, referring to fig. 6, the header information of the original data RTP packet may include: the FEC coding method includes performing FEC coding on header information and load information of an original data RTP packet to obtain FEC coded data, where the FEC coded data may include FEC redundant data corresponding to original data, and a data amount corresponding to the FEC redundant data is related to FEC redundancy.
Step S403: and generating target transmission data corresponding to the original data based on the FEC coding data and the SVC extension header.
After the FEC encoded data and the SVC extension header are obtained, the FEC encoded data and the SVC extension header may be analyzed, specifically, the FEC encoded data and the SVC extension header may be directly integrated, so that target transmission data may be obtained.
In this embodiment, an original data RTP packet is generated based on original data, an SVC extension header and an actual sequence number, and then, FEC encoding operation is performed on header information and load information of the original data RTP packet to obtain FEC encoded data, and the FEC encoded data and the SVC extension header are analyzed to generate target transmission data corresponding to the original data, so that accuracy and reliability of determining the target transmission data are effectively improved, and quality and effect of data transmission based on the target transmission data are ensured.
Fig. 7 is a second schematic flowchart of a process of performing forward error correction FEC processing on original data based on an SVC extension header and an actual sequence number to generate target transmission data corresponding to the original data according to an embodiment of the present application; referring to fig. 7, this embodiment provides another implementation manner for generating target transmission data corresponding to original data, and specifically, in this embodiment, performing forward error correction FEC processing on the original data based on an SVC extension header and an actual sequence number may include:
step S701: when the b frames are included in the original data, a difference time cts extension head between video display time and decoding time for encoding and decoding the b frames in the original data is obtained.
When the original data includes the b frame, in order to ensure stable reliability of transmission of the b frame data, a cts extension header used for encoding and decoding the b frame in the original data may be obtained, where the cts extension header is a difference time between video display time and decoding time, and in some examples, the cts extension header corresponds to a transmitted video and has a unit of ms (millisecond). Specifically, the specific obtaining manner of the cts extension header is not limited in this embodiment, in some examples, the cts extension header may be preconfigured, and at this time, the preconfigured cts extension header may be stored in a preset area, and when the original data to be transmitted is obtained and the original data includes a b frame, the cts extension header may be obtained by accessing the preset area, where the difference time is a difference between video display time and decoding time for encoding and decoding the b frame in the original data. In other examples, the cts extension header may be generated based on an execution operation input by a user, and specifically, obtaining a difference time cts extension header between a video display time and a decoding time for encoding and decoding a b frame in original data may include: the method comprises the steps of obtaining an interactive interface used for interactive operation with a user, obtaining execution operation input by the user in the interactive interface, and generating and determining the cts extension head based on the execution operation, so that the accuracy and reliability of determination of the cts extension head are effectively guaranteed.
Step S702: and performing Forward Error Correction (FEC) processing on the original data based on the SVC extended header, the actual serial number and the cts extended header to generate target transmission data corresponding to the original data.
After the SVC extension header, the actual sequence number, and the cts extension header are obtained, forward error correction code FEC processing may be performed on the original data based on the SVC extension header, the actual sequence number, and the cts extension header to generate target transmission data corresponding to the original data, and the generated target transmission data may include the SVC extension header, the actual sequence number, and the cts extension header.
In addition, the embodiment does not limit a specific implementation manner of generating the target transmission data corresponding to the original data, in some examples, a machine learning model for generating the target transmission data is configured in advance, and after the original data, the SVC extension header, the actual sequence number, and the cts extension header are acquired, the original data, the SVC extension header, the actual sequence number, and the cts extension header may be input into the machine learning model, so that the target transmission data output by the machine learning model may be acquired.
In other examples, performing forward error correction FEC processing on the original data based on the SVC extension header, the actual sequence number, and the cts extension header, and generating target transmission data corresponding to the original data may include: generating an original data RTP data packet based on original data, an SVC extended header, a cts extended header and an actual sequence number; performing FEC encoding operation on header information and load information of an original data RTP data packet to obtain FEC encoded data; and generating target transmission data corresponding to the original data based on the FEC coding data, the SVC extension header and the cts extension header.
After the original data, the SVC extension header, the cts extension header, and the actual sequence number are obtained, the original data, the SVC extension header, the cts extension header, and the actual sequence number may be analyzed and processed, specifically, the original data, the SVC extension header, the cts extension header, and the actual sequence number may be processed, so that an RTP data packet of the original data may be generated. After the original data RTP packet is obtained, FEC encoding operation may be performed on header information and load information of the original data RTP packet, and after the FEC encoded data and the cts extension header are obtained, target transmission data corresponding to the original data may be generated based on the FEC encoded data, the SVC extension header, and the cts extension header. Specifically, the implementation manner and the implementation effect of the steps in this embodiment are similar to those of steps S402 to S403 in the embodiment, and reference may be made to the above statements specifically, which are not repeated herein.
In this embodiment, when the original data includes the b frame, the original data RTP packet is generated based on the original data, the SVC extension header, the cts extension header, and the actual sequence number by obtaining the differential time cts between the video display time and the decoding time for encoding and decoding the b frame in the original data, and then FEC encoding is performed on the header information and the load information of the original data RTP packet to obtain FEC encoded data, and the FEC encoded data, the SVC extension header, and the cts extension header are analyzed to generate target transmission data corresponding to the original data, so that flexible reliability of determining the target transmission data is effectively improved, and quality and effect of data transmission based on the target transmission data are ensured.
Fig. 8 is a schematic flowchart of another data transmission method according to an embodiment of the present application; on the basis of any one of the above embodiments, referring to fig. 8, this embodiment provides an implementation manner for determining an operation mode corresponding to a server by a sending end, and specifically, after generating target transmission data corresponding to original data, the method in this embodiment may further include:
step S801: and determining the network operation state and scene information corresponding to the target transmission data.
After the target transmission data is acquired, in order to ensure stable reliability of transmission of the target transmission data, a network operating state and scene information corresponding to the target transmission data may be determined, where the network operating state corresponding to the target transmission data may include: the network state is good, the network state is general, and the network state is poor, specifically, determining the network operation state corresponding to the target transmission data may include: acquiring a data transmission rate corresponding to target transmission data; and determining the network operation state corresponding to the target transmission data based on the data transmission rate. In some examples, when the data transmission rate is greater than or equal to a preset threshold, determining that the network operation state corresponding to the target transmission data is a good state; and when the data transmission rate is less than a preset threshold value, determining that the network operation state corresponding to the target transmission data is a poor state.
Additionally, the context information may include at least one of: a live scene, a real-time conference scene, a real-time communication scene (e.g., a voice call scene, a video call scene), and the like, wherein the live scene includes but is not limited to: distance education, live lessons, telemedicine, etc. in an educational scenario. For the context information, the specific implementation manner of the context information is not limited in this embodiment, in some examples, the context information may be directly configured by a user, and at this time, determining the context information corresponding to the target transmission data may include: the method comprises the steps of obtaining an interactive interface used for carrying out interactive operation with a user, obtaining execution operation input in the interactive interface by the user, and determining scene information corresponding to target transmission data based on the execution operation. Or in other examples, the target transmission data may include scene identification information for identifying scene information, and after the target transmission data is acquired, the scene identification information included in the target transmission data may be extracted, and then the scene information corresponding to the target transmission data is determined based on the scene identification information, so that the accuracy and reliability of determining the scene information are effectively ensured.
Step S802: determining an operation mode corresponding to the server based on the network operation state and the scene information, wherein the operation mode comprises any one of the following modes: transparent transmission mode, decoding mode and encoding and decoding mode.
After the network operation state and the scenario information are acquired, the network operation state and the scenario information may be analyzed to determine an operation mode corresponding to the server, where the operation mode may include at least one of: transparent transmission mode, decoding mode and encoding and decoding mode.
Specifically, when the server is in the transparent transmission mode, after the server acquires the target transmission data, the server does not perform any data processing operation on the target transmission data, and directly sends the target transmission data to the receiving end. In addition, when the server is in the transparent transmission mode, the fec redundancy corresponding to the target transmission data may also be dynamically adjusted according to the operation state of the network, for example: when the network running state is good, the fec redundancy corresponding to the target transmission data can be a first redundancy; when the network operation state is general, the fec redundancy corresponding to the target transmission data may be a second redundancy, where the second redundancy is greater than the first redundancy, thereby being beneficial to saving the network bandwidth cost and improving the utilization rate of the data resource.
When the server is in a decoding transparent transmission mode, the server can acquire target transmission data, and after the server acquires the target transmission data, the server can decode first-hop data in the target transmission data to acquire first-hop original data corresponding to the first-hop data; then, target transmission data is sent to a receiving end based on the first-hop original data, and the decoding transparent transmission decoding mode can be suitable for a specific live broadcast scene, for example: and a live broadcast scene needing specific protection is required to ensure that the first hop data is not lost.
When the server is in a decoding mode, the server can acquire target transmission data, and after the server acquires the target transmission data, first hop data in the target transmission data and other hop data behind the first hop data can be acquired; then deleting FEC data included in other hop data to obtain adjusted data; and sending the first-hop data and the adjusted data to a receiving end. When the server is in the encoding and decoding mode, after the server acquires the target transmission data, decoding processing can be performed on the target transmission data to acquire original data corresponding to the target transmission data; then, encoding the original data to obtain encoded data; and sending the encoded data to a receiving end.
In addition, the specific implementation manner of determining the operation mode corresponding to the server is not limited in this embodiment, in some examples, a machine learning model for determining the operation mode is trained in advance, and after the network operation state and the scene information are acquired, the network operation state, the scene information, and the target transmission data may be input into the machine learning model, so that the operation mode corresponding to the server output in the machine learning model may be acquired. Alternatively, in other examples, determining the operational mode corresponding to the server based on the network operational status may include: determining an operation mode identifier corresponding to the server and used for transmitting the target transmission data based on the network operation state and the scene information; and determining an operation mode corresponding to the server based on the operation mode identification.
Specifically, after the network operation state and the scene information are acquired, the network operation state and the scene information may be analyzed to determine an operation mode identifier corresponding to the server for transmitting the target transmission data. In some examples, the data transmission device is communicatively connected to a management center, after the data transmission device acquires the network operation state and the scene information, the network operation state and the scene information may be sent to the management center, after the management center acquires the network operation state and the scene information, the operation mode corresponding to the server may be determined based on the network operation state and the scene information, and then the operation mode corresponding to the server may be sent to the data transmission device, so that the data transmission device may stably acquire or determine the operation mode corresponding to the server.
In the embodiment, the network running state and the scene information corresponding to the target transmission data are determined, and then the running mode corresponding to the server is determined based on the network running state and the scene information, so that the accuracy and the reliability of determining the running mode corresponding to the server are effectively ensured, the target transmission data can be transmitted based on the running mode of the server, and the stability and the reliability of transmitting the target transmission data are further ensured.
Fig. 9 is a schematic flowchart of another data transmission method according to an embodiment of the present application; referring to fig. 9, the present embodiment provides a further data transmission method, where an execution subject of the method may be a data transmission device, the data transmission device may be implemented as software, or a combination of software and hardware, and in some examples, the data transmission device may be implemented as a server, and specifically, the data transmission method may include the following steps:
step S901: and receiving target transmission data sent by the sending end.
When the sending end acquires target transmission data and sends the target transmission data to the server, the server can receive the target transmission data sent by the sending end, the target transmission data can be real-time transmission data, and specifically, the real-time transmission data can include at least one of the following data: real-time sound stream data, real-time video stream data, real-time image stream data, real-time animation stream data, etc., and those skilled in the art can configure different real-time transmission data according to a specific application scenario.
Step S902: determining an operation mode for transmitting the target transmission data, wherein the operation mode comprises any one of the following modes: transparent transmission mode, decoding mode and encoding and decoding mode.
Since the server has different operation modes, which may correspond to different data transmission operations, in order to ensure stable reliability of transmission of the target transmission data, an operation mode for transmitting the target transmission data may be determined, where the operation mode may include at least one of: transparent transmission mode, decoding mode and encoding and decoding mode.
In addition, the specific implementation manner of determining the operation mode for transmitting the target transmission data is not limited in this embodiment, in some examples, the operation mode of the server may be configured by the sending end, specifically, before processing the target transmission data, the sending end may determine the operation mode for the server corresponding to the target transmission data, and then may send a mode operation instruction to the server, and after the server obtains the mode operation instruction, the operation mode may be determined based on the mode operation instruction. Or, in another example, the operation mode of the server may be determined by the server based on the network operation state and the context information, and specifically, before processing the target transmission data, the method in this embodiment may further include: the method includes the steps of obtaining a network operation state and scene information, and after the network operation state and the scene information are obtained, analyzing the network operation state and the scene information to determine an operation mode corresponding to a server, wherein the operation mode may include at least one of the following modes: transparent transmission mode, decoding mode and encoding and decoding mode.
The machine learning model used for determining the operation mode is trained in advance, and after the network operation state and the scene information are obtained, the network operation state, the scene information and the target transmission data can be input into the machine learning model, so that the operation mode corresponding to the server and output in the machine learning model can be obtained. Alternatively, in other examples, determining the operation mode corresponding to the server based on the network operation state and the scenario information may include: acquiring a mapping table for determining an operation mode, performing table look-up operation based on a network operation state and scene information, and determining an operation mode identifier corresponding to a server and used for transmitting target transmission data; and determining an operation mode corresponding to the server based on the operation mode identification.
Step S903: and sending the target transmission data to the receiving end based on the operation mode.
After the operation mode of the server is acquired, the target transmission data may be transmitted to the receiving end based on the operation mode of the server, so that the receiving end may stably receive the target transmission data.
It should be noted that, because the operation modes of the server may include a pass-through mode, a decoding mode, an encoding decoding mode, and the like, and different operation modes may correspond to different data transmission strategies, in order to make a user know differences and differences between the operation modes, the following describes in detail the data transmission strategies corresponding to the server in each operation mode:
example 1: when the operation mode of the server is the transparent transmission mode, sending the target transmission data to the receiving end based on the operation mode may include: and directly sending the target transmission data to a receiving end.
Specifically, when the operation mode of the server is the transparent transmission mode, the full-link transparent transmission operation on the target transmission data is effectively realized, at this time, the server does not perform any encoding and decoding processing on the target transmission data, and the transparent transmission mode is suitable for a large-scale data transmission scene or a scene with a limit on the cost of the server, for example: a live scenario, a one-to-one communication connection scenario where the network link is short, etc.
Example 2: when the operation mode of the server is the decoding transparent transmission mode, sending the target transmission data to the receiving end based on the operation mode may include: acquiring first hop data in target transmission data; decoding the first hop data to obtain first hop original data corresponding to the first hop data; and sending the target transmission data to a receiving end based on the first-hop original data.
Wherein, because the stability of the first-hop data transmission directly affects the transmission effect of the whole data, for example: if the first-hop data transmission of the target transmission data is abnormal, a problem occurs in the transmission operation of all data after the target transmission data. Therefore, the transmission stability of the first-hop data has a great influence on the whole transmission process of the target transmission data, and in order to ensure the stability and reliability of the target transmission data transmission, when the operation mode of the server is a decoding transparent transmission mode, the server can perform decoding operation on the first-hop data in the received target transmission data to recover first-hop original data corresponding to the first-hop data, and then can send the target transmission data to a receiving end based on the first-hop original data, so that the problem that packet loss occurs in the first-hop data can be effectively solved. The decoding pass-through mode is suitable for large-scale data transmission scenes or scenes with limitation on the cost of a server, such as: live scenes with specific protection objects, data transmission scenes with specific protection policies.
It should be noted that sending the target transmission data to the receiving end based on the first-hop original data may include: detecting whether packet loss occurs in first hop original data in target transmission data, and if the packet loss does not occur in the first hop original data in the target transmission data, directly transmitting the target transmission data to a receiving end; if the first-hop original data in the target transmission data has a packet loss condition, replacing the first-hop data included in the target transmission data with the first-hop original data obtained by decoding to obtain replaced transmission data, and then sending the replaced transmission data to a receiving end, so that the receiving end can be effectively ensured to stably receive the first-hop processing of the target transmission data, and the condition of first-hop data packet loss is effectively avoided.
Example 3: when the operation mode of the server is the decoding mode, transmitting the target transmission data to the receiving end based on the operation mode may include: acquiring first hop data in target transmission data and other hop data behind the first hop data; deleting FEC data included in other hop data to obtain adjusted data; and sending the first-hop data and the adjusted data to a receiving end.
The decoding mode of the server may solve the first-hop weak network problem, specifically, when a network bandwidth or a network state used for transmitting target transmission data is poor, in order to ensure stable reliability of transmission of first-hop data, after the server acquires the target transmission data, it may determine that first-hop data included in the target transmission data and other-hop data located after the first-hop data are affected by the network bandwidth or the network state, in order to improve quality and effect of transmission of load data or effective data and the first-hop data, FEC data (i.e., FEC coding redundant data) included in the other-hop data may be deleted, so that adjusted data may be obtained, after the adjusted data and the first-hop data are acquired, the first-hop data and the adjusted data may be sent to a receiving end, therefore, the receiving end can effectively acquire the first-hop data and the adjusted data, wherein the first-hop data corresponds to the FEC encoding strategy, and the adjusted data does not correspond to the FEC encoding strategy, so that the transmission operation of the target transmission data under the condition of a weak network is effectively realized.
Example 4: when the operation mode of the server is the encoding and decoding mode, sending the target transmission data to the receiving end based on the operation mode may include: decoding the target transmission data to obtain original data corresponding to the target transmission data; encoding the original data to obtain encoded data; and sending the coded data to a receiving end.
When the operation mode of the server is the encoding and decoding mode, it is described that after the server acquires the target transmission data, encoding and decoding operations are performed on each hop of data in the target transmission data, specifically, the target transmission data is decoded first, so that original data corresponding to the target transmission data can be obtained, then the original data is encoded, the encoded data is obtained, and then the encoded data can be sent to a receiving end, that is, the server realizes point-to-point encoding and decoding operations, so that the transmission delay of the whole communication link can be reduced, the quality and the effect of transmitting the target transmission data can be ensured, but the cost of a core processor CPU of the server can be increased.
As can be seen from the above, different data transmission operations can be realized in different operation modes of the server, and different data transmission effects are provided, and a person skilled in the art can configure the operation modes of the server according to a specific application scenario and an application requirement, which is not described herein again.
In the data transmission method provided in this embodiment, an operation mode for transmitting target transmission data is determined by receiving the target transmission data sent by a sending end, and the target transmission data is sent to a receiving end based on the operation mode, where the operation mode of a server may include a transparent transmission mode, a decoding mode, and an encoding decoding mode, and different operation modes may correspond to different data transmission strategies, so as to effectively solve the problem of high cpu cost and bandwidth cost in the server in a large-scale fec usage scenario, and specifically, in different operation modes of the server, different strategies may be adopted to perform flexible and effective data transmission operation on the target transmission data, for example: the method supports the combination operation of a congestion control scene and a fec strategy, supports the full-link transparent transmission operation, supports various application scenes, and supports dynamic interactive operation, so that not only can the bandwidth cost be reduced, but also the effect of packet loss resistance can be taken into consideration, the flexibility and reliability of the method are further improved, and the popularization and application of the market are facilitated.
Fig. 10 is a schematic flowchart of sending target transmission data to a receiving end based on an operation mode according to an embodiment of the present application; referring to fig. 10, this embodiment provides an implementation manner for transmitting target transmission data in a congestion control scenario, and specifically, the sending target transmission data to a receiving end based on an operation mode in this embodiment may include:
step S1001: and acquiring congestion control parameters representing the degree of network congestion for transmitting the target transmission data.
After the server acquires the target transmission data, in order to ensure stable reliability of transmission of the target transmission data, a congestion control parameter may be acquired, where the congestion control parameter represents a degree of network congestion for transmitting the target transmission data, and in some examples, the congestion control parameter may be positively correlated with the degree of network congestion, that is, the larger the degree of network congestion is, the larger the congestion control parameter is, and the smaller the degree of network congestion is, the smaller the congestion control parameter is.
In addition, the specific obtaining manner of the congestion control parameter is not limited in this embodiment, in some examples, the congestion control parameter may be configured in advance, the congestion control parameter configured in advance may be stored in a preset area or preset equipment, and the congestion control parameter may be obtained by accessing the preset area or the preset equipment. Alternatively, in other examples, the congestion control parameter may be automatically determined based on a congestion level of the network, and in this case, obtaining the congestion control parameter may include: the method comprises the steps of obtaining the degree of network congestion for transmitting target transmission data, wherein the degree of network congestion is generally related to the network transmission rate, the network bandwidth and the data volume of the target transmission data, so that the degree of network congestion can be determined according to the network transmission rate, the network bandwidth and the data volume of the target transmission data. After the degree of network congestion is obtained, the congestion control parameter corresponding to the degree of network congestion can be determined, so that the accuracy and reliability of obtaining the congestion control parameter are effectively ensured.
Step S1002: and adjusting the target transmission data based on the congestion control parameters to obtain the adjusted transmission data.
Because different congestion control parameters identify different congestion degrees of a network used for transmitting the target transmission data, when the target transmission data is transmitted by using the networks with different congestion degrees, in order to ensure stable reliability of transmission of the target transmission data, after the congestion control parameters are obtained, the target transmission data can be adjusted based on the congestion control parameters to obtain adjusted transmission data, and the data amount corresponding to the adjusted transmission data is smaller than the data amount corresponding to the target transmission data.
In addition, the specific implementation manner of adjusting the target transmission data based on the congestion control parameter is not limited in this embodiment, and in some examples, the adjusting the target transmission data based on the congestion control parameter, and obtaining the adjusted transmission data may include: determining the data quantity to be deleted corresponding to the target transmission data based on the congestion control parameter; and deleting the target transmission data based on the data amount needing to be deleted, so that the adjusted transmission data can be obtained. Alternatively, in other examples, adjusting the target transmission data based on the congestion control parameter, and obtaining the adjusted transmission data may include: acquiring the priority corresponding to each data in target transmission data; and deleting part of data in the target transmission data based on the priority and the congestion control parameters to obtain the adjusted transmission data.
The target transmission data includes data such as original data and FEC coding redundancy data, and the FEC coding redundancy data is used to implement data recovery operation when data packet is lost, that is, to ensure stable reliability of transmission of the original data.
As can be seen from the above, in order to implement stable and effective transmission operation on target transmission data by using networks with different congestion degrees, the priority corresponding to each data in the target transmission data may be obtained, where the priority corresponding to each data in the target transmission data may be configured in advance, for example: the priority corresponding to the original data is a first priority, the priority corresponding to the FEC coding redundant data is a second priority, the priority corresponding to the other data is a third priority, and the like, wherein the transmission priority of the first priority is higher than the second priority, and the transmission priority of the second priority is higher than the third priority. After the priority corresponding to each data in the target transmission data is obtained, part of data in the target transmission data may be deleted based on the priority and the congestion control parameter, so as to obtain the adjusted transmission data.
It should be noted that deleting the portion of the data of the target transmission data based on the priority and the congestion control parameter may include: based on SVC extended header information included in the target transmission data, hierarchical information corresponding to the target transmission data is determined based on the SVC extended header information, and then a part of data of the target transmission data is subjected to hierarchical deletion operation based on priority, congestion control parameters and the hierarchical information, so that adjusted transmission data can be obtained.
For example, it may be determined that the target transmission data includes original data and FEC data through SVC extension header information in the target transmission data, where a priority of the original data is higher than a priority of the FEC data, and the FEC data may include three layers of data, that is, layer 0 FEC data, layer 1 FEC data, and layer 2 FEC data, where priorities corresponding to the layer 0 FEC data, the layer 1 FEC data, and the layer 2 FEC data may be the same or different, and in some examples, when layering the data, the smaller the number of layers corresponding to the data, the higher the priority corresponding to the data is, that is, the priority of the layer 0 FEC data is higher than the priority of the layer 1 FEC data, and the priority of the layer 1 FEC data is higher than the priority of the layer 2 FEC data. After the congestion control parameter is obtained, in some cases, only one layer of data in the FEC data needs to be deleted based on the congestion control parameter and the priority, for example, the layer 2 FEC data may be deleted, and the layer 0 FEC data and the layer 1 FEC data are retained, so that adjusted transmission data including the original data, the layer 0 FEC data, and the layer 1 FEC data may be obtained. In some cases, two layers of data in the FEC data need to be deleted based on congestion control parameters and priority, for example: the layer 2 FEC data and the layer 1 FEC data may be deleted, and the layer 0 data may be retained, so that adjusted transmission data including the original data and the layer 0 FEC data may be obtained. In still other cases, all three layers of data in the FEC data need to be deleted based on congestion control parameters and priority, such as: layer 0 FEC data, layer 1 FEC data and layer 2 data may be deleted so that adjusted transmission data including only the original data may be obtained.
Step S1003: and sending the adjusted transmission data to a receiving end based on the operation mode.
After the adjusted transmission data is acquired, the adjusted transmission data can be sent to the receiving end based on the operation mode, so that the receiving end can stably receive the adjusted transmission data. The implementation manner and the implementation effect of sending the adjusted transmission data to the receiving end based on the operation mode in this embodiment are similar to the implementation manner and the implementation effect of step S903 in the above embodiment, and reference may be specifically made to the above contents, which is not described herein again.
In the embodiment, the congestion control parameter is acquired, the target transmission data is adjusted based on the congestion control parameter to acquire the adjusted transmission data, and the adjusted transmission data is sent to the receiving end based on the operation mode, so that the target transmission data can be flexibly and effectively transmitted based on different operation modes of the server under the condition of different network congestion degrees, and the practicability and the application range of the method are further improved.
Fig. 11 is a schematic flowchart of another data transmission method according to an embodiment of the present application; referring to fig. 11, the present embodiment provides another data transmission method, where an execution subject of the method may be a data transmission apparatus, the data transmission apparatus may be implemented as software, or a combination of software and hardware, and in some examples, the data transmission apparatus may be implemented as a receiving end, and specifically, the data transmission method may include the following steps:
step S1101: receiving target transmission data sent by a server, wherein the target transmission data comprises at least one of the following data: FEC data, original data.
The server sends the target transmission data to the receiving end, and the receiving end can receive the target transmission data, and it should be noted that, because the server has different operation modes and can adjust the target transmission data based on the congestion degree of the network, the target transmission data received by the receiving end may include at least one of the following: FEC data, original data, that is, in some examples, target transmission data received by a receiving end may only include the FEC data, where packet loss occurs in the original data in the target transmission data during transmission. In some examples, the target transmission data received by the receiving end may only include the original data, and at this time, the FEC data in the target transmission data is lost or deleted during the transmission process. In some examples, the target transmission data received by the receiving end may include original data and FEC data, and at this time, the target transmission data does not have a packet loss condition during transmission.
Step S1102: when packet loss occurs in a network, a virtual sequence number corresponding to target transmission data is obtained based on an SVC extension header included in the target transmission data, and the virtual sequence number is used for enabling sequence numbers of all received data to be continuous, wherein the SVC extension header includes a frame boundary of the original data.
During the transmission of target transmission data, packet loss may occur due to the operation state of the network, for example: when the network operation is unstable or the network equipment has a transient fault, the network can have a packet loss condition; or, when the network is congested, the server may actively drop frames to reduce the bit rate, and at this time, the network may also drop packets. No matter what reason causes the network to have packet loss, when the network has packet loss, in order to enable the sequence numbers in all the data received by the receiving end to be continuous, the virtual sequence number corresponding to the target transmission data can be obtained. Specifically, the specific implementation manner of obtaining the virtual serial number corresponding to the target transmission data is not limited in this embodiment, in some examples, the virtual serial number may be configured by a user, and at this time, obtaining the virtual serial number corresponding to the target transmission data may include: the method comprises the steps of obtaining a display interface used for carrying out interactive operation with a user, obtaining execution operation input by the user on the display interface, and determining a virtual serial number corresponding to target transmission data based on the execution operation. Alternatively, in other examples, obtaining the virtual sequence number corresponding to the target transmission data based on the SVC extension header included in the target transmission data may include: acquiring an actual serial number corresponding to target transmission data; determining a mapping relation between the virtual serial number and the actual serial number; and determining a virtual sequence number corresponding to an actual sequence number based on a mapping relation and a frame boundary including the original data in the SVC extended header.
The target transmission data may include an actual sequence number corresponding to the actual transmission data, and the actual sequence number may be stored in an RTP packet corresponding to the original data, so that after the target transmission data is obtained, a feature extraction operation may be performed on the target transmission data, and the actual sequence number corresponding to the target transmission data may be obtained. For target transmission data, a mapping relationship between a virtual sequence number and an actual sequence number is configured in advance, and one implementation manner of the mapping relationship can be seen in the following table:
virtual serial number V1 V2 V3 V4 V5 V6 V7 ...... V12 V13
Actual serial number r5 r6 r10 r11 r15 r20 r21
After the actual sequence number is obtained, the virtual sequence number corresponding to the actual sequence number can be determined based on the mapping relation and the frame boundary including the original data in the SVC extension header, thereby effectively achieving accurate reliability of determining the virtual sequence number.
It should be noted that, in the process of transmitting target transmission data, packet loss or disorder often occurs, for example: a scene with partial packet loss or a scene with all corresponding frames lost may occur, and in different scenes, different determination manners of the virtual sequence number may be provided correspondingly. Specifically, in a scenario of partial packet loss, a virtual sequence number corresponding to an actual sequence number may be determined according to a frame boundary and a mapping relationship of original data included in an SVC extension header, so as to implement a data recovery operation. For example, after the SVC extension header is acquired, data frames that need to be protected may be determined based on a frame boundary included in the SVC extension header, and when the frame boundary is start r20 and end r24, the data frames protected by the SVC extension header may further be determined to be r20 to r24, that is, r20 to r40 may constitute one data frame, and when the acquired target transmission data only includes a partial data frame and actual sequence numbers corresponding to the partial data frame are r20 and r21, the virtual sequence number corresponding to the actual sequence number r20 may be v6, the virtual sequence number corresponding to the actual sequence number r21 may be v7, and other data frames are lost. To enable data recovery operations, it can be deduced based on the SVC extension header and mapping relationship described above: the virtual sequence number corresponding to the actual sequence number r22 may be v8, the virtual sequence number corresponding to the actual sequence number r23 may be v9, and the virtual sequence number corresponding to the actual sequence number r24 may be v10, so that the virtual sequence number is determined accurately and reliably, and after the virtual sequence number is determined, data recovery operation may be performed based on the virtual sequence number.
In a scenario where the corresponding frame is totally lost, a frame boundary and a mapping relation of original data included in the SVC extension header may be utilized in an effort to determine a virtual sequence number corresponding to an actual sequence number in an effort to implement a data recovery operation. For example, the actual sequence number and the virtual sequence number corresponding to the target transmission data may be: virtual sequence numbers (V1, V2, V3, V4, V5... V12, V13), actual sequence numbers (r20, r21, r22, r23, r24.... said.), and if all corresponding frames are lost during the process of transmitting target transmission data, for example: only the data packets corresponding to the actual sequence numbers r30 to r32 are acquired, and the data packets located in the front are all lost. At this time, in order to accurately recover the data packets, the data packets corresponding to the obtained actual sequence numbers r30 to r32 may be buffered in a preset area, and then the data may be recovered as much as possible based on the data packets received later, for example: after receiving the data packets corresponding to the virtual sequence numbers V12 to V13, the actual sequence number corresponding to the V12 is r32 or r33, the actual sequence number corresponding to the V13 is r34, since the actual sequence number r32 or r33 corresponding to the V12 overlaps or is adjacent to the actual sequence number r32 buffered in the preset area, therefore, the virtual sequence numbers corresponding to r30 and r32 can be estimated or predicted based on the frame boundaries and mapping relationships included in SVC, that is, the virtual serial number corresponding to r30 may be V10 or V9, the virtual serial number corresponding to r31 may be V11 or V10, the virtual serial number corresponding to r32 may be V12 or V11, thereby effectively realizing the data recovery operation by using the frame boundary and mapping relation of the original data included in the SVC extension header to determine the virtual sequence number corresponding to the actual sequence number in an effort.
Step S1103: and framing the target transmission data based on the virtual serial number to obtain an image frame corresponding to the target transmission data.
After the virtual sequence number is acquired, framing processing may be performed on the target transmission data based on the virtual sequence number, so that an image frame corresponding to the target transmission data may be acquired. In some examples, framing the target transmission data based on the virtual sequence number, obtaining the image frame corresponding to the target transmission data may include: the virtual serial number is directly added into the target transmission data to form new target transmission data, and then the new target transmission data can be framed, namely, several continuous frames of target transmission data are framed into image frames, so that the accuracy and reliability of obtaining the image frames are effectively ensured.
In still other examples, framing the target transmission data based on the virtual sequence number, obtaining the image frame corresponding to the target transmission data may include: acquiring an original serial number included in FEC data in target transmission data; replacing the original serial number with a virtual serial number to obtain adjusted data corresponding to the target transmission data; and performing framing processing based on the adjusted data to obtain an image frame corresponding to the target transmission data.
Specifically, the target transmission data includes a preconfigured original serial number, which corresponds to the load data corresponding to the target transmission data, and if the target transmission data is lost in the transmission process, the original serial number may not correspond to the load data included in the target transmission data, so after the virtual serial number is obtained, the original serial number may be replaced by the virtual serial number, so that adjusted data corresponding to the target transmission data may be obtained, and the virtual serial number included in the adjusted data corresponds to the load data received by the receiving end, so that the serial numbers of all data received by the receiving end are continuous, and then framing processing may be performed based on the adjusted data, and an image frame corresponding to the target transmission data is obtained.
In the data transmission method provided by this embodiment, the target transmission data sent by the server is received, when a network loses packets, the virtual serial number corresponding to the target transmission data is obtained, and then the target transmission data is framed based on the virtual serial number, so that the image frame corresponding to the target transmission data can be obtained, and thus, when the network loses packets, the serial numbers of all data received by the receiving end are continuous, which does not affect framing of the target transmission data, thereby ensuring accurate reliability of obtaining the image frame corresponding to the target transmission data, further improving stability and reliability of use of the method, and facilitating popularization and application in the market.
Fig. 12 is a schematic structural diagram of a data transmission device according to an embodiment of the present application; referring to fig. 12, the present embodiment provides a data transmission apparatus for executing the data transmission method shown in fig. 2, and specifically, the data transmission apparatus may include:
a first obtaining module 11, configured to obtain original data to be transmitted;
a first determining module 12, configured to determine a scalable coded SVC extension header used for transmitting original data and an actual sequence number corresponding to the original data;
and a first processing module 13, configured to perform forward error correction FEC processing on the original data based on the SVC extension header and the actual sequence number, and generate target transmission data corresponding to the original data.
In some examples, when the first processing module 13 performs forward error correction FEC processing on the original data based on the SVC extension header and the actual sequence number to generate target transmission data corresponding to the original data, the first processing module 13 is configured to perform: generating an RTP data packet of the original data based on the original data, the SVC extended header and the actual sequence number; performing FEC encoding operation on header information and load information of an original data RTP data packet to obtain FEC encoded data; and generating target transmission data corresponding to the original data based on the FEC coding data and the SVC extension header.
In some examples, when the first processing module 13 performs forward error correction FEC processing on the original data based on the SVC extension header and the actual sequence number to generate target transmission data corresponding to the original data, the first processing module 13 is configured to perform: when the original data comprises a b frame, acquiring a difference time cts expansion head between video display time and decoding time for coding and decoding the b frame in the original data; and performing Forward Error Correction (FEC) processing on the original data based on the SVC extended header, the actual serial number and the cts extended header to generate target transmission data corresponding to the original data.
In some examples, when the first processing module 13 performs forward error correction FEC processing on original data based on the SVC extension header, the actual sequence number, and the cts extension header to generate target transmission data corresponding to the original data, the first processing module 13 is configured to perform: generating an original data RTP data packet based on original data, an SVC extended header, a cts extended header and an actual sequence number; performing FEC encoding operation on header information and load information of an original data RTP data packet to obtain FEC encoded data; and generating target transmission data corresponding to the original data based on the FEC coding data, the SVC extension header and the cts extension header.
In some examples, after generating the target transmission data corresponding to the original data, the first determining module 12 and the first processing module 13 in this embodiment are configured to perform the following steps:
a first determining module 12, configured to determine a network operating state and scene information corresponding to target transmission data;
a first processing module 13, configured to determine an operation mode corresponding to the server based on the network operation state and the scenario information, where the operation mode includes any one of: transparent transmission mode, decoding mode and encoding and decoding mode.
In some examples, when the first processing module 13 determines the operation mode corresponding to the server based on the network operation state and the scenario information, the first processing module 13 is configured to perform: determining an operation mode identifier corresponding to the server and used for transmitting the target transmission data based on the network operation state and the scene information; and determining the corresponding operation mode of the server based on the operation mode identification.
The apparatus shown in fig. 12 can perform the method of the embodiment shown in fig. 1-8, and the detailed description of this embodiment can refer to the related description of the embodiment shown in fig. 1-8. The implementation process and technical effect of the technical solution refer to the descriptions in the embodiments shown in fig. 1 to 8, and are not described herein again.
In one possible design, the structure of the data transmission apparatus shown in fig. 12 may be implemented as an electronic device, which may be a mobile phone, a tablet computer, a personal computer PC, or other various devices. As shown in fig. 13, the electronic device may include: a first processor 21 and a first memory 22. Wherein the first memory 22 is used for storing programs for corresponding electronic devices to execute the data transmission method provided in the embodiments shown in fig. 1-8, and the first processor 21 is configured to execute the programs stored in the first memory 22.
The program comprises one or more computer instructions, wherein the one or more computer instructions, when executed by the first processor 21, are capable of performing the steps of: acquiring original data to be transmitted; determining a scalable coding (SVC) extension header used for transmitting original data and an actual sequence number corresponding to the original data; and performing Forward Error Correction (FEC) processing on the original data based on the SVC extended header and the actual sequence number to generate target transmission data corresponding to the original data.
Further, the first processor 21 is also used to execute all or part of the steps in the embodiments shown in fig. 1 to 8.
The electronic device may further include a first communication interface 23 for communicating with other devices or a communication network.
In addition, an embodiment of the present invention provides a computer storage medium for storing computer software instructions for an electronic device, which includes a program for executing the data transmission method in the method embodiments shown in fig. 1 to 8.
Furthermore, the present embodiment provides a computer program product comprising: computer program, which, when executed by a processor of an electronic device, causes the processor to carry out the method of data transmission in the above-described method embodiments shown in fig. 1-8.
Fig. 14 is a schematic structural diagram of another data transmission device according to an embodiment of the present application; referring to fig. 14, the present embodiment provides another data transmission apparatus, which may perform the data transmission method shown in fig. 9, and specifically, the data transmission apparatus may include:
a second receiving module 31, configured to receive target transmission data sent by a sending end;
a second determining module 32, configured to determine an operation mode for transmitting the target transmission data, where the operation mode includes any one of: a transparent transmission mode, a decoding mode and an encoding and decoding mode;
and a second processing module 33, configured to send the target transmission data to the receiving end based on the operation mode.
In some examples, when the second processing module 33 sends the target transmission data to the receiving end based on the operation mode, the second processing module 33 is configured to perform: and when the operation mode is the transparent transmission mode, directly sending the target transmission data to the receiving end.
In some examples, when the second processing module 33 sends the target transmission data to the receiving end based on the operation mode, the second processing module 33 is configured to perform: when the operation mode is a decoding transparent transmission mode, acquiring first hop data in target transmission data; decoding the first hop data to obtain first hop original data corresponding to the first hop data; and sending the target transmission data to a receiving end based on the first-hop original data.
In some examples, when the second processing module 33 sends the target transmission data to the receiving end based on the operation mode, the second processing module 33 is configured to perform: when the operation mode is a decoding mode, acquiring first hop data in target transmission data and other hop data behind the first hop data; deleting FEC data included in other hop data to obtain adjusted data; and sending the first-hop data and the adjusted data to a receiving end.
In some examples, when the second processing module 33 sends the target transmission data to the receiving end based on the operation mode, the second processing module 33 is configured to perform: when the operation mode is a decoding mode, decoding the target transmission data to obtain original data corresponding to the target transmission data; encoding the original data to obtain encoded data; and sending the coded data to a receiving end.
In some examples, when the second processing module 33 sends the target transmission data to the receiving end based on the operation mode, the second processing module 33 is configured to perform: acquiring congestion control parameters representing the degree of network congestion for transmitting target transmission data; adjusting the target transmission data based on the congestion control parameters to obtain adjusted transmission data; and sending the adjusted transmission data to a receiving end based on the operation mode.
In some examples, when the second processing module 33 adjusts the target transmission data based on the congestion control parameter to obtain the adjusted transmission data, the second processing module 33 is configured to perform: acquiring the priority corresponding to each data in target transmission data; and deleting part of data in the target transmission data based on the priority and the congestion control parameters to obtain the adjusted transmission data.
The apparatus shown in fig. 14 can perform the method of the embodiment shown in fig. 9-10, and the detailed description of this embodiment can refer to the related description of the embodiment shown in fig. 9-10. The implementation process and technical effect of the technical solution are described in the embodiments shown in fig. 9 to 10, and are not described herein again.
In one possible design, the structure of the data transmission apparatus shown in fig. 14 may be implemented as an electronic device, which may be a mobile phone, a tablet computer, a personal computer PC, or other various devices. As shown in fig. 15, the electronic device may include: a second processor 41 and a second memory 42. The second memory 42 is used for storing a program for executing the data transmission method provided in the embodiment of fig. 9, and the second processor 41 is configured to execute the program stored in the second memory 42.
The program comprises one or more computer instructions, wherein the one or more computer instructions, when executed by the second processor 41, are capable of performing the steps of: receiving target transmission data sent by a sending end; determining an operation mode for transmitting the target transmission data, wherein the operation mode comprises any one of the following modes: a transparent transmission mode, a decoding mode and an encoding and decoding mode; and sending the target transmission data to the receiving end based on the operation mode.
Further, the second processor 41 is also used to execute all or part of the steps in the embodiments shown in fig. 9-10.
The electronic device may further include a second communication interface 43 for communicating with other devices or a communication network.
In addition, an embodiment of the present invention provides a computer storage medium for storing computer software instructions for an electronic device, which includes a program for executing the data transmission method in the method embodiments shown in fig. 9 to 10.
Furthermore, the present embodiment provides a computer program product comprising: computer program, which, when executed by a processor of an electronic device, causes the processor to carry out the method of data transmission in the above-described method embodiments shown in fig. 9-10.
Fig. 16 is a schematic structural diagram of a data transmission device according to an embodiment of the present application; referring to fig. 16, the present embodiment provides a data transmission apparatus, which may execute the data transmission method shown in fig. 11, and specifically, the data transmission apparatus may include:
a third receiving module 51, configured to receive target transmission data sent by the server, where the target transmission data includes at least one of the following: FEC data, original data;
a third obtaining module 52, configured to obtain, when a packet loss occurs in a network, a virtual sequence number corresponding to target transmission data based on an SVC extension header included in the target transmission data, where the virtual sequence number is used to make sequence numbers of all received data continuous, and the SVC extension header includes a frame boundary of the original data;
and a third processing module 53, configured to perform framing on the target transmission data based on the virtual serial number, and obtain an image frame corresponding to the target transmission data.
In some examples, when the third obtaining module 52 obtains the virtual sequence number corresponding to the target transmission data based on the SVC extension header included in the target transmission data, the third obtaining module 52 is configured to: acquiring an actual serial number corresponding to target transmission data; determining a mapping relation between the virtual serial number and the actual serial number; and determining a virtual sequence number corresponding to an actual sequence number based on a mapping relation and a frame boundary including the original data in the SVC extended header.
In some examples, when the third processing module 53 frames the target transmission data based on the virtual sequence number to obtain the image frame corresponding to the target transmission data, the third processing module 53 is configured to perform: acquiring an original serial number included in FEC data in target transmission data; replacing the original serial number with a virtual serial number to obtain adjusted data corresponding to the target transmission data; and performing framing processing based on the adjusted data to obtain an image frame corresponding to the target transmission data.
The apparatus shown in fig. 16 can execute the method of the embodiment shown in fig. 11, and reference may be made to the related description of the embodiment shown in fig. 11 for a part of this embodiment that is not described in detail. The implementation process and technical effect of the technical solution are described in the embodiment shown in fig. 11, and are not described herein again.
In one possible design, the structure of the data transmission device shown in fig. 16 may be implemented as an electronic device, which may be a mobile phone, a tablet computer, a personal computer PC, or other various devices. As shown in fig. 17, the electronic device may include: a third processor 61 and a third memory 62. The third memory 62 is used for storing a program for executing the data transmission method provided in the embodiment of fig. 11, and the third processor 61 is configured to execute the program stored in the third memory 62.
The program comprises one or more computer instructions, wherein the one or more computer instructions, when executed by the third processor 61, are capable of performing the steps of: receiving target transmission data sent by a server, wherein the target transmission data comprises at least one of the following data: FEC data, original data; when a network loses packets, acquiring virtual sequence numbers corresponding to target transmission data based on an SVC extension header included in the target transmission data, wherein the virtual sequence numbers are used for enabling sequence numbers of all received data to be continuous, and the SVC extension header includes a frame boundary of the original data; and framing the target transmission data based on the virtual serial number to obtain an image frame corresponding to the target transmission data.
Further, the third processor 61 is also used for executing all or part of the steps in the embodiment shown in fig. 11.
The electronic device may further include a third communication interface 63, which is used for the electronic device to communicate with other devices or a communication network.
In addition, an embodiment of the present invention provides a computer storage medium for storing computer software instructions for an electronic device, which includes a program for executing the data transmission method in the method embodiment shown in fig. 11.
Furthermore, the present embodiment provides a computer program product comprising: computer program, which, when executed by a processor of an electronic device, causes the processor to execute the data transmission method in the above-described method embodiment shown in fig. 11.
The above-described embodiments of the apparatus are merely illustrative, and the units described as separate parts may or may not be physically separate, and the parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment. One of ordinary skill in the art can understand and implement it without inventive effort.
Through the above description of the embodiments, those skilled in the art will clearly understand that each embodiment can be implemented by adding a necessary general hardware platform, and of course, can also be implemented by a combination of hardware and software. With this understanding in mind, the above-described technical solutions and/or portions thereof that contribute to the prior art may be embodied in the form of a computer program product, which may be embodied on one or more computer-usable storage media having computer-usable program code embodied therein (including but not limited to disk storage, CD-ROM, optical storage, etc.).
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
In a typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include forms of volatile memory in a computer readable medium, Random Access Memory (RAM) and/or non-volatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). Memory is an example of a computer-readable medium.
Computer-readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of computer storage media 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 Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information that can be accessed by a computing device. As defined herein, a computer readable medium does not include a transitory computer readable medium such as a modulated data signal and a carrier wave.
Finally, it should be noted that: the above embodiments are only used for illustrating the technical solutions of the present application, and not for limiting the same; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some or all of the technical features may be equivalently replaced; and the modifications or the substitutions do not make the essence of the corresponding technical solutions depart from the scope of the technical solutions of the embodiments of the present application.

Claims (12)

1. A method of data transmission, comprising:
acquiring original data to be transmitted;
determining a hierarchically encoded SVC extension header used for transmitting the original data and an actual sequence number corresponding to the original data;
and performing Forward Error Correction (FEC) processing on the original data based on the SVC extended header and the actual sequence number to generate target transmission data corresponding to the original data.
2. The method according to claim 1, wherein performing Forward Error Correction (FEC) processing on the original data based on the SVC extended header and an actual sequence number to generate target transmission data corresponding to the original data comprises:
generating an original data RTP data packet based on the original data, the SVC extended header and the actual sequence number;
performing FEC encoding operation on the header information and the load information of the original data RTP data packet to obtain FEC encoded data;
and generating target transmission data corresponding to the original data based on the FEC coding data and the SVC extension header.
3. The method according to claim 1, wherein performing Forward Error Correction (FEC) processing on the original data based on the SVC extended header and an actual sequence number to generate target transmission data corresponding to the original data comprises:
when the original data comprises a b frame, acquiring a difference time cts expansion head between video display time and decoding time for coding and decoding the b frame in the original data;
and performing Forward Error Correction (FEC) processing on the original data based on the SVC extended header, the actual sequence number and the cts extended header to generate target transmission data corresponding to the original data.
4. The method according to claim 3, wherein performing Forward Error Correction (FEC) processing on the original data based on the SVC extension header, the actual sequence number, and the cts extension header to generate target transmission data corresponding to the original data, comprises:
generating an original data RTP data packet based on the original data, the SVC extended header, the cts extended header and the actual sequence number;
performing FEC encoding operation on the header information and the load information of the original data RTP data packet to obtain FEC encoded data;
and generating target transmission data corresponding to the original data based on the FEC coding data, the SVC extension header and the cts extension header.
5. The method of any of claims 1-4, wherein after generating the target transmission data corresponding to the original data, the method further comprises:
determining network operation state and scene information corresponding to the target transmission data;
determining an operation mode corresponding to a server based on the network operation state and the scene information, wherein the operation mode comprises any one of the following modes: transparent transmission mode, decoding mode and encoding and decoding mode.
6. The method of claim 5, wherein determining the operation mode corresponding to the server based on the network operation status and the scenario information comprises:
determining an operation mode identifier corresponding to a server and used for transmitting target transmission data based on the network operation state and the scene information;
and determining the corresponding operation mode of the server based on the operation mode identification.
7. A method of data transmission, comprising:
receiving target transmission data sent by a sending end;
determining an operation mode for transmitting the target transmission data, wherein the operation mode comprises any one of the following modes: a transparent transmission mode, a decoding mode and an encoding and decoding mode;
and sending the target transmission data to a receiving end based on the operation mode.
8. The method of claim 7, wherein transmitting the target transmission data to a receiving end based on the operation mode comprises:
when the operation mode is a decoding transparent transmission mode, acquiring first hop data in the target transmission data;
decoding the first hop data to obtain first hop original data corresponding to the first hop data;
and sending the target transmission data to a receiving end based on the first-hop original data.
9. The method of claim 7, wherein transmitting the target transmission data to a receiving end based on the operation mode comprises:
when the operation mode is a decoding mode, acquiring first hop data in the target transmission data and other hop data behind the first hop data;
deleting FEC data included in other hop data to obtain adjusted data;
and sending the first hop data and the adjusted data to a receiving end.
10. The method of claim 7, wherein transmitting the target transmission data to a receiving end based on the operation mode comprises:
when the operation mode is a decoding mode, decoding the target transmission data to obtain original data corresponding to the target transmission data;
encoding the original data to obtain encoded data;
and sending the coded data to a receiving end.
11. The method of claim 7, wherein transmitting the target transmission data to a receiving end based on the operation mode comprises:
obtaining congestion control parameters representing the degree of network congestion for transmitting the target transmission data;
adjusting the target transmission data based on the congestion control parameter to obtain adjusted transmission data;
and sending the adjusted transmission data to a receiving end based on the operation mode.
12. A method of data transmission, comprising:
receiving target transmission data sent by a server, wherein the target transmission data comprises at least one of the following data: FEC data, original data;
when packet loss occurs in a network, acquiring a virtual sequence number corresponding to the target transmission data based on an SVC extension header included in the target transmission data, wherein the virtual sequence number is used for enabling sequence numbers of all received data to be continuous, and the SVC extension header includes a frame boundary of the original data;
framing the target transmission data based on the virtual serial number to obtain an image frame corresponding to the target transmission data.
CN202210101651.4A 2022-01-27 2022-01-27 Data transmission method, device and computer storage medium Pending CN114449291A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210101651.4A CN114449291A (en) 2022-01-27 2022-01-27 Data transmission method, device and computer storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210101651.4A CN114449291A (en) 2022-01-27 2022-01-27 Data transmission method, device and computer storage medium

Publications (1)

Publication Number Publication Date
CN114449291A true CN114449291A (en) 2022-05-06

Family

ID=81370270

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210101651.4A Pending CN114449291A (en) 2022-01-27 2022-01-27 Data transmission method, device and computer storage medium

Country Status (1)

Country Link
CN (1) CN114449291A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115022204A (en) * 2022-05-26 2022-09-06 阿里巴巴(中国)有限公司 RTC transmission delay detection method, device and equipment
WO2024032107A1 (en) * 2022-08-08 2024-02-15 Douyin Vision Co., Ltd. Method, apparatus, and medium for visual data processing

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115022204A (en) * 2022-05-26 2022-09-06 阿里巴巴(中国)有限公司 RTC transmission delay detection method, device and equipment
CN115022204B (en) * 2022-05-26 2023-12-05 阿里巴巴(中国)有限公司 RTC transmission delay detection method, device and equipment
WO2024032107A1 (en) * 2022-08-08 2024-02-15 Douyin Vision Co., Ltd. Method, apparatus, and medium for visual data processing

Similar Documents

Publication Publication Date Title
US10205979B2 (en) Method of configuring and transmitting an MMT transport packet
JP6425708B2 (en) Control method and apparatus for media distribution in multimedia transport network
EP2721814B1 (en) Method and apparatus for transmitting/receiving media contents in multimedia system
US20190082198A1 (en) Distributed multi-datacenter video packaging system
US20230060066A1 (en) Data transmission method and apparatus, computer readable medium, and electronic device
CN114449291A (en) Data transmission method, device and computer storage medium
EP2667625B1 (en) Apparatus and method for transmitting multimedia data in a broadcast system
KR102170717B1 (en) Method and apparatus of rate adaptation utilizing ber for multimedia service
CN103650431B (en) Method of transmitting video data and device
CN108877820B (en) Audio data mixing method and device
KR20150001566A (en) data structure generating apppateus and method thereof
CN110809026B (en) File processing method and device, electronic equipment and storage medium
CN109672857B (en) Information processing method and device for monitoring resources
US20170251038A1 (en) Failure detection manager
MX2014013560A (en) Apparatus and method of transmitting and receiving packet in a broadcasting and communication system.
CN111541514B (en) Message transmission method and device
CN111224889A (en) Data transmission method and device
CN111125426A (en) Data storage and query method and device
US11825136B2 (en) Video transcoding method and apparatus
US10298975B2 (en) Communication apparatus, communication data generation method, and communication data processing method
CN109167965B (en) Data processing method and device
US10893303B1 (en) Streaming chunked media segments
CN111193619B (en) Log file acquisition method and device
CN106534137B (en) Media stream transmission method and device
CN107682716B (en) Code rate control method 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