Data flow limiting method, device, electronic device and storage medium

By implementing the data flow restriction method in the audio and video service platform, and determining the flow restriction strategy based on the type information and characteristic information of the multimedia communication request, the platform's shortcomings in high availability, stability and security are solved, and effective guarantees for platform performance and security are achieved.

CN115733803BActive Publication Date: 2025-03-14ALIBABA CLOUD COMPUTING CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202211611001.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-12-12
Publication Date
2025-03-14
Estimated Expiration
2042-12-12

AI Technical Summary

Technical Problem

The existing audio and video service platforms have shortcomings in terms of high availability, stability and security, especially when facing a large number of audio and video acquisition devices and potential malicious attacks, it is difficult to effectively ensure the overall performance and security of the platform.

Method used

Through a data flow restriction method, in response to the multimedia communication related request of the audio and video service platform, the type information and characteristic information of the request method are obtained, and the corresponding flow restriction strategy is determined based on this information, and corresponding processing is carried out to achieve the guarantee of high availability, stability and security of the platform.

Benefits of technology

This method can effectively avoid the performance degradation and denial of service risks of audio and video service platforms, ensure the full utilization of resources, and ensure service quality through fine-grained and differentiated current limiting strategies, and solve the platform's shortcomings in high availability, stability and security.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115733803B_ABST
    Figure CN115733803B_ABST
Patent Text Reader

Abstract

The present application provides a data flow limiting method, device, electronic device and storage medium, which relates to the field of cloud computing technology. The method includes: in response to a multimedia communication-related request for an audio-visual service platform, obtaining type information and feature information of a request method in the multimedia communication-related request; determining a first flow limiting strategy corresponding to the multimedia communication-related request based on the type information and feature information; and performing corresponding processing on the multimedia communication-related request based on the first flow limiting strategy. In this embodiment, a flow limiting strategy is determined based on the type information and feature information of the request method in the multimedia communication-related request, and the multimedia communication-related request is processed accordingly through the flow limiting strategy to ensure the high availability, stability and security of the audio-visual service platform. Moreover, based on the type information and feature information of the request method, a fine-grained and differentiated flow limiting strategy can be determined to ensure the service quality of the audio-visual service platform.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of cloud computing technology, and in particular to a data flow limiting method, device, electronic device and storage medium. Background Art

[0002] At present, in security-related fields such as city brain, urban governance, and smart transportation, as the scale of connected audio and video acquisition devices continues to expand, in order to facilitate the unified management and scheduling of the audio and video service platform in a centralized manner, it is not only necessary to be able to meet the stable access of a large number of audio and video acquisition devices under different delivery and deployment scenarios (public cloud, private cloud), but also to be able to realize the concurrent live broadcast, control, and equipment management of cameras on the audio and video service platform.

[0003] Based on the above background, major video security manufacturers and cloud vendors have launched a large number of audio and video service platforms for access control of audio and video acquisition equipment. However, the existing audio and video service platforms focus more on the integrity of audio and video protocol support and the diversity of fragmented support from manufacturers, and pay less attention to the high availability, stability and security of the entire audio and video service platform. These factors will become more serious and prominent as the use of audio and video service platforms increases. Therefore, a solution is needed to ensure the high availability, stability and security of audio and video service platforms. Summary of the invention

[0004] The embodiments of the present application provide a data flow limiting method, device, electronic device and storage medium to ensure the high availability, stability and security of an audio and video service platform.

[0005] In a first aspect, an embodiment of the present application provides a data flow limiting method, the method comprising:

[0006] In response to a multimedia communication related request for the audio and video service platform, obtaining type information and feature information of a request method in the multimedia communication related request;

[0007] Determine a first current limiting strategy corresponding to the multimedia communication related request according to the type information and the characteristic information;

[0008] According to the first current limiting strategy, multimedia communication related requests are processed accordingly.

[0009] In a second aspect, an embodiment of the present application provides a data flow limiting device, the device comprising:

[0010] An acquisition module, used to respond to a multimedia communication related request for the audio and video service platform, and acquire type information and feature information of a request method in the multimedia communication related request;

[0011] A determination module, used to determine a first current limiting strategy corresponding to a multimedia communication related request according to the type information and the characteristic information;

[0012] The current limiting module is used to process multimedia communication related requests accordingly according to the first current limiting strategy.

[0013] In a third aspect, an embodiment of the present application provides an electronic device, including a memory, a processor, and a computer program stored in the memory, wherein the processor implements any of the methods described above when executing the computer program.

[0014] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method described in any one of the above is implemented.

[0015] Compared with the prior art, this application has the following advantages:

[0016] The present application provides a data flow limiting method, device, electronic device and storage medium, which, in response to multimedia communication related requests for an audio-visual service platform, obtains type information and feature information of the request method in the multimedia communication related request; determines a first flow limiting strategy corresponding to the multimedia communication related request based on the type information and feature information; and processes the multimedia communication related request accordingly based on the first flow limiting strategy. In this embodiment, a flow limiting strategy is determined based on the type information and feature information of the request method in the multimedia communication related request, and the multimedia communication related request is processed accordingly through the flow limiting strategy to ensure the high availability, stability and security of the audio-visual service platform. Moreover, based on the type information and feature information of the request method, a fine-grained and differentiated flow limiting strategy can be determined to ensure the service quality of the audio-visual service platform.

[0017] The above description is only an overview of the technical solution of the present application. In order to more clearly understand the technical means of the present application, it can be implemented in accordance with the contents of the specification. In order to make the above and other purposes, features and advantages of the present application more obvious and easy to understand, the specific implementation methods of the present application are listed below. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] In the accompanying drawings, unless otherwise specified, the same reference numerals throughout the multiple drawings represent the same or similar parts or elements. These drawings are not necessarily drawn to scale. It should be understood that these drawings only depict some embodiments according to the present application and should not be regarded as limiting the scope of the present application.

[0019] Figure 1 A schematic diagram of an application scenario of the data flow limiting method provided in this application;

[0020] Figure 2 This is a flow chart of a data flow limiting method according to an embodiment of the present application;

[0021] Figure 3 This is a flow chart of analyzing SIP request and response messages according to an embodiment of the present application;

[0022] Figure 4 is a flow chart of a data flow limiting method according to an embodiment of the present application;

[0023] Figure 5 is a structural block diagram of a data current limiting device according to an embodiment of the present application; and

[0024] Figure 6 A block diagram of an electronic device used to implement an embodiment of the present application. DETAILED DESCRIPTION

[0025] In the following, only some exemplary embodiments are briefly described. As those skilled in the art will appreciate, the described embodiments may be modified in various ways without departing from the concept or scope of the present application. Therefore, the drawings and descriptions are considered to be exemplary in nature and not restrictive.

[0026] To facilitate understanding of the technical solutions of the embodiments of the present application, the following describes the related technologies of the embodiments of the present application. The following related technologies can be combined with the technical solutions of the embodiments of the present application as optional solutions, and they all belong to the protection scope of the embodiments of the present application.

[0027] The video service platform itself carries service functions such as real-time live broadcast, video playback, video download, device registration, event subscription and device control, and has higher requirements for service stability and availability than general web servers. However, the capacity of the entire platform and network is limited. It must not only meet the different service processing and transmission request traffic of a large number of connected devices, but also be able to withstand malicious attack traffic that is likely to occur after being exposed to the public network. In view of this, the video service platform urgently needs a flow limiting solution that conforms to its communication protocol and service characteristics. When the access request is about to or has caused the entire audio and video service platform (network bandwidth) to approach the capacity threshold, flow limiting measures can be taken in time, thereby realizing the protection of the video service platform and ensuring the overall availability and service quality of the video service platform.

[0028] In the related art, the server in the video and audio service platform carries a custom response header in the response header of the response message to indicate that the server is overloaded, and then the client reduces the request pressure of the client to the video and audio service platform by means of retransmission, timeout waiting, etc. according to the explicit overload indication information. However, this solution depends on the support of the client, and the client needs to be customized. Moreover, this solution relies on the server to return additional overload indication information, which requires changes to the protocol stack of the existing server on the one hand; on the other hand, since the server needs to respond to each request to ensure that each client can understand the load of the server, the server is likely to reply to each response message when it is already overloaded, which will further aggravate the network congestion, consume the network bandwidth, and further reduce the overall throughput of the video service platform. In addition, this solution has security and fairness issues in practical applications, because the solution relies on the active control of the client. For some clients that do not parse the response header, or "malicious" attackers that can be directly ignored, the solution cannot limit the flow, which will cause the client of the "malicious" attacker to seize the server resources and network bandwidth that the "legitimate" client could have occupied.

[0029] In view of this, an embodiment of the present application provides a data flow limiting method. Figure 1 A schematic diagram of an application scenario of the data flow limiting method provided in this application. Figure 1 As shown, the data flow limiting method provided in this embodiment can be implemented in the form of a flow limiting system. The flow limiting system can be deployed separately in a server, or it can be deployed in the server of the audio and video service platform. In this embodiment, the audio and video service platform is a GB28181 platform. The GB28181 platform refers to an access platform for image acquisition devices that support the GB28181 standard. The GB28181 standard is a communication standard jointly launched by many manufacturers in order to regulate the interconnection of cameras of various manufacturers in the security field. The main contents include the Session Initiation Protocol (SIP) responsible for transmitting control signaling and the Realtime Transport Protocol (RTP) / Realtime Transport Control Protocol (RTCP) responsible for streaming media transmission. The GB28181 platform can include a server cluster consisting of multiple SIP servers (it can also be a SIP server), and a streaming media server cluster (it can also be a streaming media server).

[0030] Among them, the current limiting system includes: a SIP request parsing module, a data collection and analysis module, a SIP response parsing module and a current limiting decision module.

[0031] The SIP request parsing module is used to receive the SIP request sent by the client (such as Figure 1 The "external SIP request" shown in the figure) is used to parse the SIP request to obtain the client identifier, type information and characteristic information of the request method, SIP transaction and SIP dialogue in the SIP request. Among them, the request method in the SIP request may include session-type requests and non-session-type requests. The type information of session-type requests may include: session establishment request INVITE, used to establish an audio and video session connection; session confirmation request ACK, used to confirm the INVITE request; session end request BYE, used to disconnect the session connection established by the INVITE request; playback control request INFO, used to control the playback of historical audio and video. The type information of non-session-type requests may include: subscription-type request SUBSCRIBE, used to subscribe to events from event sources and to subscribe to directories from directory owners; notification-type request NOTIFY, used by event sources to notify event observers of event occurrences and directory owners to notify directory recipients of directory changes; message-type request MESSAGE, used to implement front-end device control, alarm event notification and distribution, device information query, device status information reporting, and audio and video file retrieval; registration-type request REGISTER, used to register and deregister devices.

[0032] The SIP response parsing module is used to receive the SIP response message of the historical SIP request returned by the GB28181 platform, extract the status code, SIP transaction and SIP dialogue in the response message, and return the SIP response message to the client.

[0033] The data collection and analysis module is used to form a closed loop of SIP request / response data collection based on the SIP request and the response message returned by the GB28181 platform, including: SIP transactions, SIP dialogues, client identification of successful registration / semi-registration / deregistration, multiple response associations and other raw data, as well as characteristic information such as bandwidth occupancy, instantaneous query rate per second (QPS), request / response delay, etc. The data is stored in the database and provided to the current limiting decision module.

[0034] The flow limiting decision module is used to comprehensively determine whether to take flow limiting measures for the current SIP request and what flow limiting strategy to take for corresponding processing, i.e., intercepting the SIP request or releasing the SIP request to the SIP server, based on the SIP request information, the bandwidth resource usage extracted from the database, the SIP transaction, the SIP dialogue and the various threshold information pre-configured by the user. The streaming media server is used to send the audio and video data to the client according to the audio and video data acquisition request sent by the SIP server. Among them, a SIP transaction consists of a single SIP request and all response messages of this request, which contain 0 to N intermediate responses (for example, status codes are 1xx, etc.) and a final response (for example, status codes are 2xx, 3xx, 4xx, 5xx or 6xx, etc.). The branch field value of the Via header field in the request and response message headers of the same transaction is the same. A SIP dialogue is related to a series of transactions between the SIP server and the client for establishing and terminating sessions. For example, for a device, from the start to the end of real-time on-demand video and audio, multiple request methods such as INVITE, ACK, and BYE are usually involved, but they all belong to one conversation. The same conversation can be uniquely identified by the session identifier Call-ID value of the request and response header, the tag value of the From header field, and the tag value of the To header field.

[0035] In this embodiment, the current limiting strategy is determined according to the type information and characteristic information of the request method in the SIP request, and the SIP request is processed accordingly through the current limiting strategy, so as to protect the GB28181 platform, avoid performance degradation and denial of service (DOS) risks, and ensure that the resources of the GB28181 platform are fully utilized. Moreover, according to the type information and characteristic information of the request method, a fine-grained and differentiated current limiting strategy is determined, and the overload control of the SIP server can be realized in advance by intercepting the request.

[0036] Moreover, in this embodiment, by intercepting the request on the server side, there is no need for the client to adjust or customize to adapt to the custom header of the server. Since it is an independent current limiting system, the existing server does not need to be modified. By intercepting the request, the client can implicitly perceive the server overload (for example, the client perceives the request timeout) instead of explicitly responding to each request, which will not aggravate the network congestion and the consumption of server resources. For the access of the client of "malicious" attackers, the current limiting system can prevent a large number of attackers from registering because it can intercept and limit the SIP requests of unknown clients, thereby solving the problems of security and fairness.

[0037] The present application embodiment provides a data flow limiting method. The method in this embodiment can be applied to a computing device, which may include a server, etc. Figure 2 The flowchart of a data flow limiting method according to an embodiment of the present application is shown, and the method includes:

[0038] Step S201, in response to a multimedia communication related request for an audio-visual service platform, obtain type information and feature information of a request method in the multimedia communication related request.

[0039] Step S202: Determine a first current limiting strategy corresponding to the multimedia communication related request according to the type information and the characteristic information.

[0040] Step S203: Process multimedia communication related requests accordingly according to the first current limiting strategy.

[0041] The execution subject may be a server. The multimedia communication related request refers to a request related to communication using a multimedia communication protocol, such as a SIP request.

[0042] After receiving the multimedia communication related request, the server in the audio-visual service platform parses the multimedia communication related request to obtain the type information and characteristic information of the request method in the multimedia communication related request. The format of the multimedia communication related request includes a request line, a request header, and a request body. The server can obtain the type information of the request method by parsing the request line, and can obtain the characteristic information of the request method by parsing the request header and the request body. The characteristic information includes the values ​​of the preset fields in the request header and the request body. The values ​​of the preset fields in the request header and the request body may be different for different request methods.

[0043] According to the type information and characteristic information of the request method, a first flow limiting strategy corresponding to the multimedia communication related request is determined, and the first flow limiting strategy may include intercepting the multimedia communication related request or releasing the multimedia communication related request to the audio-visual service platform. If the request is released to the audio-visual service platform, the server of the audio-visual service platform returns a response message corresponding to the multimedia communication related request to the client.

[0044] The present application provides a data flow limiting method, which responds to multimedia communication related requests for an audio-visual service platform, obtains type information and feature information of a request method in the multimedia communication related request; determines a first flow limiting strategy corresponding to the multimedia communication related request based on the type information and feature information; and processes the multimedia communication related request accordingly based on the first flow limiting strategy. In this embodiment, a flow limiting strategy is determined based on the type information and feature information of the request method in the multimedia communication related request, and the multimedia communication related request is processed accordingly through the flow limiting strategy to ensure the high availability, stability and security of the audio-visual service platform. Moreover, based on the type information and feature information of the request method, a fine-grained and differentiated flow limiting strategy can be determined to ensure the service quality of the audio-visual service platform.

[0045] The specific implementation of step S202 is shown in the following embodiment:

[0046] In one implementation, a first flow limiting strategy corresponding to a multimedia communication-related request is determined based on type information and feature information, including: pre-obtaining a response message of a historical multimedia communication-related request; if, based on the type information, feature information, and response message, it is determined that the multimedia communication-related request has an association with the historical multimedia communication-related request, then the first flow limiting strategy is determined to be to release the multimedia communication-related request.

[0047] In actual applications, response messages of historical multimedia communication-related requests are obtained in advance, and a database is established to store the status code and header field data obtained by parsing the response messages of historical multimedia communication-related requests, as well as the type information and feature information of the request method that can be obtained by parsing the multimedia communication-related requests. By comparing the type information and feature information of the request method with the status code and header field data of the response message, it can be determined whether the current multimedia communication-related request has an associated relationship with the historical multimedia communication-related request, that is, whether it is an intermediate state request. For example, if the tag value of the TO field parsed in the request header of the request method of the current multimedia communication-related request is the same as the tag value of the TO field in the header field data of the response message, then the method is an intermediate state request. If the multimedia communication-related request is an intermediate state request, the multimedia communication-related request is released to the audio-visual service platform.

[0048] For example, a SIP conversation process (for example, from starting to view the camera live stream to ending the viewing) usually involves multiple request / response transactions between the SIP client (for example, the camera) and the SIP server. By comparing the data parsed from the multimedia communication-related requests with the data parsed from the response messages in the database, the conversations and transactions to which each SIP request belongs can be identified and maintained, avoiding interception of intermediate requests in SIP conversations and transactions, which would result in partially successful requests being invalidated, thereby wasting machine hardware resources and network resources.

[0049] In one implementation, the multimedia communication related request includes a session class request in a session initiation protocol SIP request, and determining a first current limiting strategy corresponding to the multimedia communication related request according to the type information and the feature information includes:

[0050] If the type information of the request method is a session confirmation request, determine the video encoding type based on the characteristic information, and the characteristic information includes the value of the preset field in the request header and the request body of the request method; if the type information of the request method is a session establishment request, determine the video encoding type based on the type information; determine the allocated bandwidth of the session establishment request or the session confirmation request based on the video encoding type, and if the allocated bandwidth exceeds the preconfigured bandwidth threshold, determine the first current limiting strategy as intercepting session class requests.

[0051] The request method in the SIP request may include session-based requests and non-session-based requests. Session-based requests may include: session establishment request INVITE, session confirmation request ACK, session end request BYE and playback control request INFO. Non-session-based requests may include: subscription-based requests SUBSCRIBE, notification-based requests NOTIFY, message-based requests MESSAGE and registration-based requests REGISTER.

[0052] Pre-configure the total bandwidth of the audio-visual service platform, the flow-limiting bandwidth threshold of the audio-visual service platform, the query rate threshold per second corresponding to each type of request in non-session requests, and the upper limit of the delay fluctuation of the request response, etc. according to the user's configuration instructions. If the request method is determined to be a session confirmation request ACK according to the data parsed in the request line of the SIP request, and the video encoding type is determined according to the value of the preset field parsed in the request header and request body of the ACK request, the allocated bandwidth is determined according to the video encoding type, and if the allocated bandwidth exceeds the pre-configured bandwidth threshold, the SIP request is intercepted. If it is an INVITE request, the video encoding type is determined according to the type information, and then the allocated bandwidth is determined. Among them, the allocated bandwidth includes at least one of the actual allocated bandwidth or the pre-allocated bandwidth; the pre-configured bandwidth threshold includes at least one of the pre-configured flow-limiting bandwidth threshold or the pre-configured total bandwidth.

[0053] In one example, if it is an ACK request, the characteristic information is the payload type content of the a field. According to the payload type content, the actual transmitted video stream encoding type can be determined, and the allocated bandwidth can be determined according to the video encoding type. The pre-allocated bandwidth is converted to the actual allocated bandwidth. If the actual video encoding type is H265, the pre-allocated bandwidth is reduced by 4Mbps and the actual allocated bandwidth is increased by 2Mbps. If it is an INVITE request, the default subsequent video encoding type is H264, the resolution is 1080P, and the system pre-allocated bandwidth is added by 4Mbps.

[0054] Optionally, if the actual allocated bandwidth of the session establishment request exceeds a preconfigured bandwidth limiting threshold, the first flow limiting strategy is determined to intercept the session establishment request.

[0055] Optionally, if the sum of the actual allocated bandwidth of the session confirmation request and the pre-allocated bandwidth exceeds the pre-configured total bandwidth, the first flow limiting strategy is determined to intercept the session confirmation request.

[0056] In one implementation, the method further includes:

[0057] If the allocated bandwidth does not exceed the preconfigured bandwidth threshold, and the average processing delay of the session establishment request or the session confirmation request within the preset time period exceeds the preset time threshold, the first current limiting strategy is determined to intercept the session class request.

[0058] The time threshold may be a pre-configured upper limit of the delay fluctuation of the request response. If the allocated bandwidth of the session establishment request or the session confirmation request does not exceed the pre-configured bandwidth threshold, and the average processing delay of the session establishment request or the session confirmation request within the preset time period does not exceed the upper limit of the delay fluctuation, the first flow limiting strategy is determined to release the session type request.

[0059] In one implementation, the multimedia communication related request includes a non-session type request in a session initiation protocol SIP request, and the method further includes:

[0060] Non-session requests include multiple types of request methods. If it is determined according to the type information that the query rates per second corresponding to the multiple types of request methods respectively exceed the corresponding query rate thresholds, the first current limiting strategy is determined to intercept non-session requests.

[0061] Among them, non-session requests include multiple types of request methods: subscription request SUBSCRIBE, notification request NOTIFY, message request MESSAGE and registration request REGISTER. The corresponding query rate threshold is configured in advance for each type of request method. If the query rate per second corresponding to a request method exceeds the corresponding query rate threshold, the first current limiting strategy is determined to intercept the non-session request.

[0062] In one implementation, the method further includes:

[0063] If it is determined according to the type information that the query rates per second corresponding to the multiple types of request methods do not exceed the corresponding query rate thresholds, and the average processing delays corresponding to the multiple types of request methods within the preset time period exceed the preset time threshold, the first current limiting strategy is determined to intercept non-session requests.

[0064] Among them, for any type of request method, if the query rate per second does not exceed the corresponding query rate threshold, and the average processing delay within the preset time period exceeds the preconfigured delay fluctuation upper limit, the request method is intercepted.

[0065] Optionally, if it is determined based on the type information that the query rates per second corresponding to each of the multiple types of request methods do not exceed the corresponding query rate threshold, and the average processing delays corresponding to the multiple types of request methods within a preset time period do not exceed the preset time threshold, the first current limiting strategy is determined to release the non-session request.

[0066] In addition, when determining the current limiting strategy, the current overload level information of the video and audio service platform can also be taken into consideration, as shown in the following embodiments:

[0067] In one implementation, multimedia communication-related requests are processed accordingly according to a first current limiting strategy, including: if the first current limiting strategy is to intercept multimedia communication-related requests, overload degree information is determined; based on type information, feature information and overload degree information, a second current limiting strategy corresponding to the multimedia communication-related requests is determined; and according to the second current limiting strategy, multimedia communication-related requests are processed accordingly.

[0068] In actual applications, if the first current limiting strategy is to intercept multimedia communication related requests, the second current limiting strategy is further determined according to the type information of the request method and the overload degree information of the audio and video service platform, and finally the second current limiting strategy is used to determine whether to intercept or release the multimedia communication related request. Different types of request methods may correspond to different second current limiting strategies.

[0069] The specific implementation method of determining the overload degree information is shown in the following embodiment:

[0070] In one implementation, the multimedia communication related request includes a session class request in a session initiation protocol SIP request, and determining the overload degree information includes:

[0071] If the allocated bandwidth requested by the session class exceeds the preconfigured bandwidth threshold, the overload degree information is determined as severe overload.

[0072] In actual applications, if it is a session-type request and the actual allocated bandwidth exceeds the current-limiting bandwidth threshold, the overload degree information is determined as severe overload, otherwise the overload degree information is determined as general overload.

[0073] In one implementation, the method further includes:

[0074] If the type information is any one of a session establishment request, a session confirmation request, and a playback control request, and the overload degree information is a severe overload, the second current limiting strategy is determined to intercept session class requests.

[0075] In one example, for session-type requests, if the overload degree information is a general overload, the ACK request is determined to require flow limiting; if the overload degree information is a severe overload, the ACK request, INVITE request, and INFO request are all determined to require flow limiting; for BYE requests, if the overload degree information is a general overload or a severe overload, flow limiting is not required.

[0076] In one implementation, the multimedia communication related request includes a non-session type request in a session initiation protocol SIP request, and determining the overload degree information includes:

[0077] If the query rate per second of non-session requests exceeds the corresponding query rate threshold, and the average processing delay of non-session requests exceeds the preset time threshold, the overload degree information is determined as severe overload.

[0078] In actual applications, for non-session requests, if the query rate per second exceeds the query rate threshold and the average processing delay exceeds the pre-configured delay fluctuation upper limit, the overload degree information is determined to be severe overload; if the query rate per second exceeds the query rate threshold, but the average processing delay does not exceed the pre-configured delay fluctuation upper limit, the overload degree information is determined to be general overload; if the query rate per second does not exceed the query rate threshold, but the average processing delay exceeds the pre-configured delay fluctuation upper limit, the overload degree information is determined to be general overload.

[0079] In one implementation, the method further includes:

[0080] If the type information is any one of a subscription request, a notification request, and a message request, and the overload degree information is a severe overload, the second current limiting strategy is determined to intercept non-session requests.

[0081] In one implementation, the multimedia communication related request includes a non-session class request in a session initiation protocol SIP request, and determining a second current limiting strategy corresponding to the multimedia communication related request according to the type information, the feature information, and the overload degree information includes:

[0082] If the type information is a registration request or a message request, the second current limiting strategy is determined to intercept or release non-session requests according to the characteristic information and overload degree information corresponding to the registration request or the message request respectively.

[0083] In one example, for non-session requests, if it is a REGISTER request, if the overload degree information is a general overload, the request is determined to be in the initial registration stage according to the characteristic information, and it is determined that current limiting is required; if the overload degree information is a severe overload, the request is determined to be in the final registration stage according to the characteristic information (the value of the Expires header, which is greater than 0 indicates a request for the registration process, and equal to 0 indicates a request for the deregistration process. The Authorization header is extracted, and if it exists, it indicates the initial registration stage, otherwise it is the final stage), and it is determined that current limiting is required; in the case of general overload or severe overload, the deregistration request does not require current limiting. If it is a SUBSCRIBE request, current limiting is required in the case of general overload or severe overload. If it is a NOTIFY request, current limiting is required in the case of severe overload. If it is a MESSAGE request, in the case of general overload, the characteristic information is obtained by parsing the request body, that is, the command type is Control and Query, then current limiting is required; in the case of severe overload, requests of command types (Control, Query, Notify and Response) need to be current limited. Among them, the need for current limiting means intercepting the request; otherwise, the request is released.

[0084] In a specific embodiment, multimedia communication related request and response messages are parsed to obtain type information and characteristic information of the request method. Specifically, the multimedia communication related request may be a SIP request, and the SIP request is parsed including: parsing the request line of the SIP request, extracting the request method of the SIP request, and thus obtaining the type information of the request method; parsing the SIP request header, extracting the public SIP header field data: extracting the client identification information from the From header field; extracting the session identification Call ID header, extracting the tag value in the From header field and the tag value in the To header field. For some request methods, specific SIP header field data is extracted: for a REGISTER request, the REGISTER type is determined, specifically, the value of the registration validity period Expires header is extracted, greater than 0 indicates registration, and equal to 0 indicates cancellation. Determine the registration process stage: extract the authorization header, if it exists, it indicates the initial stage of the registration process, otherwise it is the final stage. For a SUBSCRIBE request, the subscription operation type is determined, specifically, the value of the Expires header is extracted, greater than 0 indicates establishment of a subscription, and equal to 0 indicates cancellation of a subscription. For the extracted request methods, some request methods need to parse the SIP request body and extract specific fields from it. For example, for the ACK method, parse the payload type content of the a field in the SDP request to determine the actual transmitted video stream encoding type; for the MESSAGE request, parse the request body in the format of Monitoring and Alarming Network System Control Description Protocol (MANSCDP) combined with Extensible Markup Language (XML), extract the root element name and command type CmdType element value, and thus determine the MESSAGE command type and subtype. Parsing the response message of the historical SIP request includes: parsing the status line of the response message and extracting the status code of the response message; parsing the response message header and extracting the public header field data; extracting the Call ID header, extracting the tag value from the From header field and the To header field.

[0085] In a specific embodiment, the flowchart for analyzing SIP request and response messages is as follows: Figure 3 The analysis process includes:

[0086] Step S301, determine whether the request received from the client is a SIP request, if yes, execute step S302; if no, it is a historical SIP response message, execute step S312.

[0087] Step S302: the database adds a new client request record.

[0088] Specifically, a new request record is added to the database according to the client SIP ID and SIP dialogue information (session identifier Call ID value and Tag value of From header). The request record includes the type information of the request method of the SIP request, the request timestamp and the characteristic information of each request method. Taking REGISTER as an example, it includes registration or deregistration, initial stage registration or final stage registration.

[0089] Step S303: the database stores characteristic information of the request method.

[0090] Step S304, determining whether the SIP request is a session type request, if yes, executing step S305, otherwise executing step S311.

[0091] Step S305, determining whether the SIP request is an INVITE request in a session type request, if yes, executing step S306, otherwise executing step S307.

[0092] Step S306, the default subsequent video encoding is H264, the resolution is 1080P, and the newly added audio and video service platform pre-allocates a bandwidth of 4Mbps.

[0093] Step S307, determining whether the SIP request is an ACK request in a session type request, if yes, executing step S308, otherwise executing step S309.

[0094] Step S308, if it is an ACK request in the session type request, the pre-allocated bandwidth is converted to the actual allocated bandwidth according to the actual video stream encoding type obtained by parsing the SIP request. For example, if the actual video stream encoding type is H265, the pre-allocated bandwidth is reduced by 4Mbps and the actual allocated bandwidth is increased by xMbps.

[0095] Step S309, determining whether the SIP request is a BYE request in a session type request, if yes, executing step S310, otherwise ending.

[0096] Step S310: the actual allocated bandwidth is reduced by x Mbps, where the value of x depends on the video stream encoding type of the ACK request previously sent in the SIP dialog.

[0097] Step S311: If it is a non-session request, then the QPS corresponding to the non-session request is calculated.

[0098] Step S312: If the currently processed message is a response message to a SIP request, the processing result (response status code) and SIP dialog information (Tag value of the To header field) of the corresponding SIP request are updated.

[0099] Step S313, calculate and store the actual processing delay of the audio and video service platform currently requested.

[0100] Step S314: Update the processing delay statistics of the same type of requests, including the average and median of the delay.

[0101] In a specific embodiment, the flow chart of the data flow limiting method is as follows: Figure 4 The method comprises:

[0102] Step S401, determine whether the received multimedia communication related request is an illegal request, and a non-registered request from an unknown SIP client or a dialog will be determined as an illegal request. If it is an illegal request, execute step S406, otherwise execute step S402.

[0103] Step S402: If it is not an illegal request, determine the possibility of current limiting.

[0104] Step S403, determine whether current limiting may be required, if yes, execute step S404; otherwise, execute step S407.

[0105] Step S404: determine the system overload level. The overload level information includes severe overload or general overload.

[0106] Step S405, determining whether the request needs current limiting under the current overload level, if yes, executing step S406, otherwise executing step S407.

[0107] Step S406, intercept the request.

[0108] Step S407, release the request.

[0109] Corresponding to the application scenario and method of the method provided in the embodiment of the present application, the embodiment of the present application also provides a data flow limiting device. Figure 5 The structure diagram of a data current limiting device according to an embodiment of the present application is shown, and the device includes:

[0110] The acquisition module 501 is used to respond to the multimedia communication related request for the audio and video service platform and acquire the type information and characteristic information of the request method in the multimedia communication related request;

[0111] A determination module 502, configured to determine a first current limiting strategy corresponding to a multimedia communication related request according to the type information and the characteristic information;

[0112] The current limiting module 503 is used to process multimedia communication related requests accordingly according to the first current limiting strategy.

[0113] The present application provides a data flow limiting device, which, in response to a multimedia communication-related request for an audio-visual service platform, obtains type information and feature information of a request method in the multimedia communication-related request; determines a first flow limiting strategy corresponding to the multimedia communication-related request based on the type information and feature information; and processes the multimedia communication-related request accordingly based on the first flow limiting strategy. In this embodiment, a flow limiting strategy is determined based on the type information and feature information of the request method in the multimedia communication-related request, and the multimedia communication-related request is processed accordingly through the flow limiting strategy to ensure the high availability, stability, and security of the audio-visual service platform. Moreover, based on the type information and feature information of the request method, a fine-grained and differentiated flow limiting strategy can be determined to ensure the service quality of the audio-visual service platform.

[0114] In one implementation, the determination module 502 is configured to:

[0115] Pre-acquire response messages of historical multimedia communication related requests;

[0116] If it is determined, based on the type information, the characteristic information and the response message, that the multimedia communication related request has an association relationship with the historical multimedia communication related request, the first current limiting strategy is determined to release the multimedia communication related request.

[0117] In one implementation, the multimedia communication related request includes a session class request in a session initiation protocol SIP request, and the determination module 502 is used to:

[0118] If the type information of the request method is a session confirmation request, the video encoding type is determined according to the characteristic information, where the characteristic information includes the value of a preset field in the request header and the request body of the request method;

[0119] If the type information of the request method is a session establishment request, determining the video encoding type according to the type information;

[0120] According to the video encoding type, the allocated bandwidth of the session establishment request or the session confirmation request is determined. If the allocated bandwidth exceeds the preconfigured bandwidth threshold, the first current limiting strategy is determined to intercept session class requests.

[0121] In one implementation, the device is further configured to:

[0122] If it is determined according to the characteristic information that the allocated bandwidth of the session establishment request or the session confirmation request does not exceed the preconfigured bandwidth threshold, and the average processing delay of the session establishment request or the session confirmation request within the preset time period exceeds the preset time threshold, the first flow limiting strategy is determined to intercept session class requests.

[0123] In one implementation, the multimedia communication related request includes a non-session type request in a session initiation protocol SIP request, and the device is further configured to:

[0124] Non-session requests include multiple types of request methods. If it is determined according to the type information that the query rates per second corresponding to the multiple types of request methods respectively exceed the corresponding query rate thresholds, the first current limiting strategy is determined to intercept non-session requests.

[0125] In one implementation, the device is further configured to:

[0126] If it is determined according to the type information that the query rates per second corresponding to the multiple types of request methods do not exceed the corresponding query rate thresholds, and the average processing delays corresponding to the multiple types of request methods within the preset time period exceed the preset time threshold, the first current limiting strategy is determined to intercept non-session requests.

[0127] In one implementation, the current limiting module 503 is used to:

[0128] If the first current limiting strategy is to intercept multimedia communication related requests, then determining overload degree information;

[0129] Determine a second current limiting strategy corresponding to the multimedia communication related request according to the type information, the feature information and the overload degree information;

[0130] According to the second current limiting strategy, multimedia communication related requests are processed accordingly.

[0131] In one implementation, the multimedia communication related request includes a session class request in a session initiation protocol SIP request, and when determining the overload degree information, the device is configured to:

[0132] If the allocated bandwidth requested by the session class exceeds the preconfigured bandwidth threshold, the overload degree information is determined as severe overload.

[0133] In one implementation, the device is further configured to:

[0134] If the type information is any one of a session establishment request, a session confirmation request, and a playback control request, and the overload degree information is a severe overload, the second current limiting strategy is determined to intercept session class requests.

[0135] In one implementation, the multimedia communication related request includes a non-session type request in a session initiation protocol SIP request, and when determining the overload degree information, the device is configured to:

[0136] If the query rate per second of non-session requests exceeds the corresponding query rate threshold, and the average processing delay of non-session requests exceeds the preset time threshold, the overload degree information is determined as severe overload.

[0137] In one implementation, the device is further configured to:

[0138] If the type information is any one of a subscription request, a notification request, and a message request, and the overload degree information is a severe overload, the second current limiting strategy is determined to intercept non-session requests.

[0139] In one implementation, the multimedia communication related request includes a non-session type request in a session initiation protocol SIP request, and the device determines the second current limiting strategy corresponding to the multimedia communication related request according to the type information, the feature information and the overload degree information, and is used to:

[0140] If the type information is a registration request or a message request, the second current limiting strategy is determined to intercept or release non-session requests according to the characteristic information and overload degree information corresponding to the registration request or the message request respectively.

[0141] The functions of each module in each device in the embodiments of the present application can be found in the corresponding description in the above method, and have corresponding beneficial effects, which will not be repeated here.

[0142] Figure 6 FIG. 1 is a block diagram of an electronic device used to implement an embodiment of the present application. Figure 6 As shown, the electronic device includes: a memory 610 and a processor 620. The memory 610 stores a computer program that can be run on the processor 620. When the processor 620 executes the computer program, the method in the above embodiment is implemented. The number of the memory 610 and the processor 620 can be one or more.

[0143] The electronic device also includes:

[0144] The communication interface 630 is used to communicate with external devices and perform data exchange transmission.

[0145] If the memory 610, the processor 620 and the communication interface 630 are implemented independently, the memory 610, the processor 620 and the communication interface 630 can be connected to each other through a bus and communicate with each other. The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus. The bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 6 Only one thick line is used in the diagram, but this does not mean that there is only one bus or only one type of bus.

[0146] Optionally, in a specific implementation, if the memory 610, the processor 620 and the communication interface 630 are integrated on a chip, the memory 610, the processor 620 and the communication interface 630 can communicate with each other through an internal interface.

[0147] An embodiment of the present application provides a computer-readable storage medium storing a computer program, which implements the method provided in the embodiment of the present application when the program is executed by a processor.

[0148] An embodiment of the present application also provides a chip, which includes a processor for calling and executing instructions stored in the memory from the memory, so that a communication device equipped with the chip executes the method provided by the embodiment of the present application.

[0149] An embodiment of the present application also provides a chip, including: an input interface, an output interface, a processor and a memory, wherein the input interface, the output interface, the processor and the memory are connected via an internal connection path, and the processor is used to execute the code in the memory. When the code is executed, the processor is used to execute the method provided in the embodiment of the application.

[0150] It should be understood that the processor may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc. It is worth noting that the processor may be a processor supporting the Advanced RISC Machines (ARM) architecture.

[0151] Further, optionally, the above-mentioned memory may include a read-only memory and a random access memory. The memory may be a volatile memory or a non-volatile memory, or may include both volatile and non-volatile memory. Among them, the non-volatile memory may include a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory may include a random access memory (RAM), which is used as an external cache. By way of exemplary but not limiting description, many forms of RAM are available. For example, static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM) and direct memory bus random access memory (DR RAM).

[0152] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function according to the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium.

[0153] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present application. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner. In addition, those skilled in the art may combine and combine different embodiments or examples described in this specification and the features of different embodiments or examples, unless they are contradictory.

[0154] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Therefore, a feature defined as "first" or "second" may explicitly or implicitly include at least one of the features. In the description of this application, the meaning of "plurality" is two or more, unless otherwise clearly and specifically defined.

[0155] Any process or method described in the flow chart or otherwise described herein can be understood as a module, fragment or portion of a code representing one or more executable instructions for implementing the steps of a specific logical function or process. And the scope of the preferred embodiment of the present application includes other implementations, in which the functions may not be performed in the order shown or discussed, including in a substantially simultaneous manner or in a reverse order according to the functions involved.

[0156] The logic and / or steps described in the flowchart or otherwise described herein, for example, can be considered as an ordered list of executable instructions for implementing logical functions, which can be specifically implemented in any computer-readable medium for use by an instruction execution system, device or apparatus (such as a computer-based system, a system including a processor, or other system that can fetch instructions from an instruction execution system, device or apparatus and execute instructions), or used in combination with these instruction execution systems, devices or apparatuses.

[0157] It should be understood that the various parts of the present application can be implemented with hardware, software, firmware or a combination thereof. In the above embodiments, multiple steps or methods can be implemented with software or firmware stored in a memory and executed by a suitable instruction execution system. All or part of the steps of the above embodiment method can be completed by instructing the relevant hardware through a program, which can be stored in a computer-readable storage medium, and when the program is executed, it includes one of the steps of the method embodiment or a combination thereof.

[0158] In addition, each functional unit in each embodiment of the present application can be integrated into a processing module, or each unit can exist physically separately, or two or more units can be integrated into one module. The above-mentioned integrated module can be implemented in the form of hardware or in the form of a software functional module. If the above-mentioned integrated module is implemented in the form of a software functional module and sold or used as an independent product, it can also be stored in a computer-readable storage medium. The storage medium can be a read-only memory, a disk or an optical disk, etc.

[0159] The above is only an exemplary embodiment of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of various changes or substitutions within the technical scope recorded in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application shall be based on the protection scope of the claims.

Claims

1. A data flow limiting method, characterized in that: The method comprises: In response to a multimedia communication related request for an audiovisual service platform, obtaining type information and characteristic information of a request method in the multimedia communication related request; the characteristic information includes a value of a preset field in a request header and a request body of the request method; The multimedia communication related request includes a session class request in a session initiation protocol SIP request, and a first current limiting strategy corresponding to the multimedia communication related request is determined according to the type information and the characteristic information, including: if the type information of the request method is a session confirmation request, the video encoding type is determined according to the characteristic information, and the characteristic information includes the value of a preset field in the request header and request body of the request method; if the type information of the request method is a session establishment request, the video encoding type is determined according to the type information; according to the video encoding type, the allocated bandwidth of the session establishment request or the session confirmation request is determined, and if the allocated bandwidth exceeds a preconfigured bandwidth threshold, the first current limiting strategy is determined to intercept the session class request; if the allocated bandwidth does not exceed the preconfigured bandwidth threshold, and the average processing delay of the session establishment request or the session confirmation request within a preset time period exceeds a preset time threshold, the first current limiting strategy is determined to intercept the session class request; According to the first current limiting strategy, the multimedia communication related request is processed accordingly.

2. The method according to claim 1, characterized in that The determining, according to the type information and the characteristic information, a first current limiting strategy corresponding to the multimedia communication related request includes: Pre-acquire response messages of historical multimedia communication related requests; If it is determined, based on the type information, the characteristic information and the response message, that the multimedia communication related request has an association relationship with the historical multimedia communication related request, the first current limiting strategy is determined to release the multimedia communication related request.

3. The method according to claim 1, characterized in that The multimedia communication related request also includes a non-session type request in a session initiation protocol SIP request, and the method includes: The non-session type requests include multiple types of request methods. If it is determined according to the type information that the query rates per second corresponding to the multiple types of request methods respectively exceed the corresponding query rate thresholds, the first current limiting strategy is determined to intercept the non-session type requests.

4. The method according to claim 3, characterized in that The multimedia communication related request also includes a non-session type request in a session initiation protocol SIP request, and the method further includes: If it is determined according to the type information that the query rates per second corresponding to the multiple types of request methods do not exceed the corresponding query rate thresholds, and the average processing delays corresponding to the multiple types of request methods within the preset time period exceed the preset time threshold, then the first current limiting strategy is determined to intercept the non-session requests.

5. The method according to claim 1, characterized in that The corresponding processing of the multimedia communication related request according to the first current limiting strategy includes: If the first current limiting strategy is to intercept the multimedia communication related request, determining the overload degree information; Determine a second current limiting strategy corresponding to the multimedia communication related request according to the type information, the characteristic information and the overload degree information; According to the second current limiting strategy, the multimedia communication related request is processed accordingly.

6. The method according to claim 5, characterized in that The multimedia communication related request includes a session class request in a session initiation protocol SIP request, and the information on determining the overload degree includes: If the allocated bandwidth requested by the session class exceeds a preconfigured bandwidth threshold, the overload degree information is determined as severe overload.

7. The method according to claim 6, characterized in that The method further comprises: If the type information is any one of a session establishment request, a session confirmation request and a playback control request, and the overload degree information is a severe overload, the second current limiting strategy is determined to intercept the session type request.

8. The method according to claim 5, characterized in that The multimedia communication related request includes a non-session type request in a session initiation protocol SIP request, and the information on determining the overload degree includes: If the query rate per second of the non-session type requests exceeds the corresponding query rate threshold, and the average processing delay of the non-session type requests exceeds the preset time threshold, the overload degree information is determined as severe overload.

9. The method according to claim 8, characterized in that The method further comprises: If the type information is any one of a subscription request, a notification request, and a message request, and the overload degree information is a severe overload, the second current limiting strategy is determined to intercept the non-session request.

10. The method according to claim 5, characterized in that The multimedia communication related request includes a non-session type request in a session initiation protocol SIP request, and determining the second current limiting strategy corresponding to the multimedia communication related request according to the type information, the feature information and the overload degree information includes: If the type information is a registration request or a message request, the second current limiting strategy is determined to intercept or release the non-session request according to the characteristic information and overload degree information corresponding to the registration request or the message request respectively.

11. A data current limiting device, characterized in that: The device comprises: An acquisition module, for responding to a multimedia communication related request for an audio-visual service platform, and acquiring type information and characteristic information of a request method in the multimedia communication related request; the characteristic information includes a value of a preset field in a request header and a request body of the request method; A determination module, configured to determine a first current limiting strategy corresponding to the multimedia communication related request according to the type information and the characteristic information; the multimedia communication related request includes a session class request in a session initiation protocol SIP request, and the first current limiting strategy corresponding to the multimedia communication related request according to the type information and the characteristic information includes: if the type information of the request method is a session confirmation request, determining a video encoding type according to the characteristic information, the characteristic information including the value of a preset field in a request header and a request body of the request method; if the type information of the request method is a session establishment request, determining the video encoding type according to the type information; determining an allocated bandwidth for the session establishment request or the session confirmation request according to the video encoding type, and if the allocated bandwidth exceeds a preconfigured bandwidth threshold, determining the first current limiting strategy as intercepting the session class request; if the allocated bandwidth does not exceed the preconfigured bandwidth threshold, and the average processing delay of the session establishment request or the session confirmation request within a preset time period exceeds a preset time threshold, determining the first current limiting strategy as intercepting the session class request; The current limiting module is used to process the multimedia communication related requests accordingly according to the first current limiting strategy.

12. An electronic device, characterized in that: The method comprises a memory, a processor and a computer program stored in the memory, wherein the processor implements the method according to any one of claims 1 to 10 when executing the computer program.

Citation Information

Patent Citations

  • Overload coutrol method for next generation network

    CN1852301A

  • Methods, systems, and computer readable media for session initiation protocol (SIP) overload control

    US20090310484A1

  • Session initiation protocol (SIP) for message throttling

    US20140006630A1