Method and device for forwarding audio and video data

By maintaining the network address forwarding rule tables on the set-top box side and the gateway side, and querying and updating during the aging time, the problem of gateway devices being unable to learn private protocol rules and misjudging aging time is solved, and stable forwarding of audio and video data is achieved.

CN119172611APending Publication Date: 2024-12-20FIBERHOME TELECOMMUNICATION TECHNOLOGIES CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411315990.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-20
Publication Date
2024-12-20

AI Technical Summary

Technical Problem

Existing gateway devices cannot learn network address forwarding rules without standard protocol fields, and there is a misjudgment in determining the aging time of the network address forwarding rules on the gateway side, resulting in data being unable to forward normally.

Method used

The set-top box side and the gateway side maintain the network address forwarding rule table respectively. The set-top box side updates the rule table and notifies the gateway side. The gateway side queries the set-top box side to update the aging time or delete the rule entry when the rule entry is aging.

Benefits of technology

It solves the problem that the gateway side cannot learn network address forwarding rules under the private protocol, avoids misjudgment of aging time judgment, and ensures the continuity and user experience of data forwarding.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119172611A_ABST
    Figure CN119172611A_ABST
Patent Text Reader

Abstract

The invention discloses a method and device for realizing audio and video data forwarding, and relates to the field of audio and video data forwarding, and the method comprises the following steps: a set top box side and a gateway side respectively maintain a network address forwarding rule table; when the set top box side obtains media playing information or playing ending information, the network address forwarding rule table is updated, and the network address forwarding rule table of the gateway side is notified to be correspondingly updated; when the rule entry in the network address forwarding rule table at the gateway side reaches the aging time, querying whether the rule entry in the network address forwarding rule table at the set top box side exists, and if so, updating the aging time of the rule entry at the gateway side; and if not, deleting the rule entry in the network address forwarding rule table at the gateway side. The technical problems in the prior art that a gateway side without a standard protocol field cannot learn a network address forwarding rule and misjudgment exists when the gateway side judges the aging time can be solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of audio and video data forwarding, and specifically to a method and device for implementing audio and video data forwarding. Background Art

[0002] With the popularization of terminal devices and the development of the network, the business forms of streaming media are becoming more and more diverse. In addition to IPTV / OTT services with dedicated network equipment, there are also IPTV / OTT services in full routing mode. Media protocols have also been developed and updated according to business needs. Operators have formulated media playback protocols on the set-top box side and the converged terminal field for business scenarios such as fast switching.

[0003] With the current development of converged gateway equipment, the set-top box side and the gateway have formed an integrated whole. While the services on the set-top box side and the gateway are interconnected, it provides convenience for business updates and adaptive development. On the converged terminal side, messages can be effectively exchanged to provide strong support and guarantee for the business.

[0004] However, existing gateway devices generally parse the standard protocol field from the protocol to obtain the corresponding network address forwarding (NAT) rules, and perform media data forwarding to support media data playback in full routing mode. The gateway side needs to rely on the standard protocol field to learn the network address forwarding rules, and some media protocols do not carry the network address forwarding traversal field, such as the FCC (Fast Channel Change) protocol defined by domestic operators, and the gateway side cannot learn the network address forwarding rules.

[0005] In addition, the network address forwarding rules learned by the gateway side have an aging time. The gateway side can only update the aging time through data transmission. When there is no data transmission, there will be certain misjudgments in the aging time judgment of the gateway side. For example, when the RTSP (Real Time Streaming Protocol) protocol pause time exceeds the aging time of the forwarding rule, the gateway senses that there is no data transmission, which will trigger the deletion of the corresponding forwarding rule in the network address forwarding rule table. However, the entire playback link still exists, which will cause the subsequent player to be unable to forward data when it needs to continue playing. Summary of the invention

[0006] The present application provides a method and device for realizing audio and video data forwarding, which can solve the technical problems existing in the prior art: the gateway side cannot learn the network address forwarding rules for the absence of standard protocol fields, and the gateway side has misjudgment when judging the aging time.

[0007] In a first aspect, an embodiment of the present application provides a method for implementing audio and video data forwarding, the method comprising:

[0008] The set-top box side and the gateway side each maintain a network address forwarding rule table;

[0009] When the set-top box side obtains media playback information or playback end information, it updates its network address forwarding rule table and notifies the gateway side of the corresponding update of the network address forwarding rule table;

[0010] When the aging time of a rule entry in the network address forwarding rule table on the gateway side reaches the aging time, the network address forwarding rule table on the set-top box side is checked to see whether the rule entry exists. If so, the gateway side updates the aging time of the rule entry; if not, the network address forwarding rule table on the gateway side deletes the rule entry.

[0011] In combination with the first aspect, in one implementation, when the set-top box side obtains the media playback information, it updates its network address forwarding rule table and notifies the gateway side of the corresponding update of the network address forwarding rule table, including:

[0012] When the set-top box receives a playback request, it establishes a link with the streaming media server according to the protocol type of the playback request, obtains the media playback information based on the link establishment information, generates a network address forwarding rule entry based on the playback information, and adds the rule entry to its network address forwarding rule table, and simultaneously initiates a rule entry joining request to the gateway side.

[0013] In combination with the first aspect, in one implementation, the set-top box side notifies the gateway side of a corresponding update of the network address forwarding rule table, further comprising:

[0014] After receiving the rule entry adding request, the gateway side adds the rule entry to the network address forwarding rule table of the gateway side, and configures the data forwarding rule of the gateway side according to the rule entry.

[0015] In combination with the first aspect, in one implementation, when the set-top box side obtains the playback end information, it updates its network address forwarding rule table and notifies the gateway side of the corresponding update of the network address forwarding rule table, including:

[0016] The set-top box side deletes the rule entry corresponding to the playback end information in the network address forwarding rule table of the set-top box side according to the playback end information, and simultaneously initiates a rule entry leaving request to the gateway side.

[0017] In combination with the first aspect, in one implementation, the set-top box side notifies the gateway side of a corresponding update of the network address forwarding rule table, further comprising:

[0018] After receiving the rule entry leaving request, the gateway deletes the corresponding rule entry from the network address forwarding rule table on the gateway side, and deletes the data forwarding of the corresponding rule entry.

[0019] In combination with the first aspect, in one implementation, when a rule entry in the network address forwarding rule table on the gateway side reaches an aging time, querying whether the rule entry in the network address forwarding rule table on the set-top box side exists includes:

[0020] The gateway side initiates a query request to the set-top box side. After receiving the query request, the set-top box side queries the current network address forwarding rule table of the set-top box side to see whether there is a rule entry corresponding to the query request, and replies to the query result to the gateway side through a response request.

[0021] In combination with the first aspect, in one implementation, after the set-top box side is restarted, the network address forwarding rule table on the set-top box side is initialized, and currently there is no playback service on the set-top box side.

[0022] In a second aspect, an embodiment of the present application provides a device for implementing the method for forwarding audio and video data based on any of the above implementations, the device comprising:

[0023] The playback information management module is arranged on the set-top box side and is used to maintain the network address forwarding rule table on the set-top box side; when the set-top box side obtains media playback information or playback end information, the network address forwarding rule table on the set-top box side is updated and the gateway side is notified; and when a rule entry in the network address forwarding rule table on the gateway side reaches the aging time, the network address forwarding rule table on the set-top box side is queried to determine whether the rule entry exists and the gateway side is replied;

[0024] A network address forwarding maintenance module is provided on the gateway side and is used to maintain the network address forwarding rule table on the gateway side; it is also used to update the network address forwarding rule table on the gateway side accordingly after being notified by the set-top box side; it is also used to update the aging time of the rule entry or delete the rule entry from the network address forwarding rule table on the gateway side according to the reply from the set-top box side;

[0025] There are two dual-system communication modules, which are respectively arranged on the set-top box side and the gateway side, and are used for communication between the set-top box side and the gateway side.

[0026] In combination with the second aspect, in one embodiment, the device also includes a media player, which is arranged on the set-top box side, and is used to receive media playback information, establish a link with the streaming media server according to the protocol type of the playback request, and then obtain the media playback information according to the link establishment information, and report the media playback information to the playback information management module; it is also used to receive playback end information and report it to the playback information management module.

[0027] In conjunction with the second aspect, in one embodiment, the device further includes a hardware network address forwarding module, which is disposed on the gateway side and is used to configure a data forwarding rule on the gateway side according to the rule entry after the network address forwarding maintenance module updates the aging time of the rule entry;

[0028] It is also used to delete the data forwarding of the corresponding rule entry after deleting the rule entry from the network address forwarding rule table on the gateway side in the network address forwarding maintenance module.

[0029] The beneficial effects brought by the technical solution provided in the embodiments of the present application include:

[0030] A network address forwarding rule table (hereinafter referred to as NAT rule table) is maintained on the set-top box side and the gateway side respectively. When the NAT rule learning is limited on the network side, the set-top box side updates its NAT rule table according to the playback service, and actively notifies the gateway side to update the NAT rule table on the gateway side accordingly, so that the converged gateway can realize the integration of the gateway side and the set-top box side at the playback service level, which can solve the problem of data forwarding failure due to the inability to learn NAT rules under the FCC private protocol, thereby improving the user experience.

[0031] When the rule entry in the NAT rule table on the gateway side reaches the aging time, the NAT rule table on the set-top box side is queried to see whether the rule entry exists. If it exists, the gateway side updates the aging time of the rule entry; if it does not exist, the NAT rule table on the gateway side deletes the rule entry. This can solve the problem of uncontrollable gateway NAT aging time, realize aging query and response update through communication between the gateway side and the set-top box side, meet the data forwarding requirements in the playback scenario, avoid technical problems of misjudgment when the gateway side judges the aging time, and avoid the problem of inability to forward due to aging anomalies, thereby improving the user experience. BRIEF DESCRIPTION OF THE DRAWINGS

[0032] Figure 1 This is a flow chart of data forwarding when the set-top box side obtains media playback information in this application;

[0033] Figure 2 This is a flow chart of data forwarding when the set-top box side obtains the playback end information in this application;

[0034] Figure 3 A schematic diagram of the process of data forwarding when the rule entry in the second NAT rule table on the gateway side in this application reaches the aging time;

[0035] Figure 4 A schematic diagram of an embodiment of a device for implementing audio and video data forwarding by a fusion gateway of the present application;

[0036] Figure 5This is a timing diagram of the NAT notification and update mechanism in the normal playback life cycle of this application;

[0037] Figure 6 This is a timing diagram of the NAT notification and update mechanism in the abnormal playback life cycle of this application.

[0038] In the figure:

[0039] 11. First dual system communication module; 12. Play information management module; 13. Media player;

[0040] 21. The second dual system communication module; 22. The NAT maintenance module; 23. The HW_NAT module. DETAILED DESCRIPTION

[0041] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0042] In order to make the objectives, technical solutions and advantages of the present application clearer, the implementation methods of the present application will be further described in detail below with reference to the accompanying drawings.

[0043] In a first aspect, an embodiment of the present application provides a method for forwarding audio and video data, the method comprising:

[0044] The set-top box side and the gateway side respectively maintain a network address forwarding (NAT) rule table.

[0045] When the set-top box side obtains media playback information or playback end information, it updates its NAT rule table and notifies the NAT rule table on the gateway side to be updated accordingly.

[0046] When the rule entry in the NAT rule table on the gateway side reaches the aging time, the NAT rule table on the set-top box side is queried to see whether the rule entry exists. If so, the gateway side updates the aging time of the rule entry; if not, the NAT rule table on the gateway side deletes the rule entry.

[0047] In this embodiment, by maintaining a NAT rule table on the set-top box side, the gateway side can be actively notified to update the NAT rule table on the gateway side, so that the fusion gateway can realize the integration of the gateway side and the set-top box side at the broadcast service level, and can solve the problem that the data cannot be forwarded due to the inability to learn NAT rules under the FCC private protocol. In addition, when the rule entry in the NAT rule table on the gateway side reaches the aging time, by querying whether the rule entry exists in the NAT rule table on the set-top box side, the aging time is updated or the rule entry is deleted, which can avoid the technical problem of misjudgment when the gateway side judges the aging time, and avoid the inability to forward due to aging abnormalities, thereby improving the user experience.

[0048] In this embodiment, the NAT rule table maintained by the set-top box side is the first NAT rule table, and the NAT rule table maintained by the gateway side is the second NAT rule table. When the set-top box side obtains media playback information or playback end information, it will update the first NAT rule table and notify the gateway side to update the second NAT rule table accordingly.

[0049] Specifically, Figure 1 As shown, when the set-top box side obtains media playback information, the following steps are included:

[0050] S101: After receiving the play request, the set-top box establishes a communication link (ie, a link) with the streaming media server according to the protocol type of the play request, and obtains current play information according to the link establishment information with the streaming media server.

[0051] S102: Generate NAT rule entries according to the playback information, and then add the generated rule entries to the first NAT rule table by updating the first NAT rule table. At the same time, the set-top box side initiates a rule entry adding request to the gateway side.

[0052] S103: After receiving the rule entry adding request from the set-top box, the gateway adds the rule entry to the second NAT rule table of the gateway, and configures the data forwarding rule of the gateway according to the rule entry to complete the hardware accelerated forwarding of the corresponding media data.

[0053] The above-mentioned playing information at least includes the streaming data sent by the media server, the port for sending the streaming data, the IP for receiving the streaming data on the set-top box side, and the port for receiving the streaming data.

[0054] Specifically, Figure 2 As shown, when the set-top box side obtains the playback end information, the following steps are included:

[0055] S201: After receiving the playback end information, the set-top box obtains the corresponding NAT rule entry according to the playback end information, deletes the rule entry from the current first NAT rule table by updating the first NAT rule table, and at the same time, the set-top box side initiates a rule entry leaving request to the gateway side.

[0056] S202: After receiving the rule entry leaving request sent by the set-top box, the gateway deletes the corresponding rule entry from the second NAT rule table on the gateway, and deletes the data forwarding of the corresponding rule entry.

[0057] Further, in one embodiment, if Figure 3 As shown, during the broadcast service, when the rule entry in the second NAT rule table on the gateway side reaches the aging time, the specific steps are as follows:

[0058] S301: The rule entry in the second NAT rule table on the gateway side reaches the aging time, and the gateway side initiates a query request to the set-top box side.

[0059] S302: After receiving the query request, the set-top box side queries whether the rule entry in the first NAT rule table exists, and replies the query result to the gateway side through a response request.

[0060] S303: The gateway side receives the response request from the set-top box, and performs relevant operations according to the information whether the rule entry carried in the response request exists. If yes, go to S304; if not, go to S305.

[0061] S304: The gateway side updates the aging time of the rule entry in the second NAT rule table, and this process is completed.

[0062] S305: The gateway deletes the rule entry from the current second NAT rule table by updating the second NAT rule table.

[0063] In this embodiment, aging query and response update are realized through communication between the gateway side and the set-top box side, which meets the data forwarding requirements in the playback scenario, avoids the technical problem of misjudgment when the gateway side judges the aging time, and avoids the problem of inability to forward due to aging anomalies, thereby improving the user experience.

[0064] Further, in one embodiment, after the set-top box side is restarted, the first NAT rule table on the set-top box side is initialized, and currently there is no playback service on the set-top box side.

[0065] In a second aspect, an embodiment of the present application further provides a device for implementing audio and video data forwarding, based on any one of the above-mentioned embodiments of the method for implementing audio and video data forwarding.

[0066] In one embodiment, referring to Figure 4, Figure 4 This is a functional module diagram of an embodiment of a device for implementing audio and video data forwarding in a fusion gateway of the present application.

[0067] like Figure 4 As shown, the fusion gateway includes a set-top box side and a gateway side, and the device includes a playback information management module 12, a NAT maintenance module 22, and two dual-system communication modules; wherein the playback information management module 12 is arranged on the set-top box side, the NAT maintenance module 22 is arranged on the gateway side, and the two dual-system communication modules are arranged on the set-top box side and the gateway side, respectively. In this embodiment, in order to better distinguish, the dual-system communication modules are respectively a first dual-system communication module 11 arranged on the set-top box side and a second dual-system communication module 21 arranged on the gateway side.

[0068] Specifically, the first dual-system communication module 11 is responsible for performing system communication with the gateway side and performing communication distribution.

[0069] The second dual-system communication module 21 is responsible for performing system communication with the set-top box side and performing communication distribution.

[0070] The broadcast information management module 12 is responsible for the information collection of various types of players in the management set-top box side, and produces the corresponding NAT rule items according to each player instance. The broadcast information management module 12 is used to maintain the first NAT rule table on the set-top box side. When the set-top box side obtains media playback information or playback end information, the broadcast information management module 12 is used to update the NAT rule table on the set-top box side, and notifies the gateway side. The broadcast information management module 12 is also used for when the rule item in the NAT rule table on the gateway side reaches the aging time, inquiring whether the rule item in the NAT rule table on the set-top box side exists, and replying the gateway side.

[0071] The NAT maintenance module 22 is responsible for learning the NAT rules of the network packets and supports learning the NAT information distributed by the second dual-system communication. The NAT maintenance module 22 is used to maintain the second NAT rule table on the gateway side. It is also used to update the NAT rule table on the gateway side accordingly after the set-top box side receives the above notification; it is also used to update the aging time of the rule entry or delete the rule entry from the second NAT rule table according to the reply from the set-top box side.

[0072] Furthermore, the device also includes a media player 13 disposed on the set-top box side, which is responsible for receiving and maintaining the current playback service. The media player 13 is used to receive media playback information, establish a link with the streaming media server according to the protocol type of the playback request, and then obtain the media playback information according to the link establishment information, and report the media playback information to the playback information management module 12; and is also used to receive playback end information and report it to the playback information management module 12.

[0073] Furthermore, the above device also includes a hardware NAT module 23 (i.e., HW_NAT module 23) disposed on the gateway side, which is used to configure the data forwarding rule on the gateway side according to the rule entry after the NAT maintenance module 22 updates the aging time of the rule entry; and is also used to delete the data forwarding of the corresponding rule entry after the NAT maintenance module 22 deletes the rule entry from the second NAT rule table. When the NAT maintenance module 22 updates the new rule entry, the HW_NAT module 23 performs hardware acceleration of the new rule entry and completes the hardware accelerated forwarding of the corresponding media data.

[0074] Furthermore, an embodiment of NAT notification and update in a normal playback life cycle is provided. Figure 5 As shown, it is a schematic diagram of the timing of NAT notification and update mechanism in the normal playback life cycle. The steps of this embodiment are as follows:

[0075] a101: The media player 13 at the set-top box side receives a play request, which is input from an external command. The media player 13 completes the protocol link building for the play according to the protocol type of the play request, obtains the current play information according to the link building information with the streaming media server, and reports the play information to the play information management module 12.

[0076] Specifically, the play information includes the streaming data sent by the media server, the port for sending the streaming data, the IP for receiving the streaming data on the set-top box side, and the port for receiving the streaming data.

[0077] a102: The play information management module 12 generates set-top box side NAT rule entries according to the play information reported by the media player 13, and updates the current first NAT rule table. At the same time, the first dual-system communication module 11 is called to initiate a rule entry adding request to the gateway side.

[0078] a103: The gateway side receives the request to add the rule entry through the second dual-system communication module 21 and notifies the NAT maintenance module 22. The NAT maintenance module 22 updates and maintains the second NAT rule table on the gateway side and adds the rule entry to the second NAT rule table.

[0079] a104: After the NAT maintenance module 22 completes the update and maintenance, it notifies the HW_NAT module 23 to configure the data forwarding rules on the gateway side to complete the hardware accelerated forwarding of the corresponding media data.

[0080] a105: During the playback process, after the NAT maintenance module 22 finds that the rule entry in the second NAT rule table reaches the aging time, it calls the second dual-system communication module 21 to initiate a NAT rule query request to the set-top box side.

[0081] a106: After receiving the query request, the first dual-system communication module 11 on the set-top box side notifies the playback information management module 12 to query the rule entry to check whether the rule entry exists in the first NAT rule table. In this embodiment, the rule entry exists in the first NAT rule table. The playback information management module 12 sends a response request for the NAT rule to the gateway side through the first dual-system communication module 11, carrying information about the existence of the rule entry.

[0082] a107: After receiving the response request from the first dual system communication module 11, the second dual system communication module 21 notifies the NAT maintenance module 22 of the existence of the rule entry. The NAT maintenance module 22 updates the second NAT rule table and updates the aging time of the rule entry.

[0083] a108: The media player 13 at the set-top box side receives the playback end information and reports it to the playback information management module 12.

[0084] a109: the playback information management module 12 deletes the rule entry corresponding to the playback end information in the current first NAT rule table according to the playback end information, and at the same time calls the first dual-system communication module 11 to initiate a rule entry leaving request to the gateway side.

[0085] a110: The second dual-system communication module 21 at the gateway side receives the rule entry leaving request sent by the first dual-system communication module 11, notifies the NAT maintenance module 22, and the NAT maintenance module 22 maintains the second NAT rule table and deletes the corresponding rule entry from the second NAT rule table.

[0086] a111: The NAT maintenance module 22 notifies the HW_NAT module 23, and the HW_NAT module 23 deletes the data forwarding of the corresponding rule entry on the gateway side.

[0087] Furthermore, an embodiment of NAT notification and update in the abnormal playback life cycle is provided. Figure 6 As shown, it is a schematic diagram of the timing of NAT notification and update mechanism in the abnormal playback life cycle. The steps of this embodiment are as follows:

[0088] b101: The media player 13 at the set-top box side receives a play request, which is input from an external command. The media player 13 completes the protocol link building for the play according to the protocol type of the play request, obtains the current play information according to the link building information with the streaming media server, and reports the play information to the play information management module 12.

[0089] Specifically, the play information includes the streaming data sent by the media server, the port for sending the streaming data, the IP for receiving the streaming data on the set-top box side, and the port for receiving the streaming data.

[0090] b102: The play information management module 12 generates set-top box side NAT rule entries according to the play information reported by the media player 13, and updates the current first NAT rule table. At the same time, the first dual-system communication module 11 is called to initiate a rule entry adding request to the gateway side.

[0091] b103: The gateway side receives the request to add the rule entry through the second dual-system communication module 21 and notifies the NAT maintenance module 22. The NAT maintenance module 22 updates and maintains the second NAT rule table on the gateway side and adds the rule entry to the second NAT rule table.

[0092] b104: After the NAT maintenance module 22 completes the update and maintenance, it notifies the HW_NAT module 23 to configure the data forwarding rules on the gateway side to complete the hardware accelerated forwarding of the corresponding media data.

[0093] b105: After the set-top box is restarted, the first NAT rule table on the set-top box is initialized, and there is currently no playback service on the set-top box.

[0094] b106: After the rule entry in the second NAT rule table on the gateway side reaches the aging time, the NAT maintenance module 22 calls the second dual-system communication module 21 to initiate a NAT rule query request to the set-top box side.

[0095] b107: After receiving the query request, the first dual-system communication module 11 on the set-top box side notifies the playback information management module 12 to query the rule entry to check whether the rule entry exists in the first NAT rule table. In this embodiment, the rule entry does not exist in the first NAT rule table. The playback information management module 12 sends a response request for the NAT rule to the gateway side through the first dual-system communication module 11, carrying the information that the rule entry does not exist.

[0096] b108: After receiving the response request from the first dual-system communication module 11, the second dual-system communication module 21 on the gateway side notifies the NAT maintenance module 22 that the rule entry does not exist. The NAT maintenance module 22 updates the second NAT rule table, deletes the corresponding rule entry in the second NAT rule table, and notifies the HW_NAT module 23.

[0097] b109: The HW_NAT module 23 deletes data forwarding on the gateway side.

[0098] It can be seen from the above embodiments that since a NAT rule table is set on the set-top box side and the gateway side respectively, the set-top box side can update the first NAT rule table according to the playback service regardless of whether it is in the normal playback life cycle or the abnormal playback life cycle, and actively notify the gateway side to update the second NAT rule table accordingly, so that the fusion gateway can realize the integration of the gateway side and the set-top box side at the playback service level, and can solve the problem of data forwarding failure due to the inability to learn NAT rules under the FCC private protocol.

[0099] Moreover, when the rule entry in the second NAT rule table on the gateway side reaches the aging time, the aging query and response update are realized through the communication between the gateway side and the set-top box side, which can solve the problem of uncontrollable gateway NAT aging time, meet the data forwarding requirements in the playback scenario, avoid the technical problem of misjudgment when the gateway side judges the aging time, and avoid the problem of inability to forward due to aging anomalies, thereby improving the user experience.

[0100] It should be noted that the serial numbers of the above-mentioned embodiments of the present application are only for description and do not represent the advantages or disadvantages of the embodiments.

[0101] The terms "including" and "having" and any variations thereof in the specification and claims of this application and the above-mentioned drawings are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not limited to the listed steps or units, but optionally includes steps or units that are not listed, or optionally includes other steps or units inherent to these processes, methods, products or devices. The terms "first", "second" and "third" are used to distinguish different objects, etc., and do not represent a sequence, nor do they limit "first", "second" and "third" to different types.

[0102] In the description of the embodiments of the present application, "exemplary", "for example" or "for example" are used to indicate examples, illustrations or descriptions. Any embodiment or design described as "exemplary", "for example" or "for example" in the embodiments of the present application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplary", "for example" or "for example" is intended to present related concepts in a specific way.

[0103] In the description of the embodiments of the present application, unless otherwise specified, “ / ” means or, for example, A / B can mean A or B; the “and / or” in the text is merely a description of the association relationship of associated objects, indicating that three relationships may exist, for example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. In addition, in the description of the embodiments of the present application, “multiple” refers to two or more than two.

[0104] In some processes described in the embodiments of the present application, multiple operations or steps that appear in a specific order are included, but it should be understood that these operations or steps may not be executed in the order in which they appear in the embodiments of the present application or in parallel, and the sequence number of the operation is only used to distinguish the different operations, and the sequence number itself does not represent any execution order. In addition, these processes may include more or fewer operations, and these operations or steps may be executed in sequence or in parallel, and these operations or steps may be combined.

[0105] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application is essentially or the part that contributes to the prior art can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, disk, CD) as described above, and includes a number of instructions for a terminal device to execute the methods described in each embodiment of the present application.

[0106] The above are only preferred embodiments of the present application, and are not intended to limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made using the contents of the present application specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present application.

Claims

1. A method for implementing audio and video data forwarding, characterized in that: The method comprises: The set-top box side and the gateway side each maintain a network address forwarding rule table; When the set-top box side obtains media playback information or playback end information, it updates its network address forwarding rule table and notifies the gateway side of the corresponding update of the network address forwarding rule table; When the aging time of a rule entry in the network address forwarding rule table on the gateway side reaches the aging time, the network address forwarding rule table on the set-top box side is checked to see whether the rule entry exists. If so, the gateway side updates the aging time of the rule entry; if not, the network address forwarding rule table on the gateway side deletes the rule entry.

2. The method for realizing audio and video data forwarding according to claim 1, characterized in that: When the set-top box side obtains the media playback information, it updates its network address forwarding rule table and notifies the gateway side of the corresponding update of the network address forwarding rule table, including: When the set-top box receives a playback request, it establishes a link with the streaming media server according to the protocol type of the playback request, obtains the media playback information based on the link establishment information, generates a network address forwarding rule entry based on the playback information, and adds the rule entry to its network address forwarding rule table, and simultaneously initiates a rule entry joining request to the gateway side.

3. The method for realizing audio and video data forwarding according to claim 2, characterized in that: The set-top box side notifies the gateway side of a corresponding update of the network address forwarding rule table, which also includes: After receiving the rule entry adding request, the gateway side adds the rule entry to the network address forwarding rule table of the gateway side, and configures the data forwarding rule of the gateway side according to the rule entry.

4. The method for realizing audio and video data forwarding according to claim 1, characterized in that: When the set-top box side obtains the playback end information, it updates its network address forwarding rule table and notifies the gateway side of the corresponding update of the network address forwarding rule table, including: The set-top box side deletes the rule entry corresponding to the playback end information in the network address forwarding rule table of the set-top box side according to the playback end information, and simultaneously initiates a rule entry leaving request to the gateway side.

5. The method for realizing audio and video data forwarding according to claim 4, characterized in that: The set-top box side notifies the gateway side of a corresponding update of the network address forwarding rule table, which also includes: After receiving the rule entry leaving request, the gateway deletes the corresponding rule entry from the network address forwarding rule table on the gateway side, and deletes the data forwarding of the corresponding rule entry.

6. The method for realizing audio and video data forwarding according to claim 1, characterized in that: When the rule entry in the network address forwarding rule table on the gateway side reaches the aging time, query whether the rule entry in the network address forwarding rule table on the set-top box side exists, including: The gateway side initiates a query request to the set-top box side. After receiving the query request, the set-top box side queries the current network address forwarding rule table of the set-top box side to see whether there is a rule entry corresponding to the query request, and replies to the query result to the gateway side through a response request.

7. The method for realizing audio and video data forwarding according to claim 1, characterized in that: After the set-top box is restarted, the network address forwarding rule table on the set-top box is initialized, and there is currently no playback service on the set-top box.

8. A device for implementing the method for forwarding audio and video data according to any one of claims 1 to 7, characterized in that: The device comprises: The playback information management module is arranged on the set-top box side and is used to maintain the network address forwarding rule table on the set-top box side; when the set-top box side obtains media playback information or playback end information, the network address forwarding rule table on the set-top box side is updated and the gateway side is notified; and when the rule entry in the network address forwarding rule table on the gateway side reaches the aging time, the network address forwarding rule table on the set-top box side is queried to see whether the rule entry exists and the gateway side is replied; A network address forwarding maintenance module is provided on the gateway side and is used to maintain the network address forwarding rule table on the gateway side; it is also used to update the network address forwarding rule table on the gateway side accordingly after being notified by the set-top box side; it is also used to update the aging time of the rule entry or delete the rule entry from the network address forwarding rule table on the gateway side according to the reply from the set-top box side; There are two dual-system communication modules, which are respectively arranged on the set-top box side and the gateway side, and are used for communication between the set-top box side and the gateway side.

9. The device for implementing the method for forwarding audio and video data according to claim 8, characterized in that: The device also includes a media player, which is arranged on the set-top box side, and is used to receive media playback information, establish a link with a streaming media server according to a protocol type of a playback request, and then obtain media playback information according to the link establishment information, and report the media playback information to the playback information management module; It is also used to receive playback end information and report it to the playback information management module.

10. The device for implementing the method for forwarding audio and video data according to claim 8, characterized in that: The device also includes a hardware network address forwarding module, which is arranged at the gateway side and is used to configure the data forwarding rule at the gateway side according to the rule entry after the network address forwarding maintenance module updates the aging time of the rule entry; It is also used to delete the data forwarding of the corresponding rule entry after deleting the rule entry from the network address forwarding rule table on the gateway side in the network address forwarding maintenance module.