[go: up one dir, main page]

CN120017641A - A media data forwarding method, electronic device, and storage medium - Google Patents

A media data forwarding method, electronic device, and storage medium Download PDF

Info

Publication number
CN120017641A
CN120017641A CN202411951199.6A CN202411951199A CN120017641A CN 120017641 A CN120017641 A CN 120017641A CN 202411951199 A CN202411951199 A CN 202411951199A CN 120017641 A CN120017641 A CN 120017641A
Authority
CN
China
Prior art keywords
connection
client
media data
protocol
connection protocol
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
CN202411951199.6A
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.)
Hangzhou Huacheng Software Technology Co Ltd
Original Assignee
Hangzhou Huacheng Software Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hangzhou Huacheng Software Technology Co Ltd filed Critical Hangzhou Huacheng Software Technology Co Ltd
Priority to CN202411951199.6A priority Critical patent/CN120017641A/en
Publication of CN120017641A publication Critical patent/CN120017641A/en
Pending legal-status Critical Current

Links

Classifications

    • 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/1066Session management
    • H04L65/1069Session establishment or de-establishment
    • 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/60Network streaming of media packets
    • H04L65/65Network streaming protocols, e.g. real-time transport protocol [RTP] or real-time control protocol [RTCP]

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Business, Economics & Management (AREA)
  • General Business, Economics & Management (AREA)
  • Computer And Data Communications (AREA)

Abstract

The application discloses a media data forwarding method, electronic equipment and a storage medium, wherein the method comprises the steps that a forwarding platform receives a streaming request sent by a client; the method comprises the steps of detecting capability sets of at least two connecting ends to determine a transmission connection protocol of each connecting end, wherein the at least two connecting ends comprise a client end and a device end, establishing connection with each connecting end according to the transmission connection protocol of each connecting end respectively, receiving media data of one connecting end and forwarding the media data to the other connecting end. According to the scheme, the target object use experience can be improved.

Description

Media data forwarding method, electronic equipment and storage medium
Technical Field
The present application relates to the field of internet of things, and in particular, to a media data forwarding method, an electronic device, and a storage medium.
Background
At present, with the wide application of the internet of things equipment, the forwarding platform is also widely used, but in the existing technical scheme, the existing connecting end equipment with different new and old versions cannot be well compatible, so that the experience of a target object is lower.
Disclosure of Invention
The application at least provides a media data forwarding method, electronic equipment and a storage medium, which can improve the use experience of a target object.
The first aspect of the application provides a media data forwarding method, which comprises the steps of receiving a streaming request sent by a client by a forwarding platform, detecting capability sets of at least two connecting ends to determine a transmission connection protocol of each connecting end, wherein the at least two connecting ends comprise the client and equipment ends, respectively establishing connection with each connecting end according to the transmission connection protocol of each connecting end, receiving media data of one connecting end, and forwarding the media data to the other connecting end.
The method comprises the steps of detecting capability sets of at least two connecting ends to determine transmission connection protocols of the connecting ends, determining initial connection protocols of the connecting ends based on the capability sets of the connecting ends, determining position connection protocols corresponding to the position information by utilizing the position information of the connecting ends, and comparing the initial connection protocols with the position connection protocols to determine the transmission connection protocols of the connecting ends.
The method comprises the steps of comparing an initial connection protocol with a position connection protocol to determine a transmission connection protocol of a connection end, wherein the method comprises at least one step of responding to the fact that the initial connection protocol of a device end is inconsistent with the position connection protocol of the device end, taking the position connection protocol of the device end as the transmission connection protocol of the device end, and the step of responding to the fact that the initial connection protocol of a client end is inconsistent with the position connection protocol of the client end, taking the position connection protocol of the client end as the transmission connection protocol of the client end.
The method comprises the steps of generating a pulling stream address based on a transmission connection protocol of a device end, and sending the pulling stream address to the connection end so that the connection end can be connected with a forwarding platform through the pulling stream address and the transmission connection protocol.
After establishing connection with each connection end according to the transmission connection protocol of each connection end, the method further comprises the steps of sending a checking signaling to the client end every preset time, and disconnecting the connection with the equipment end in response to the fact that feedback information sent by the client end is not received within the preset time, and/or receiving abnormal condition information sent by the client end, and disconnecting the connection with the equipment end.
The method comprises the steps of establishing connection with each connection end according to a transmission connection protocol of each connection end, inquiring the number of residual download channels of the equipment end in response to receiving download request information sent by the client end, determining the number of download channels connected with the equipment end based on the download request information and the number of residual download channels, receiving media data sent by the equipment end by utilizing the number of download channels, and forwarding the received media data to the client end.
The method comprises the steps of determining the residual bandwidth information except for the response download request information of the equipment end based on the capability set of the equipment end after determining the download channel number connected with the equipment end based on the download request information and the residual download channel number, and sending the residual bandwidth information to the equipment end so that the equipment end can send media data to a forwarding platform by using all residual bandwidths.
The method comprises the steps of receiving media data, forwarding the received media data to a client, caching the received media data in a cache space in response to the network quality of the client not meeting preset requirements, sending the media data in the cache space to the client one by one, sending streaming lowering information to a device side in response to the media data cached in the cache space being greater than or equal to a first cache threshold value so as to inform the device side of lowering the sending speed of the media data, and sending streaming raising information to the device side in response to the media data cached in the cache space being less than or equal to a second cache threshold value so as to inform the device side of raising the sending speed of the media data.
A second aspect of the present application provides an electronic device, including a memory and a processor coupled to each other, where the processor is configured to execute program instructions stored in the memory, so as to implement the media data forwarding method in the first aspect.
A third aspect of the present application provides a computer readable storage medium having stored thereon program instructions which, when executed by a processor, implement the media data forwarding method of the first aspect described above.
According to the scheme, after the forwarding platform receives the streaming request sent by the client, the capability sets of at least two connecting ends are detected to determine the transmission connection protocol of each connecting end, connection is established with each connecting end according to the transmission connection protocol of each connecting end, then the forwarding platform receives media data of one connecting end and can forward the media data to the other connecting end, so that both new and old connecting ends can be connected with the forwarding platform to send and receive the media data, and compatibility of the forwarding platform and use experience of a target object are improved.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the application as claimed.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the application and together with the description, serve to explain the principles of the application.
FIG. 1 is a flow chart of an embodiment of a media data forwarding method according to the present application;
FIG. 2 is a schematic diagram of a framework of an embodiment of the Internet of things system according to the present application;
FIG. 3 is a flow chart of another embodiment of the media data forwarding method of the present application;
FIG. 4 is a schematic diagram of a media data forwarding device according to an embodiment of the present application;
FIG. 5 is a schematic diagram of a frame of an embodiment of an electronic device of the present application;
FIG. 6 is a schematic diagram of a frame of one embodiment of a computer-readable storage medium of the present application.
Detailed Description
The following describes embodiments of the present application in detail with reference to the drawings.
In the following description, for purposes of explanation and not limitation, specific details are set forth such as the particular system architecture, interfaces, techniques, etc., in order to provide a thorough understanding of the present application.
The term "and/or" is merely an association relationship describing the associated object, and means that three relationships may exist, for example, a and/or B may mean that a exists alone, while a and B exist together, and B exists alone. In addition, the character "/'" herein generally indicates that the front-rear related object is a kind of "or" relationship ". Further, "multiple" herein means two or more than two. In addition, the term "at least one" herein means any combination of any one or more of the at least two of the plurality, e.g., including at least one of A, B, C, may mean including any one or more elements selected from the group consisting of A, B and C.
Referring to fig. 1, fig. 1 is a flowchart illustrating an embodiment of a media data forwarding method according to the present application. Specifically, the method may include the steps of:
step S110, the forwarding platform receives a stream pulling request sent by the client.
The application mainly relates to the fields of Internet of things equipment, streaming media and the like, realizes the compatibility of new and old connecting end equipment through the strategy configuration of a forwarding platform, selects the most suitable transmission connection protocol through the configuration of a capability set of a connecting end, and improves the anti-jitter capability of the equipment. In addition, the platform is used for carrying out service optimization and improvement on services such as lecture, video downloading and the like, and the use experience of a target object is improved.
Referring to fig. 2 in combination, fig. 2 is a schematic diagram of a frame of an internet of things system 200 according to an embodiment of the application. The internet of things system 200 includes a forwarding platform 210 and a connection end 220. The forwarding platform 210 is configured to receive, send, and buffer data, and determine a pull address according to the capability set of the connection end 220. The connection terminal 220 includes a client 221 and a device terminal 222, the client 221 is used for sending requests and downloading media data from the forwarding platform 210, and the device terminal 222 is used for sending media data.
A connectionless service may be employed for transmission of request data before a connection has not been established between the forwarding platform 210 and the client 221. For example, IP (Internet Protocol ) may be adopted, that is, the address of the forwarding platform 210 is carried in the pull request, the client 221 sends the pull request including the address of the forwarding platform 210 to the line of the internet of things system 200, and then the internet of things system 200 selects a route for transmission, so that the pull request is sent to the forwarding platform 210. For another example, the pull request may be sent to the forwarding platform 210 using UDP (User Datagram Protocol ). The pull request includes at least information such as an address of the client 221, a version number of the client 221, a connection address of the device to be connected 222, and a checksum.
It will be appreciated that, in the case where the forwarding platform 210 does not establish a connection with the client 221, the manner in which the client 221 sends and receives the pull stream request is not specifically limited herein.
The client 221 may be a mobile phone, a computer, a tablet, etc., and the device 222 may be a camera, a mobile phone, etc. And a plurality of clients 221 and a plurality of device terminals 222 may be simultaneously connected with respect to the forwarding platform 210, and one client 221 is connected with one device terminal 222 through the forwarding platform 210.
And step S120, detecting the capability sets of at least two connection ends to determine the transmission connection protocol of each connection end, wherein the at least two connection ends comprise a client end and a device end.
Wherein, the capability set refers to a set of target service and corresponding service characteristics in the intelligent network. The capability set (CS-1) of the intelligent network includes 25 intelligent services such as a called party payment service (FS), a Calling Card Service (CCS), a Universal Number Service (UNS), a Personal Number Service (PNS), and a Virtual Private Network (VPN) service. In addition, the capability set includes a system version number, supported transport protocols, and the like.
In some embodiments, after receiving a pull request sent by a client 221, the forwarding platform 210 verifies a checksum in the pull request, if the verification is not passed, it indicates that the pull request sent by the client 221 has an abnormal condition (such as a data loss, etc.), and sends feedback information to the client 221, if the verification is passed, the pull request is further parsed to obtain an address of the client 221 and a connection address of a device to be connected 222, and the capability set of the client 221 is obtained through the address of the client 221, and the capability set of the device to be connected 222 is obtained through the connection address of the device to be connected 222, so as to determine a transmission connection protocol of the client 221 and the device 222. Specifically, refer to step S121 to step S123.
Step S121, determining an initial connection protocol of the connection terminal based on the capability set of the connection terminal.
In some embodiments, when the connection end 220 is the client end 221, the forwarding platform 210 obtains, through the address of the client end 221 in the pull stream request, the capability set of the corresponding client end 221 to parse, so as to determine the connection protocol supported by the client end 221 as the initial connection protocol. The initial connection protocol may be, but not limited to, qic (Quick UDP Internet Connections, transport layer protocol based on user datagram protocol), TCP (Transmission Control Protocol ), HTTP (Hypertext Transfer Protocol, hypertext transfer protocol), and the like.
In other embodiments, when the connection end 220 is the device end 222, the forwarding platform 210 obtains the capability set of the corresponding device end 222 through the connection address of the device end 222 to be connected in the pull stream request, and analyzes the capability set, so as to determine the connection protocol supported by the device end 222 as the initial connection protocol. The initial connection protocol may be QUIC, TCP, HTTP or the like, and is not limited herein.
The capability set of the connection end 220 may be preconfigured and stored in the internet of things system 200, so that after the address of the connection end 220 is obtained by the forwarding platform 210, the corresponding capability set of the connection end 220 may be found from the internet of things system 200 according to the address.
Step S122, determining a position connection protocol corresponding to the position information by utilizing the position information of the connection end.
In some embodiments, control of the transport connection protocol is considered for some locales such that the connection 220 at that locale can only use the transport connection protocol allowed for that locale. Therefore, before determining the transport connection protocol of the connection terminal 220, location information of the connection terminal 220 is also acquired, and the specification of the region where the connection terminal 220 is located with respect to the transport connection protocol is determined by the location information. For example, the korean and australian part of mobile phone systems do not support the UDP protocol, and if the UDP protocol is used, the transmitted data may be scrambled, cannot be transmitted and received, etc., but the TCP protocol may be adopted.
In one implementation scenario, the step S121 and the step S122 may be performed sequentially, for example, the step S121 is performed first and then the step S122 is performed, or the step S122 is performed first and then the step S121 is performed. In another implementation scenario, the above step S121 and step S122 may be performed simultaneously, and specifically may be set according to practical applications, which is not limited herein.
Step S123, the initial connection protocol and the position connection protocol are compared to determine the transmission connection protocol of the connection terminal.
In some embodiments, upon obtaining the initial connection protocol and the location connection protocol of the connection 220, the initial connection protocol and the location connection protocol are analyzed to determine the transport connection protocol of the connection 220. Specifically, if the initial connection protocol of the connection terminal 220 does not match the location connection protocol, the location connection protocol of the connection terminal 220 is used as the transmission connection protocol of the connection terminal 220, and in this case, the connection protocol specified by the region or the country is used as the transmission connection protocol. For example, the location connection protocol of the device side 222 is regarded as the transmission connection protocol of the device side 222 in response to the initial connection protocol of the device side 222 not conforming to the location connection protocol of the device side, and the location connection protocol of the client side 221 is regarded as the transmission connection protocol of the client side 221 in response to the initial connection protocol of the client side 221 not conforming to the location connection protocol of the client side 221.
In addition, in order to be compatible with the new and old versions of the connection end 220 and improve the network jitter resistance and the data transmission speed of the whole system, a transmission connection protocol with a higher priority is generally set in the internet of things system 200.
Specifically, in this embodiment, the higher priority transmission connection protocol in the internet of things system 200 is the quit protocol, the lower priority transmission connection protocol is set to the TCP protocol, the new version of the connection 220 supports the quit protocol, and the old version of the connection 220 supports the TCP protocol. Therefore, when analyzing the capability sets of the client 221 and the device 222, if the analysis result is that the client 221 supports the qic protocol and the TCP protocol, the qic protocol is preferentially selected as the transmission connection protocol of the client 221, otherwise, the TCP protocol is selected as the transmission connection protocol of the client 221, and if the analysis result is that the device 222 supports the qic protocol and the TCP protocol, the qic protocol is selected as the transmission connection protocol of the device 222, otherwise, the TCP protocol is selected as the transmission connection protocol of the device 222. Therefore, four transmission links, namely, a TCP protocol-forwarding platform 210-TCP protocol, a qic protocol-forwarding platform 210-qic protocol, a TCP protocol-forwarding platform 210-qic protocol, and a TCP protocol-forwarding platform 210-qic protocol, may be formed among the client 221, the forwarding platform 210, and the device 222, so that smooth compatibility of the devices of the new and old connection ends 220 can be achieved, and meanwhile, the data transmission speed and the network jitter resistance under the weak network environment can be improved.
To improve the range of use of the connection 220, it is generally set to support multiple transmission connection protocols in factory settings, but with the advancement of technology, the transmission connection protocols supported by the old version of the connection 220 may be less than the transmission connection protocols supported by the new version of the connection 220.
And S130, establishing connection with each connecting end according to the transmission connection protocol of each connecting end.
In some embodiments, a policy distribution service (Route server) is disposed in the forwarding platform 210, and the policy distribution service distributes a pull address to the client 221, so that the client 221 connects with the forwarding platform 210 through the pull address. In addition, the policy distribution service may send the pull request and the pull address to the device side 222, so that the device side 222 is connected to the forwarding platform 210 through the pull address.
In other embodiments, the pull address may be generated based on the transport connection protocol of the device side 222, and then sent to the connection side 220, so that the connection side 220 establishes a connection with the forwarding platform 210 through the pull address and the transport connection protocol. Specifically, the forwarding platform 210 is provided with a plurality of execution machines, each execution machine is used for receiving, sending and buffering media data, the pull stream address represents an address of an execution machine, after determining the corresponding execution machine through a transmission connection protocol of the device end 222, the address of the execution machine is sent to the device end 222 and the client 221, so that the device end 222 and the client 221 are connected with the execution machine, and the device end 222 is indirectly connected with the client 221.
In the case that the forwarding platform 210 is connected to both the client 221 and the device 222, if the subsequent client 221 is abnormally closed (for example, suddenly disconnected from the network, abnormally powered off, exiting the client background), the link of the device 222 is occupied, and the intercom cannot be performed in a short time (the device 222 can only be connected to one client 221 through the forwarding platform 210 at the same time), which will result in resource waste. Therefore, a keep-alive check mechanism may be set in the forwarding platform 210 to detect the state of the client 221, discover the abnormal state of the client 221 in time, disconnect the device end 222 in time, and initiate the second intercom quickly. Specifically, the check signaling is sent to the client 221 every preset time, and in response to not receiving the feedback information sent by the client 221 within the preset time, the connection with the device 222 is disconnected, so that the device 222 can perform the next connection establishment.
In addition, if abnormal condition information transmitted from the client 221 is received, the connection with the device 222 may be disconnected.
Step S140, receiving the media data of one connecting end and forwarding the media data to the other connecting end.
The media data may be video data, audio data, etc., and is not particularly limited herein.
In some embodiments, after the connection 220 establishes a connection with the forwarding platform 210, the forwarding platform 210 may receive media data of one connection 220 and forward the media data to another connection 220. Specifically, the forwarding platform 210 may receive media data sent by the device side 222, and then the client 221 may download the media data from the forwarding platform 210.
Further, to enhance the use experience of the target object, the sending of the media data of the device side 222 may be accelerated when the client 221 downloads the media data. Specifically, refer to step S141 to step S143.
Step S141, in response to receiving the download request information sent by the client, inquiring the number of the residual download channels of the equipment.
The download request information and the pull request may be the same data information, i.e. the download request information is a pull request, or the download request information and the pull request are not the same data information.
After the client 221 establishes a connection with the device 222 indirectly through the forwarding platform 210, the download request information sent by the client 221 is parsed to determine the data size of the downloaded media data required by the client 221, and the remaining download channel number of the device 222 is queried to determine the sending rate of the media data of the device 222.
Step S142, based on the download request information and the remaining number of download channels, determining the number of download channels connected to the device side.
In some embodiments, after determining the data amount of the downloaded media data required by the client 221 and the remaining download channel number of the device side 222, the download channel number corresponding to the present download request information may be determined.
For example, the client 221 needs to download the multi-segment video card, and in order to improve the downloading efficiency, a plurality of long links are required to be established between the device end 222 and the forwarding platform 210, so after the number of remaining download channels of the device end 222 is 10, 5 remaining download channels are allocated as the number of download channels connected to the device end 222, if the number of 10 remaining download channels is taken as the number of download channels connected to the device end 222, the upper limit of the link of the device end 222 is filled, so that the device end 222 cannot perform operations such as streaming. Therefore, the number of remaining loading channels at the device end 222 needs to be reasonably allocated. In addition, regarding the number of download channels, if the client 221 completes the download or cancels the download, the client 221 will send information to the forwarding platform 210, and break the long links established with the device 222, so as to protect the device 222 and avoid the exhaustion of the upper link of the device 222.
Further, to increase the sending rate of the media data of the device side 222, the remaining bandwidth information of the device side 222 except the response download request information may be determined based on the capability set of the device side 222. The residual bandwidth information is then sent to the device side 222 so that the device side 222 sends the media data to the forwarding platform 210 using all the residual bandwidth. So that the device end 222 performs full-network-speed streaming without affecting normal service, and sends the media data to the forwarding platform 210, if there is a talkback and pull real-time stream, the bandwidth of the talkback and real-time stream is preferentially satisfied, and the redundant bandwidth performs full-speed sending of the media data.
In some embodiments, device side 222 may maintain a long connection link with forwarding platform 210 through httproxy after establishing a connection with forwarding platform 210, such that device side 222 remains long on-line.
Step S143, receiving the media data sent by the equipment end by using the download channel number, and forwarding the received media data to the client end.
In some embodiments, after determining the number of download channels, the media data sent by the device side 222 may be received through the number of download channels, and the received media data may be forwarded to the client 221. In addition, in response to the network quality of the client 221 not meeting the preset requirement, the received media data are buffered in the buffer space, and then the media data in the buffer space are sent to the client 221 one by one. The preset requirement is that the network speed of the client 221 is lower than 1MB/s.
It will be appreciated that the preset requirements may be set according to actual situations, and are not specifically limited herein.
Further, in order to avoid that the media data sent by the device side 222 occupies too much buffer space of the forwarding platform 210, the sending rate of the device side 222 may be adaptively adjusted. Specifically, in response to the media data buffered in the buffer space being greater than or equal to the first buffer threshold (e.g., 80% of the storage capacity of the buffer space), the reduced streaming information is sent to the device side 222 to inform the device side 222 to reduce the sending speed of the media data.
Meanwhile, in order to avoid the downloading window period caused by the downloading rate of the client 221 being greater, the media data in the buffer space is completely downloaded, so that the media data buffered in the buffer space may be less than or equal to the second buffer threshold (e.g. 20% of the storage capacity of the buffer space), and the streaming raising information may be sent to the device side, so as to notify the device side to raise the sending speed of the media data. In this way, the forwarding platform 210 can realize self-protection of the platform through judgment of the buffer space.
Referring to fig. 3, fig. 3 is a flowchart illustrating a media data forwarding method according to another embodiment of the present application. Specifically, the method may include the steps of:
step S310, the forwarding platform receives a stream pulling request sent by the client.
This step is the same as step S110 described above, and therefore will not be described in detail here.
Step S320, verifying the pull stream request to obtain a verification result.
In some embodiments, the header field in the pull request is initially verified to determine whether the pull request has abnormal phenomena such as data tampering and data loss, if the initial verification result indicates that the pull request has an abnormal condition, the whole process is ended, if the initial verification result indicates that the pull request has no abnormal condition, the client 221 sending the pull request is further verified to be an authorized client, if not, the whole process is ended, and if so, the subsequent steps are executed. The verification method for the client 221 is to obtain a device model of the client 221, compare the obtained device model with an authorized device model stored in the internet of things system 200, and if the comparison result is that the device model of the client 221 is consistent with the authorized device model stored in the internet of things system 200, pass the verification.
And step S330, detecting the capability sets of at least two connecting ends to determine the transmission connection protocol of each connecting end in response to the passing of the verification result.
This step is the same as step S120, and will not be described here again.
Step S340, establishing connection with each connection end according to the transmission connection protocol of each connection end.
This step is the same as the step S130, and will not be described here again.
Step 350, receiving the media data of one connection end and forwarding the media data to another connection end.
This step is the same as the step S140, and will not be described here again.
The forwarding platform in the application performs self-adaptive conversion of the transmission connection protocol between the client and the equipment according to the capability set of the equipment and the capability set of the client. If the client is the old version client and the old device, the TCP protocol is carried out, and if the client is the QUIC device and the new version client, the QUIC protocol is carried out to carry out streaming. In addition, the location connection protocol can be determined according to the IP information of the device side and the client side, so as to conform to the local transmission connection protocol specification.
And secondly, optimizing services such as pull-stream intercom, and the like, and timely processing abnormal intercom conditions by detecting the state of an intercom client, avoiding the condition that intercom connection of a device end (a camera) is occupied, and the like, and timely disconnecting the link of the device end, so that establishment of an intercom link can be initiated again quickly.
The application utilizes the residual bandwidth of the equipment end 222 to carry out the card video full network speed streaming under the condition of not affecting the normal service, thereby greatly improving the card video downloading speed of the equipment and realizing the self-protection of the forwarding platform.
It will be appreciated by those skilled in the art that in the above-described method of the specific embodiments, the written order of steps is not meant to imply a strict order of execution but rather should be construed according to the function and possibly inherent logic of the steps.
Referring to fig. 4, fig. 4 is a schematic diagram illustrating a frame of a media data forwarding device 400 according to an embodiment of the present application. The media data forwarding device 400 comprises a receiving module 410, a detecting module 420, a connecting module 430 and a forwarding module 440. The receiving module 410 executes the forwarding platform to receive the pull stream request sent by the client. The detection module 420 performs detection on the capability set of at least two connection ends to determine a transmission connection protocol of each connection end, where the at least two connection ends include a client end and a device end. The connection module 430 performs a transport connection protocol according to each connection terminal, respectively, to establish a connection with each connection terminal. The forwarding module 440 performs forwarding of media data received from one connection to another connection.
In some embodiments, the detection module 420 performs detection on the capability sets of at least two connection ends to determine a transmission connection protocol of each connection end, including determining an initial connection protocol of the connection end based on the capability set of the connection end, determining a location connection protocol corresponding to the location information using the location information of the connection end, and comparing the initial connection protocol and the location connection protocol to determine the transmission connection protocol with the connection end.
In some embodiments, the detection module 420 performs a comparison of the initial connection protocol and the location connection protocol to determine a transport connection protocol with the connection end, including at least one of taking the location connection protocol of the device end as the transport connection protocol of the device end in response to the initial connection protocol of the device end not conforming to the location connection protocol of the device end, and taking the location connection protocol of the client end as the transport connection protocol of the client end in response to the initial connection protocol of the client end not conforming to the location connection protocol of the client end.
In some embodiments, the connection module 430 performs a transport connection protocol according to each connection end to establish a connection with each connection end, including generating a pull stream address based on the transport connection protocol of the device end, and sending the pull stream address to the connection end such that the connection end establishes a connection with the forwarding platform through the pull stream address and the transport connection protocol.
In some embodiments, the connection module 430 performs connection establishment with the connection terminals according to the transmission connection protocol of each connection terminal, and further includes sending a check signal to the client terminal at each preset interval, disconnecting the connection with the device terminal in response to not receiving feedback information sent by the client terminal within the preset time, and/or receiving abnormal condition information sent by the client terminal, disconnecting the connection with the device terminal.
In some embodiments, the connection module 430 performs connection establishment with each connection terminal according to a transmission connection protocol of each connection terminal, and further includes, in response to receiving download request information sent by the client terminal, querying a remaining number of download channels of the device terminal, determining the number of download channels connected to the device terminal based on the download request information and the remaining number of download channels, receiving media data sent by the device terminal using the number of download channels, and forwarding the received media data to the client terminal.
In some embodiments, the connection module 430 performs determining the number of download channels connected to the device side based on the download request information and the number of remaining download channels, and further includes determining remaining bandwidth information of the device side except for the response download request information based on the capability set of the device side, and transmitting the remaining bandwidth information to the device side such that the device side transmits media data to the forwarding platform using all the remaining bandwidth.
In some embodiments, the connection module 430 performs forwarding of the received media data to the client, including buffering the received media data in a buffer space in response to network quality of the client not meeting a preset requirement, sending the media data in the buffer space to the client one by one, and at least one step of sending reduced streaming information to the device side in response to the media data buffered in the buffer space being greater than or equal to a first buffer threshold, notifying the device side to reduce a sending speed of the media data, and sending increased streaming information to the device side in response to the media data buffered in the buffer space being less than or equal to a second buffer threshold, notifying the device side to increase the sending speed of the media data.
Referring to fig. 5, fig. 5 is a schematic diagram of a frame of an electronic device 50 according to an embodiment of the application. The electronic device 50 comprises a memory 51 and a processor 52 coupled to each other, the processor 52 being adapted to execute program instructions stored in the memory 51 for implementing the steps of any of the media data forwarding method embodiments described above. In one specific implementation scenario, electronic device 50 may include, but is not limited to, a microcomputer, a server, and further, electronic device 50 may also include a mobile device such as a notebook computer, a tablet computer, etc., without limitation.
In particular, the processor 52 is adapted to control itself and the memory 51 to implement the steps of any of the media data forwarding method embodiments described above. The processor 52 may also be referred to as a CPU (Central Processing Unit ). The processor 52 may be an integrated circuit chip having signal processing capabilities. The Processor 52 may also be a general purpose Processor, a digital signal Processor (DIGITAL SIGNAL Processor, DSP), an Application SPECIFIC INTEGRATED Circuit (ASIC), a Field-Programmable gate array (Field-Programmable GATE ARRAY, FPGA) or other Programmable logic device, a discrete gate or transistor logic device, a discrete hardware component. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. In addition, the processor 52 may be commonly implemented by an integrated circuit chip.
Referring to FIG. 6, FIG. 6 is a schematic diagram illustrating an exemplary embodiment of a computer readable storage medium 60 according to the present application. The computer readable storage medium 60 stores program instructions 601 executable by a processor, the program instructions 601 being for implementing the steps of any of the media data forwarding method embodiments described above.
In some embodiments, functions or modules included in an apparatus provided by the embodiments of the present disclosure may be used to perform a method described in the foregoing method embodiments, and specific implementations thereof may refer to descriptions of the foregoing method embodiments, which are not repeated herein for brevity.
The foregoing description of various embodiments is intended to highlight differences between the various embodiments, which may be the same or similar to each other by reference, and is not repeated herein for the sake of brevity.
In the several embodiments provided in the present application, it should be understood that the disclosed method and apparatus may be implemented in other manners. For example, the apparatus embodiments described above are merely illustrative, e.g., the division of modules or units is merely a logical functional division, and there may be additional divisions of actual implementation, e.g., units or components may be combined or integrated into another system, or some features may be omitted, or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be an indirect coupling or communication connection via some interfaces, devices or units, which may be in electrical, mechanical, or other forms.
In addition, each functional unit in the embodiments of the present application may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit. The integrated units may be implemented in hardware or in software functional units.
The integrated units, if implemented in the form of software functional units and sold or used as stand-alone products, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present application may be embodied in essence or a part contributing to the prior art or all or part of the technical solution in the form of a software product stored in a storage medium, including several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) or a processor (processor) to execute all or part of the steps of the methods of the embodiments of the present application. The storage medium includes a U disk, a removable hard disk, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), a magnetic disk, an optical disk, or other various media capable of storing program codes.

Claims (10)

1. A method for forwarding media data, comprising:
the forwarding platform receives a stream pulling request sent by a client;
detecting capability sets of at least two connection ends to determine a transmission connection protocol of each connection end, wherein the at least two connection ends comprise a client end and an equipment end;
establishing connection with each connecting end according to a transmission connection protocol of each connecting end;
And receiving the media data of one connecting end and forwarding the media data to the other connecting end.
2. The method of claim 1, wherein the detecting the capability sets of the at least two connection terminals to determine the transmission connection protocol of each connection terminal comprises:
determining an initial connection protocol of the connection terminal based on the capability set of the connection terminal;
determining a position connection protocol corresponding to the position information by utilizing the position information of the connecting end;
and comparing the initial connection protocol with the position connection protocol to determine a transmission connection protocol with the connection terminal.
3. The method according to claim 2, wherein said comparing said initial connection protocol with said location connection protocol to determine a transport connection protocol with said connection end comprises at least one of the steps of:
Responding to the fact that the initial connection protocol of the equipment end is inconsistent with the position connection protocol of the equipment end, and taking the position connection protocol of the equipment end as the transmission connection protocol of the equipment end;
and responding to the fact that the initial connection protocol of the client is inconsistent with the position connection protocol of the client, and taking the position connection protocol of the client as the transmission connection protocol of the client.
4. The method according to claim 1, wherein said establishing a connection with each of said connection terminals according to a transport connection protocol of each of said connection terminals, respectively, comprises:
generating a pull stream address based on a transmission connection protocol of the equipment end;
And sending the pull stream address to the connecting end so that the connecting end establishes connection with the forwarding platform through the pull stream address and the transmission connection protocol.
5. The method of claim 1, further comprising, after said establishing a connection with each of said connection terminals according to a transport connection protocol of each of said connection terminals, respectively:
Transmitting a checking signaling to the client at each preset time interval, and disconnecting the device end in response to the fact that feedback information transmitted by the client is not received within the preset time;
And/or, receiving abnormal condition information sent by the client, and disconnecting the connection with the equipment terminal.
6. The method of claim 1, further comprising, after said establishing a connection with each of said connection terminals according to a transport connection protocol of each of said connection terminals, respectively:
Responding to receiving the download request information sent by the client, and inquiring the number of the residual download channels of the equipment;
determining the number of download channels connected with the equipment end based on the download request information and the number of remaining download channels;
And receiving the media data sent by the equipment end by utilizing the downloading channel number, and forwarding the received media data to the client end.
7. The method of claim 6, further comprising, after said determining the number of download channels connected to said device side based on said download request information and said remaining number of download channels:
Determining the residual bandwidth information of the equipment end except for responding to the downloading request information based on the capability set of the equipment end;
And sending the residual bandwidth information to the equipment end so that the equipment end uses all residual bandwidths to send media data to the forwarding platform.
8. The method of claim 6, wherein forwarding the received media data to the client comprises:
responding to the network quality of the client not meeting the preset requirement, and caching the received media data into a cache space;
Transmitting the media data in the cache space to the client side one by one;
The method further comprises at least one of the following steps:
transmitting streaming reduction information to the equipment end in response to the media data buffered in the buffer space being greater than or equal to a first buffer threshold, so as to inform the equipment end of reducing the transmission speed of the media data;
And sending the streaming increasing information to the equipment end in response to the media data cached in the cache space being smaller than or equal to a second cache threshold value so as to inform the equipment end of increasing the sending speed of the media data.
9. An electronic device comprising a memory and a processor coupled to each other, the processor configured to execute program instructions stored in the memory to implement the media data forwarding method of any of claims 1 to 8.
10. A computer readable storage medium having stored thereon program instructions, which when executed by a processor, implement the media data forwarding of any of claims 1 to 8.
CN202411951199.6A 2024-12-26 2024-12-26 A media data forwarding method, electronic device, and storage medium Pending CN120017641A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202411951199.6A CN120017641A (en) 2024-12-26 2024-12-26 A media data forwarding method, electronic device, and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202411951199.6A CN120017641A (en) 2024-12-26 2024-12-26 A media data forwarding method, electronic device, and storage medium

Publications (1)

Publication Number Publication Date
CN120017641A true CN120017641A (en) 2025-05-16

Family

ID=95659756

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202411951199.6A Pending CN120017641A (en) 2024-12-26 2024-12-26 A media data forwarding method, electronic device, and storage medium

Country Status (1)

Country Link
CN (1) CN120017641A (en)

Similar Documents

Publication Publication Date Title
US8688817B2 (en) Network connection hand-off using state transformations
US8446840B2 (en) TCP proxy insertion and uninstall method, and service gateway device
CA2611776C (en) Method and communication unit for communicating between communication apparatuses
US9883000B2 (en) Server-push service in heterogeneous network environment
CN104506802B (en) The method of video monitoring system, passing through NAT monitor video data
JP6663082B2 (en) Data Streaming Support Control Based on Node Type
CN106612284B (en) Streaming data transmission method and device
US10367893B1 (en) Method and apparatus of performing peer-to-peer communication establishment
CN102014416A (en) Method and system for bidirectional detection of connection
WO2024060408A1 (en) Network attack detection method and apparatus, device and storage medium
US20100235464A1 (en) Handoff and optimization of a network protocol stack
US20150127837A1 (en) Relay apparatus and data transfer method
WO2013000413A1 (en) File transfer method and device
US10868839B2 (en) Method and system for upload optimization
CN104518968B (en) The method and Transparent proxy server of a kind of Message processing
WO2015106453A1 (en) Service processing method and network device
US20130065588A1 (en) Transmitting data over multiple networks
US10389835B2 (en) Application aware systems and methods to process user loadable network applications
CN114071544A (en) Network testing method and device and electronic equipment
US10129320B2 (en) QoS improvement method, apparatus, and system
CN112383801A (en) Media stream distribution method, device, distribution server and storage medium
CN120017641A (en) A media data forwarding method, electronic device, and storage medium
US20070091872A1 (en) Peer-to-peer connection establishment
CN113872949B (en) Address resolution protocol response method and related device
CN112738829B (en) Response message processing method and device, storage medium and electronic 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