CN115733803A - Data current limiting method and device, electronic equipment and storage medium - Google Patents
Data current limiting method and device, electronic equipment and storage medium Download PDFInfo
- Publication number
- CN115733803A CN115733803A CN202211611001.0A CN202211611001A CN115733803A CN 115733803 A CN115733803 A CN 115733803A CN 202211611001 A CN202211611001 A CN 202211611001A CN 115733803 A CN115733803 A CN 115733803A
- Authority
- CN
- China
- Prior art keywords
- request
- multimedia communication
- current limiting
- session
- information
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
Images
Landscapes
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
Description
技术领域technical field
本申请涉及云计算技术领域,尤其涉及一种数据限流方法、装置、电子设备及存储介质。The present application relates to the technical field of cloud computing, and in particular to a data current limiting method, device, electronic equipment and storage medium.
背景技术Background technique
目前,在城市大脑、城市治理、智慧交通等安防相关领域,随着接入的视音频采集设备规模不断扩大,为了方便视音频服务平台以中心化的方式进行统一管理和调度,不仅需要能够满足不同的交付部署场景(公有云、专有云)下大量视音频采集设备的稳定接入,还要能够在视音频服务平台实现摄像头的并发直播、控制、设备管理等需求。At present, in security-related fields such as city brain, urban governance, and smart transportation, as the scale of connected video and audio collection equipment continues to expand, in order to facilitate unified management and scheduling of video and audio service platforms in a centralized manner, not only needs to be able to meet The stable access of a large number of video and audio acquisition devices under different delivery and deployment scenarios (public cloud and private cloud) must also be able to realize concurrent live broadcast, control, and device management of cameras on the video and audio service platform.
基于上述背景,各大视频安防厂商以及云厂商推出了大量面向视音频采集设备接入管控的视音频服务平台,但是,现有的视音频服务平台更多的关注于视音频协议支持的完整性,以及厂商碎片化支持的多样性,对于整个视音频服务平台的高可用性、稳定性和安全性考虑较少,而这些因素会随着视音频服务平台的使用量日渐增长变得更加严重和凸显。因此,需要一种解决方案以保障视音频服务平台的高可用性、稳定性和安全性。Based on the above background, major video security manufacturers and cloud vendors have launched a large number of video and audio service platforms for access control of video and audio acquisition equipment. However, the existing video and audio service platforms pay more attention to the integrity of video and audio protocol support , and the diversity of manufacturers' fragmented support, there is less consideration for the high availability, stability and security of the entire audio-visual service platform, and these factors will become more serious and prominent as the usage of the audio-visual service platform grows day by day . Therefore, a solution is needed to ensure the high availability, stability and security of the AV service platform.
发明内容Contents of the invention
本申请实施例提供一种数据限流方法、装置、电子设备及存储介质,以保障视音频服务平台的高可用性、稳定性和安全性。Embodiments of the present application provide a data current limiting method, device, electronic equipment, and storage medium to ensure high availability, stability, and security of an audio-visual service platform.
第一方面,本申请实施例提供了一种数据限流方法,该方法包括:In the first aspect, the embodiment of the present application provides a method for data current limiting, the method includes:
响应于针对视音频服务平台的多媒体通信相关请求,获取多媒体通信相关请求中的请求方法的类型信息和特征信息;Responding to the multimedia communication-related request for the audio-visual service platform, obtaining the type information and characteristic information of the request method in the multimedia communication-related request;
根据类型信息和特征信息,确定多媒体通信相关请求对应的第一限流策略;According to the type information and the feature information, determine the first current limiting policy corresponding to the multimedia communication related request;
根据第一限流策略,对多媒体通信相关请求进行相应的处理。According to the first current limiting strategy, corresponding processing is performed on multimedia communication-related requests.
第二方面,本申请实施例提供了一种数据限流装置,该装置包括:In the second aspect, the embodiment of the present application provides a data current limiting device, which includes:
获取模块,用于响应于针对视音频服务平台的多媒体通信相关请求,获取多媒体通信相关请求中的请求方法的类型信息和特征信息;An acquisition module, configured to acquire the type information and feature information of the request method in the multimedia communication related request in response to the multimedia communication related request for the video and audio service platform;
确定模块,用于根据类型信息和特征信息,确定多媒体通信相关请求对应的第一限流策略;A determining module, configured to determine a first current limiting strategy corresponding to a multimedia communication-related request according to type information and feature information;
限流模块,用于根据第一限流策略,对多媒体通信相关请求进行相应的处理。The current limiting module is configured to process corresponding requests related to multimedia communication according to the first current limiting policy.
第三方面,本申请实施例提供了一种电子设备,包括存储器、处理器及存储在存储器上的计算机程序,处理器在执行所述计算机程序时实现上述任一项所述的方法。In a third aspect, an embodiment of the present application provides an electronic device, including a memory, a processor, and a computer program stored on the memory, and the processor implements the method described in any one of the above when executing the computer program.
第四方面,本申请实施例提供了一种计算机可读存储介质,所述计算机可读存储介质内存储有计算机程序,所述计算机程序被处理器执行时实现上述任一项所述的方法。In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, where a computer program is stored in the computer-readable storage medium, and when the computer program is executed by a processor, the method described in any one of the foregoing is implemented.
与现有技术相比,本申请具有如下优点:Compared with the prior art, the present application has the following advantages:
本申请提供了一种数据限流方法、装置、电子设备及存储介质,响应于针对视音频服务平台的多媒体通信相关请求,获取多媒体通信相关请求中的请求方法的类型信息和特征信息;根据类型信息和特征信息,确定多媒体通信相关请求对应的第一限流策略;根据第一限流策略,对多媒体通信相关请求进行相应的处理。本实施例中,根据多媒体通信相关请求中的请求方法的类型信息和特征信息确定限流策略,通过限流策略对多媒体通信相关请求进行相应的处理,以实现保障视音频服务平台的高可用性、稳定性和安全性。而且,根据请求方法的类型信息和特征信息,可以确定细粒度的和差异化的限流策略,以保障视音频服务平台的服务质量。The present application provides a data current limiting method, device, electronic equipment and storage medium, in response to a multimedia communication-related request for an audio-visual service platform, to obtain the type information and characteristic information of the request method in the multimedia communication-related request; according to the type Information and characteristic information, determine the first current limiting policy corresponding to the request related to multimedia communication; according to the first current limiting policy, perform corresponding processing on the request related to multimedia communication. In this embodiment, the current limiting strategy is determined according to the type information and characteristic information of the request method in the multimedia communication-related request, and the multimedia communication-related request is processed correspondingly through the current limiting strategy, so as to ensure the high availability of the video and audio service platform, Stability and security. Moreover, according to the type information and feature information of the request method, a fine-grained and differentiated traffic limiting strategy can be determined to ensure the service quality of the video and audio service platform.
上述说明仅是本申请技术方案的概述,为了能够更清楚了解本申请的技术手段,可依照说明书的内容予以实施,并且为了让本申请的上述和其他目的、特征和优点能够更明显易懂,以下特举本申请的具体实施方式。The above description is only an overview of the technical solution of the present application. In order to understand the technical means of the present application more clearly, it can be implemented according to the contents of the description, and in order to make the above and other purposes, features and advantages of the present application more obvious and understandable, Specific embodiments of the present application are enumerated below.
附图说明Description of drawings
在附图中,除非另外规定,否则贯穿多个附图相同的附图标记表示相同或相似的部件或元素。这些附图不一定是按照比例绘制的。应该理解,这些附图仅描绘了根据本申请的一些实施方式,而不应将其视为是对本申请范围的限制。In the drawings, unless otherwise specified, the same reference numerals designate the same or similar parts or elements throughout the several drawings. The drawings are not necessarily drawn to scale. It should be understood that these drawings only depict some implementations according to the application, and should not be considered as limiting the scope of the application.
图1为本申请提供的数据限流方法的一个应用场景示意图;FIG. 1 is a schematic diagram of an application scenario of the data current limiting method provided by the present application;
图2为本申请一实施例的数据限流方法的流程图;FIG. 2 is a flowchart of a data current limiting method according to an embodiment of the present application;
图3是本申请一实施例的对于SIP请求和响应消息进行分析的流程图;Fig. 3 is a flowchart of analyzing SIP request and response messages according to an embodiment of the present application;
图4是本申请一实施例的数据限流方法的流程图;FIG. 4 is a flowchart of a data current limiting method according to an embodiment of the present application;
图5是本申请一实施例的数据限流装置的结构框图;以及FIG. 5 is a structural block diagram of a data current limiting device according to an embodiment of the present application; and
图6为用来实现本申请实施例的电子设备的框图。FIG. 6 is a block diagram of an electronic device used to implement an embodiment of the present application.
具体实施方式Detailed ways
在下文中,仅简单地描述了某些示例性实施例。正如本领域技术人员可认识到的那样,在不脱离本申请的构思或范围的情况下,可通过各种不同方式修改所描述的实施例。因此,附图和描述被认为本质上是示例性的,而非限制性的。In the following, only some exemplary embodiments are briefly described. As those skilled in the art would realize, the described embodiments may be modified in various different ways, all without departing from the spirit or scope of the present application. Accordingly, the drawings and descriptions are to be regarded as illustrative in nature, and not restrictive.
为便于理解本申请实施例的技术方案,以下对本申请实施例的相关技术进行说明。以下相关技术作为可选方案与本申请实施例的技术方案可以进行任意结合,其均属于本申请实施例的保护范围。In order to facilitate understanding of the technical solutions of the embodiments of the present application, the related technologies of the embodiments of the present application are described below. The following related technologies may be optionally combined with the technical solutions of the embodiments of the present application as optional solutions, and all of them belong to the protection scope of the embodiments of the present application.
视频服务平台自身同时承载了实时直播、录像回放、视频下载、设备注册、事件订阅和设备控制等结构化数据和非结构化数据的服务功能,对于服务的稳定性、可用性相比一般的网页服务器具有更高的要求。但是整个平台和网络的容量是有限的,既要满足接入的大量设备不同的服务处理和传输请求流量,还要能够抵挡暴露在公网后很有可能出现的恶意攻击流量。有鉴于此,视频服务平台迫切需要一个符合其通信协议和服务特征的限流方案,在访问的请求即将或已经造成整个视音频服务平台(网络带宽)接近容量阈值时,能够及时采取限流措施,从而实现对于视频服务平台的保护,保障视频服务平台整体的可用性和服务质量。The video service platform itself carries the service functions of structured data and unstructured data such as real-time live broadcast, video playback, video download, device registration, event subscription, and device control. Compared with general web servers, the stability and availability of services have higher requirements. 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 resist malicious attack traffic that is likely to appear after being exposed to the public network. In view of this, the video service platform urgently needs a flow-limiting scheme that conforms to its communication protocol and service characteristics, and can take timely flow-limiting measures when the access request is about to cause or has already caused the entire video-audio service platform (network bandwidth) to approach the capacity threshold , so as to realize the protection of the video service platform and ensure the overall availability and service quality of the video service platform.
相关技术中,通过视音频服务平台中的服务器在响应消息的响应头中携带自定义的响应头来表明服务器出现过载的情况,然后客户端根据该显式的过载指示信息,通过重传、超时等待等手段来降低该客户端对视音频服务平台的请求压力。然而,该方案依赖于客户端的支持,客户端需要定制化改造。而且,该方案依赖于服务器返回额外的过载指示信息,一方面需要对现有的服务器的协议栈进行改动;另一方面,由于服务器需要对每个请求进行响应,才能确保每个客户端都能了解服务器的负载情况,服务器很可能在自身已经过载的情况下,回复每个响应消息,这样会进一步加剧网络的拥塞,耗费网络的带宽,更进一步降低视频服务平台整体的吞吐量。另外,该方案在实际应用中存在安全性和公平性问题,因为该方案依赖于客户端的主动控制,对于部分未解析响应头的客户端,或者可以直接忽略的“恶意”攻击者,该方案无法进行限流,会造成“恶意”攻击者的客户端抢占了“合法”客户端本来能够占用的服务器资源和网络带宽。In the related technology, 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 sends the message through retransmission and timeout according to the explicit overload indication information. Wait and other means to reduce the client's request pressure on the video and audio service platform. 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. On the one hand, the protocol stack of the existing server needs to be changed; on the other hand, since the server needs to respond to each request, it can 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. This will further aggravate network congestion, consume network bandwidth, and further reduce the overall throughput of the video service platform. In addition, there are security and fairness problems in the practical application of this scheme, because the scheme relies on the active control of the client. For some clients that do not parse the response header, or the "malicious" attackers that can be ignored directly, the scheme cannot Limiting traffic will cause the "malicious" attacker's client to seize the server resources and network bandwidth that the "legitimate" client could have occupied.
有鉴于此,本申请实施例提供了一种数据限流方法,图1为本申请提供的数据限流方法的一个应用场景示意图。如图1所示,本实施例提供的数据限流方法可以通过限流系统的形式来实现。限流系统可以单独部署在一个服务器中,也可以部署在视音频服务平台的服务器中。本实施例中,视音频服务平台为GB28181平台,GB28181平台是指支持GB28181标准的图像采集设备的接入平台,GB28181标准是为了规范安防领域各厂商的摄像头能够互联互通而联合众多厂商推出的通信标准,主要内容包括了负责传输控制信令的会话初始协议(Session Initiation Protocol,SIP)和负责流媒体传输的实时传输协议(RealtimeTransport Protocol,RTP)/实时传输控制协议(Realtime Transport Control Protocol,RTCP)。GB28181平台可以包括多个SIP服务器构成的服务器集群(也可以是一个SIP服务器),以及流媒体服务器集群(也可以是一个流媒体服务器)。In view of this, an embodiment of the present application provides a data current limiting method, and FIG. 1 is a schematic diagram of an application scenario of the data current limiting method provided in this application. As shown in FIG. 1 , the data current limiting method provided in this embodiment can be implemented in the form of a current limiting system. The current limiting system can be deployed in a server alone, or in the server of the video and audio service platform. In this embodiment, the video and audio service platform is the GB28181 platform, and the GB28181 platform refers to the access platform of the image acquisition equipment that supports the GB28181 standard. Standard, the main content includes the Session Initiation Protocol (Session Initiation Protocol, SIP) responsible for transmission control signaling and the Realtime Transport Protocol (RealtimeTransport Protocol, RTP)/Realtime Transport Control Protocol (Realtime Transport Control Protocol, RTCP) responsible for streaming media transmission . The GB28181 platform can include a server cluster composed 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).
其中,限流系统包括:SIP请求解析模块、数据采集分析模块、SIP响应解析模块和限流决策模块。Wherein, the current limiting system includes: a SIP request analysis module, a data collection and analysis module, a SIP response analysis module and a current limiting decision module.
SIP请求解析模块用于接收客户端发送的SIP请求(如图1中所示的“外部SIP请求”),对SIP请求进行解析,得到SIP请求中的客户端标识、请求方法的类型信息和特征信息、SIP事务和SIP对话。其中,SIP请求中的请求方法可以包括会话类请求和非会话类请求。会话类请求的类型信息可以包括:会话建立请求INVITE,用于建立音视频会话连接;会话确认请求ACK,用于INVITE请求的确认;会话结束请求BYE,用于断开INVITE请求建立的会话连接;回放控制请求INFO,用于进行历史视音频的回放控制。非会话类请求的类型信息可以包括:订阅类请求SUBSCRIBE,用于向事件源订阅事件,向目录所有者订阅目录;通知类请求NOTIFY,用于事件源向事件观察者通知事件发生,目录拥有者向目录接受者通知目录变化;消息类请求MESSAGE,用于实现前端设备控制、报警事件通知和分发、设备信息查询、设备状态信息报送、音视频文件的检索;登记类请求REGISTER,用于设备的注册和注销。The SIP request parsing module is used to receive the SIP request sent by the client ("external SIP request" as shown in Figure 1), parse the SIP request, and obtain the client identification, type information and characteristics of the request method in the SIP request Messages, SIP transactions and SIP conversations. Wherein, the request method in the SIP request may include a session request and a non-session request. The type information of the session request may include: a session establishment request INVITE, used to establish an audio and video session connection; a session confirmation request ACK, used to confirm the INVITE request; a session end request BYE, used to disconnect the session connection established by the INVITE request; Playback control request INFO, used for playback control of historical video and audio. The type information of non-session requests can include: Subscription class request SUBSCRIBE, which is used to subscribe events to the event source and directory owner to subscribe to the directory; notification class request NOTIFY, which is used for the event source to notify the event observer of the event occurrence, and the directory owner Notify catalog recipients of catalog changes; message type request MESSAGE, used to realize front-end equipment control, alarm event notification and distribution, equipment information query, equipment status information submission, audio and video file retrieval; registration type request REGISTER, used for equipment registration and deregistration.
SIP响应解析模块用于接收GB28181平台返回的历史SIP请求的SIP响应消息,提取响应消息中的状态码、SIP事务和SIP对话,并向客户端返回SIP响应消息。The SIP response analysis 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.
数据采集分析模块用于根据SIP请求和GB28181平台返回的响应消息形成SIP请求/响应的数据采集闭环,包括:SIP事务、SIP对话,成功注册/半注册/注销的客户端标识,多响应关联等原始数据,以及据此分析得到的带宽占用、瞬时每秒查询率(Queries-per-second,QPS)、请求/响应延时等特征信息。将这些数据存入数据库,提供给限流决策模块使用。The data collection and analysis module is used to form a SIP request/response data collection closed loop according to the SIP request and the response message returned by the GB28181 platform, including: SIP transactions, SIP conversations, successful registration/semi-registration/deregistration client identification, multi-response association, etc. Raw data, as well as characteristic information such as bandwidth usage, instantaneous query rate per second (Queries-per-second, QPS), request/response delay, etc. obtained through analysis. These data are stored in the database and provided to the current limiting decision-making module.
限流决策模块用于根据SIP请求信息、数据库中提取的带宽资源使用量、SIP事务、SIP对话和用户预先配置的多种阈值信息,综合判定是否对当前SIP请求采取限流措施,以及采取何种限流策略进行相应处理,即拦截SIP请求或者放行SIP请求至SIP服务器。流媒体服务器用于根据SIP服务器发送的视音频数据获取请求,将视音频数据发送至客户端。其中,一个SIP事务由单个SIP请求和这个请求的所有响应消息组成,这些响应消息包含了0到N个中间响应(例如,状态码为1xx等),和一个最终响应(例如,状态码为2xx、3xx、4xx、5xx或者6xx等)。同一个事务的请求和响应消息头中的Via头域的branch字段值相同。一个SIP对话由SIP服务器和客户端之间的一系列用于建立会话、终止会话的事务有关。例如,针对某个设备从开始实时点播视音频到结束实时点播,通常涉及INVITE、ACK、BYE等多个请求方法,但是都属于一个对话。同一个对话可以通过请求和响应头的会话标识Call-ID值、From头域的tag值和To头域的tag值三个值来唯一标识。The current-limiting decision-making module is used to comprehensively determine whether to take current-limiting measures for the current SIP request based on the SIP request information, the bandwidth resource usage extracted from the database, SIP transactions, SIP conversations, and various threshold information pre-configured by users, and what measures to take. A traffic-limiting strategy is used to deal with it accordingly, that is, to intercept SIP requests or release SIP requests to the SIP server. The streaming media server is used to send the video and audio data to the client according to the video and audio 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, these response messages include 0 to N intermediate responses (for example, the status code is 1xx, etc.), and a final response (for example, the status code is 2xx , 3xx, 4xx, 5xx or 6xx, etc.). The value of the branch field in the Via header field in the request and response message headers of the same transaction is the same. A SIP conversation is related to a series of transactions between a SIP server and a client for establishing a session and terminating a session. For example, for a certain device, multiple request methods such as INVITE, ACK, and BYE are usually involved, but they all belong to one dialog. The same dialog can be uniquely identified by three values: the session identifier Call-ID value in the request and response headers, the tag value in the From header field, and the tag value in the To header field.
本实施例中,根据SIP请求中的请求方法的类型信息和特征信息确定限流策略,通过限流策略对SIP请求进行相应的处理,可以实现保护GB28181平台,避免出现性能下降和拒绝服务(Deny-Of-Service,DOS)风险,确保GB28181平台的资源得到充分利用。而且,根据请求方法的类型信息和特征信息,确定细粒度的和差异化的限流策略,可以通过拦截请求的方式,提前实现SIP服务器的过载控制。In this embodiment, the current limiting policy is determined according to the type information and feature information of the request method in the SIP request, and the SIP request is processed accordingly through the current limiting policy, so as to protect the GB28181 platform and avoid performance degradation and denial of service (Deny -Of-Service, DOS) risk, to ensure that the resources of the GB28181 platform are fully utilized. Moreover, according to the type information and feature information of the request method, a fine-grained and differentiated current limiting strategy can be determined, and the overload control of the SIP server can be realized in advance by intercepting the request.
而且,本实施例中,通过在服务器端拦截请求,无需客户端进行调整或者定制化去适配服务器的自定义头,由于是独立的限流系统,现有的服务器也可以无需改造。通过拦截请求的方式来让客户端隐式的感知到服务器过载(例如,客户端感知到请求超时),而非显式的响应每个请求,不会加剧网络的拥塞和服务器资源的消耗。对于“恶意”攻击者的客户端的接入,限流系统由于能够对未知客户端的SIP请求进行拦截限制,可以避免大量攻击者进行注册,进而解决了安全性和公平性的问题。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 requests, the client implicitly perceives that the server is overloaded (for example, the client perceives a request timeout), rather than explicitly responding to each request, which will not increase network congestion and server resource consumption. For the access of clients 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.
本申请实施例提供了一种数据限流方法,本实施例中的方法可以应用计算设备中,计算设备可以包括:服务器等。如图2所示为本申请一实施例的数据限流方法的流程图,该方法,包括:An embodiment of the present application provides a method for limiting data traffic. The method in this embodiment can be applied to a computing device, and the computing device may include: a server and the like. As shown in Figure 2, it is a flowchart of a data current limiting method according to an embodiment of the present application. The method includes:
步骤S201,响应于针对视音频服务平台的多媒体通信相关请求,获取多媒体通信相关请求中的请求方法的类型信息和特征信息。Step S201, in response to a multimedia communication-related request for an audio-visual service platform, acquire type information and feature information of a request method in a multimedia communication-related request.
步骤S202,根据类型信息和特征信息,确定多媒体通信相关请求对应的第一限流策略。Step S202, according to the type information and feature information, determine a first traffic limiting policy corresponding to a request related to multimedia communication.
步骤S203,根据第一限流策略,对多媒体通信相关请求进行相应的处理。Step S203, according to the first current limiting policy, corresponding processing is performed on the request related to the multimedia communication.
其中,执行主体可以为服务器。多媒体通信相关请求表示利用多媒体通信协议进行通信相关的请求,例如,SIP请求等。Wherein, the execution subject may be a server. The multimedia communication-related request indicates a communication-related request using a multimedia communication protocol, for example, a SIP request and the like.
视音频服务平台中的服务器接收到多媒体通信相关请求之后,对多媒体通信相关请求进行解析,得到多媒体通信相关请求中的请求方法的类型信息和特征信息。多媒体通信相关请求的格式包括请求行、请求头和请求体。服务器解析请求行可以得到请求方法的类型信息,解析请求头和请求体可以得到请求方法的特征信息,特征信息包括请求头和请求体中预设字段的值,不同的请求方法请求头和请求体中预设字段的值可能不同。After receiving the multimedia communication-related request, the server in the video-audio service platform parses the multimedia communication-related request to obtain the type information and feature information of the request method in the multimedia communication-related request. The format of multimedia communication-related requests includes request line, request header and request body. The server can get the type information of the request method by parsing the request line, and can get the characteristic information of the request method by parsing the request header and the request body. The characteristic information includes the value of the preset field in the request header and the request body, and the request header and the request body of different request methods The value of the preset field in may vary.
根据请求方法的类型信息和特征信息,确定多媒体通信相关请求对应的第一限流策略,第一限流策略可以包括对多媒体通信相关请求进行拦截,或者放行多媒体通信相关请求至视音频服务平台。如果放行至视音频服务平台,则视音频服务平台的服务器向客户端返回多媒体通信相关请求对应的响应消息。According to the type information and feature information of the request method, determine the first current limiting policy corresponding to the multimedia communication related request, the first current limiting policy may include intercepting the multimedia communication related request, or releasing the multimedia communication related request to the video and audio service platform. If it is released to the video and audio service platform, the server of the video and audio service platform returns a response message corresponding to the multimedia communication-related request to the client.
本申请提供了一种数据限流方法,响应于针对视音频服务平台的多媒体通信相关请求,获取多媒体通信相关请求中的请求方法的类型信息和特征信息;根据类型信息和特征信息,确定多媒体通信相关请求对应的第一限流策略;根据第一限流策略,对多媒体通信相关请求进行相应的处理。本实施例中,根据多媒体通信相关请求中的请求方法的类型信息和特征信息确定限流策略,通过限流策略对多媒体通信相关请求进行相应的处理,以实现保障视音频服务平台的高可用性、稳定性和安全性。而且,根据请求方法的类型信息和特征信息,可以确定细粒度的和差异化的限流策略,以保障视音频服务平台的服务质量。This application provides a data current limiting method, in response to a multimedia communication-related request for an audio-visual service platform, to obtain the type information and feature information of the request method in the multimedia communication-related request; according to the type information and feature information, determine the multimedia communication A first current limiting policy corresponding to the relevant request; according to the first current limiting policy, corresponding processing is performed on the multimedia communication related request. In this embodiment, the current limiting strategy is determined according to the type information and characteristic information of the request method in the multimedia communication-related request, and the multimedia communication-related request is processed correspondingly through the current limiting strategy, so as to ensure the high availability of the video and audio service platform, Stability and security. Moreover, according to the type information and feature information of the request method, a fine-grained and differentiated traffic limiting strategy can be determined to ensure the service quality of the video and audio service platform.
其中,步骤S202的具体实现方式见如下实施例:Wherein, the specific implementation of step S202 is shown in the following embodiments:
在一种实现方式中,根据类型信息和特征信息,确定多媒体通信相关请求对应的第一限流策略,包括:预先获取历史多媒体通信相关请求的响应消息;若根据类型信息、特征信息和响应消息,确定多媒体通信相关请求与历史多媒体通信相关请求具有关联关系,则将第一限流策略确定为放行多媒体通信相关请求。In an implementation manner, according to the type information and feature information, determining the first current limiting policy corresponding to the multimedia communication-related request includes: pre-obtaining the response message of the historical multimedia communication-related request; if according to the type information, feature information and response message , if it is determined that the multimedia communication-related request has an association relationship with the historical multimedia communication-related request, then the first current limiting policy is determined to allow the multimedia communication-related request.
在实际应用中,预先获取历史多媒体通信相关请求的响应消息,并建立数据库,存储对历史多媒体通信相关请求的响应消息进行解析得到的状态码和头域数据等,以及对多媒体通信相关请求进行解析,根据解析结果可以得到的请求方法的类型信息和特征信息。将请求方法的类型信息和特征信息与响应消息的状态码和头域数据等进行比对,可以确定当前多媒体通信相关请求与历史多媒体通信相关请求是否具有关联关系,即是否为中间态请求。例如,当前多媒体通信相关请求的请求方法的请求头中解析得到的TO字段的tag值,与响应消息的头域数据中的TO字段的tag值相同,则该方法为中间态请求。如果多媒体通信相关请求为中间态请求,则将多媒体通信相关请求放行至视音频服务平台。In practical applications, pre-obtain the response messages of historical multimedia communication-related requests, establish a database, store status codes and header field data obtained by parsing the response messages of historical multimedia communication-related requests, and analyze multimedia communication-related requests , the type information and characteristic information of the request method that can be obtained according to the analysis result. 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 is associated 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 analyzed in the request header of the request method related to the current multimedia communication is the same as the tag value of the TO field in the header field data of the response message, the method is an intermediate request. If the request related to multimedia communication is an intermediate state request, release the request related to multimedia communication to the video and audio service platform.
例如,一次SIP对话过程(例如,从开始查看摄像头直播流,到结束查看)通常需要涉及到SIP客户端(例如,摄像头)和SIP服务器多次请求/响应事务,通过将多媒体通信相关请求解析出的数据和数据库中的响应消息解析出的数据进行比对,可以识别和维护各SIP请求所属的对话和事务,避免出现拦截处于SIP对话和事务的中间态请求,导致已经部分成功的请求最终全部无效,造成机器硬件资源和网络资源的浪费。For example, a SIP dialogue process (for example, from the beginning of viewing the live stream of the camera to the end of viewing) usually needs to involve multiple request/response transactions between the SIP client (for example, the camera) and the SIP server. Comparing the data in the database with the data parsed from the response message in the database, it is possible to identify and maintain the dialogues and transactions to which each SIP request belongs, avoiding interception of intermediate requests in SIP dialogues and transactions, resulting in partially successful requests eventually being all Ineffective, resulting in a waste of machine hardware resources and network resources.
在一种实现方式中,多媒体通信相关请求包括会话初始协议SIP请求中的会话类请求,根据类型信息和特征信息,确定多媒体通信相关请求对应的第一限流策略,包括:In an implementation manner, the multimedia communication-related request includes a session request in the session initiation protocol SIP request, and according to the type information and feature information, determining the first flow-limiting policy corresponding to the multimedia communication-related request includes:
若请求方法的类型信息为会话确认请求,根据特征信息,确定视频编码类型,特征信息包括请求方法的请求头和请求体中预设字段的值;若请求方法的类型信息为会话建立请求,则根据类型信息,确定视频编码类型;根据视频编码类型,确定会话建立请求或会话确认请求的分配带宽,若分配带宽超过预配置的带宽阈值,则将第一限流策略确定为拦截会话类请求。If the type information of the request method is a session confirmation request, determine the video encoding type according to 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, then According to the type information, determine the video coding type; according to the video coding type, determine the allocated bandwidth of the session establishment request or the session confirmation request, if the allocated bandwidth exceeds the pre-configured bandwidth threshold, the first flow limiting strategy is determined as intercepting the session class request.
其中,SIP请求中的请求方法可以包括会话类请求和非会话类请求。会话类请求可以包括:会话建立请求INVITE,会话确认请求ACK,会话结束请求BYE和回放控制请求INFO。非会话类请求可以包括:订阅类请求SUBSCRIBE,通知类请求NOTIFY,消息类请求MESSAGE和登记类请求REGISTER。Wherein, the request method in the SIP request may include a session request and a non-session request. Session requests may include: session establishment request INVITE, session confirmation request ACK, session end request BYE and playback control request INFO. Non-session requests may include: subscription request SUBSCRIBE, notification request NOTIFY, message request MESSAGE and registration request REGISTER.
预先根据用户的配置指令配置视音频服务平台的带宽总量、视音频服务平台的限流带宽阈值、非会话类请求中各类型请求各自对应的每秒查询率阈值和请求响应的延时波动上限等。若根据SIP请求的请求行中解析出的数据确定请求方法为会话确认请求ACK,且根据ACK请求的请求头和请求体中解析出的预设字段的值,确定视频编码类型,根据视频编码类型确定分配带宽,若分配带宽超过预配置的带宽阈值,则拦截SIP请求。若为INVITE请求,则根据类型信息,确定视频编码类型,进而确定分配带宽。其中,分配带宽包括实际分配带宽或预分配带宽中的至少一项;预配置的带宽阈值包括预配置的限流带宽阈值或预配置的带宽总量中的至少一项。Pre-configure the total bandwidth of the video and audio service platform, the bandwidth threshold of the video and audio service platform, the query rate threshold per second corresponding to each type of non-session request, and the upper limit of the delay fluctuation of the request response according to the user's configuration instructions. wait. If the request method is determined as 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 from the request header and request body of the ACK request, and the video encoding type Determine the allocated bandwidth, if the allocated bandwidth exceeds the pre-configured bandwidth threshold, the SIP request will be 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. Wherein, the allocated bandwidth includes at least one of actual allocated bandwidth or pre-allocated bandwidth; the pre-configured bandwidth threshold includes at least one of pre-configured current limiting bandwidth threshold or pre-configured total bandwidth.
在一示例中,如果是ACK请求,特征信息为a字段的负载类型payload type内容,根据payload type内容,可以确定实际传输的视频流编码类型,根据视频编码类型,确定分配带宽。将预分配带宽转变为实际分配带宽,如实际视频编码类型是H265,那么预分配带宽减少4Mbps,实际分配带宽增加2Mbps。如果是INVITE请求,默认后续视频编码类型为H264,分辨率为1080P,新增系统预分配带宽4Mbps。In an example, if it is an ACK request, the feature information is the payload type content of the a field. According to the payload type content, the actual transmitted video stream coding type can be determined, and the allocated bandwidth can be determined according to the video coding type. Change the pre-allocated bandwidth to the actual allocated bandwidth. For example, if the actual video encoding type is H265, then the pre-allocated bandwidth is reduced by 4 Mbps, and the actual allocated bandwidth is increased by 2 Mbps. If it is an INVITE request, the default subsequent video encoding type is H264, the resolution is 1080P, and the newly added system pre-allocated bandwidth is 4Mbps.
可选的,若会话建立请求的实际分配带宽超过预配置的限流带宽阈值,则将第一限流策略确定为拦截会话建立请求。Optionally, if the actual allocated bandwidth of the session establishment request exceeds the pre-configured current limiting bandwidth threshold, the first current limiting policy is determined as intercepting the session establishment request.
可选的,若会话确认请求的实际分配带宽与预分配带宽之和超过预配置的带宽总量,则将第一限流策略确定为拦截会话确认请求。Optionally, if the sum of the actual allocated bandwidth and the pre-allocated bandwidth of the session confirmation request exceeds the total amount of pre-configured bandwidth, the first traffic limiting policy is determined as intercepting the session confirmation request.
在一种实现方式中,该方法还包括:In an implementation manner, the method further includes:
若分配带宽不超过预配置的带宽阈值,且预设时间段内会话建立请求或会话确认请求的平均处理时延超过预设时间阈值,则将第一限流策略确定为拦截该会话类请求。If the allocated bandwidth does not exceed the pre-configured bandwidth threshold, and the average processing delay of the session establishment request or session confirmation request within the preset time period exceeds the preset time threshold, the first traffic limiting policy is determined to intercept the session request.
其中,时间阈值可以是预配置的请求响应的延时波动上限。若会话建立请求或会话确认请求的分配带宽不超过预配置的带宽阈值,且预设时间段内会话建立请求或会话确认请求的平均处理时延不超过延时波动上限,则将第一限流策略确定为放行该会话类请求。Wherein, the time threshold may be a preconfigured upper limit of delay fluctuation of request response. If the allocated bandwidth of the session establishment request or session confirmation request does not exceed the pre-configured bandwidth threshold, and the average processing delay of the session establishment request or session confirmation request within the preset time period does not exceed the upper limit of delay fluctuation, the first flow limit The policy is determined to allow the session request.
在一种实现方式中,多媒体通信相关请求包括会话初始协议SIP请求中的非会话类请求,所述方法还包括:In an implementation manner, the multimedia communication-related request includes a non-session request in a SIP request, and the method further includes:
非会话类请求包括多个类型的请求方法,若根据类型信息确定多个类型的请求方法分别对应的每秒查询率超过相应的查询率阈值,则将第一限流策略确定为拦截非会话类请求。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 multiple types of request methods exceed the corresponding query rate threshold, the first flow limiting strategy is determined to intercept non-session requests. ask.
其中,非会话类请求包括多个类型的请求方法:订阅类请求SUBSCRIBE,通知类请求NOTIFY,消息类请求MESSAGE和登记类请求REGISTER。预先为各类型的请求方法配置各自对应的查询率阈值,若一种请求方法对应的每秒查询率超过相应的查询率阈值,则将第一限流策略确定为拦截该非会话类请求。Among them, non-session requests include multiple types of request methods: subscription request SUBSCRIBE, notification request NOTIFY, message request MESSAGE and registration request REGISTER. Configure corresponding query rate thresholds for each type of request method in advance. If the query rate per second corresponding to a request method exceeds the corresponding query rate threshold, the first flow limiting strategy is determined to intercept the non-session request.
在一种实现方式中,该方法还包括:In an implementation manner, 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 threshold, and the average processing delay corresponding to the multiple types of request methods within the preset time period exceeds the preset time threshold, the first traffic limiting policy is determined as intercepting non-session requests.
其中,对于任一类型的请求方法,如果每秒查询率不超过对应的查询率阈值,预设时间段内的平均处理时延超过预配置的延时波动上限,则拦截该请求方法。Wherein, 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 upper limit of delay fluctuation, the request method is blocked.
可选的,若根据类型信息确定多个类型的请求方法分别对应的每秒查询率不超过相应的查询率阈值,且预设时间段内所述多个类型的请求方法分别对应的平均处理时延不超过预设时间阈值,则将第一限流策略确定为放行该非会话类请求。Optionally, 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 threshold, and the average processing time corresponding to the multiple types of request methods within the preset time period is If the delay does not exceed the preset time threshold, the first traffic limiting policy is determined to allow the non-session request.
另外,在确定限流策略时还可以将视音频服务平台当前的过载程度信息作为考虑因素,具体见如下实施例:In addition, the current overload information of the video and audio service platform can also be considered as a factor when determining the current limiting strategy, see the following embodiments for details:
在一种实现方式中,根据第一限流策略,对多媒体通信相关请求进行相应的处理,包括:若第一限流策略为拦截多媒体通信相关请求,则确定过载程度信息;根据类型信息、特征信息和过载程度信息,确定多媒体通信相关请求对应的第二限流策略;根据第二限流策略,对多媒体通信相关请求进行相应的处理。In one implementation, according to the first current limiting strategy, corresponding processing is performed on multimedia communication-related requests, including: if the first current limiting strategy is to intercept multimedia communication-related requests, then determine the overload degree information; information and overload degree information to determine a second current limiting policy corresponding to the request related to multimedia communication; according to the second current limiting policy, corresponding processing is performed on the request related to multimedia communication.
在实际应用中,如果第一限流策略为拦截多媒体通信相关请求,则进一步根据请求方法的类型信息和视音频服务平台的过载程度信息确定第二限流策略,最终根据第二限流策略来确定拦截还是放行该多媒体通信相关请求。其中,不同类型的请求方法可对应不同的第二限流策略。In practical applications, if the first current limiting strategy is to intercept multimedia communication-related requests, then further determine the second current limiting strategy according to the type information of the request method and the overload degree information of the video and audio service platform, and finally determine the second current limiting strategy according to the second current limiting strategy. It is determined whether to intercept or release the request related to the multimedia communication. Wherein, different types of request methods may correspond to different second current limiting policies.
其中,确定过载程度信息的具体实现方式见如下实施例:Wherein, the specific implementation manner of determining the overload degree information is shown in the following embodiments:
在一种实现方式中,多媒体通信相关请求包括会话初始协议SIP请求中的会话类请求,确定过载程度信息,包括:In an implementation manner, the multimedia communication-related request includes a session request in the SIP request, and determines the overload degree information, including:
若会话类请求的分配带宽超过预配置的带宽阈值,则将过载程度信息确定为严重过载。If the allocated bandwidth requested by the session class exceeds the pre-configured bandwidth threshold, the overload degree information is determined as serious overload.
在实际应用中,如果是会话类请求,实际分配带宽超过限流带宽阈值,则过载程度信息确定为严重过载,否者过载程度信息确定为一般过载。In practical applications, if the request is for a session 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.
在一种实现方式中,方法还包括:In one implementation, the method further includes:
若类型信息为会话建立请求、会话确认请求和回放控制请求中的任一项,且过载程度信息为严重过载,则将第二限流策略确定为拦截会话类请求。If the type information is any one of session establishment request, session confirmation request and playback control request, and the overload degree information is severe overload, the second current limiting policy is determined as intercepting session type requests.
在一示例中,对于会话类请求,若过载程度信息为一般过载,则ACK请求判定为需要限流;若过载程度信息为严重过载,则ACK请求、INVITE请求和INFO请求都判定为需要限流;对于BYE请求,过载程度信息为一般过载或严重过载,都不需要限流。In one example, for a session request, if the overload level information is general overload, then the ACK request is determined to require current limiting; if the overload level information is severe overload, then the ACK request, INVITE request, and INFO request are all determined to require current limiting ; For BYE requests, the overload level information is general overload or severe overload, and there is no need for current limiting.
在一种实现方式中,多媒体通信相关请求包括会话初始协议SIP请求中的非会话类请求,确定过载程度信息,包括:In an implementation manner, the multimedia communication-related request includes a non-session request in the SIP request, and determining the overload degree information includes:
若非会话类请求的每秒查询率超过相应的查询率阈值,且非会话类请求的平均处理时延超过预设时间阈值,则将过载程度信息确定为严重过载。If the query rate per second of non-session requests exceeds a corresponding query rate threshold, and the average processing delay of non-session requests exceeds a preset time threshold, the overload degree information is determined as severe overload.
在实际应用中,对于非会话类请求,如果每秒查询率超过查询率阈值和平均处理时延超过预配置的延时波动上限,过载程度信息确定为严重过载;如果每秒查询率超过查询率阈值,但是平均处理时延不超过预配置的延时波动上限,过载程度信息确定为一般过载;如果每秒查询率不超过查询率阈值,但是平均处理时延超过预配置的延时波动上限,过载程度信息确定为一般过载。In practical applications, for non-session requests, if the query rate per second exceeds the query rate threshold and the average processing delay exceeds the preconfigured upper limit of delay fluctuation, the overload level information is determined to be seriously overloaded; if the query rate per second exceeds the query rate threshold, but the average processing delay does not exceed the preconfigured upper limit of delay fluctuation, and the overload degree information is determined as general overload; if the query rate per second does not exceed the query rate threshold, but the average processing delay exceeds the preconfigured upper limit of delay fluctuation, The overload degree information is determined as a general overload.
在一种实现方式中,方法还包括:In one implementation, the method further includes:
若类型信息为订阅类请求、通知类请求和消息类请求中的任一项,且过载程度信息为严重过载,则将第二限流策略确定为拦截非会话类请求。If the type information is any one of a subscription request, a notification request, and a message request, and the overload degree information is severe overload, the second current limiting strategy is determined as intercepting non-session requests.
在一种实现方式中,多媒体通信相关请求包括会话初始协议SIP请求中的非会话类请求,根据类型信息、特征信息和过载程度信息,确定多媒体通信相关请求对应的第二限流策略,包括:In one implementation, the multimedia communication-related request includes a non-session request in the Session Initiation Protocol SIP request, and according to the type information, feature information, and overload degree information, determine the second current limiting policy corresponding to the multimedia communication-related request, including:
若类型信息为登记类请求或消息类请求,则根据登记类请求或消息类请求分别对应的特征信息和过载程度信息,将第二限流策略确定为拦截或放行非会话类请求。If the type information is a registration request or a message request, then according to the characteristic information and overload degree information respectively corresponding to the registration request or the message request, determine the second current limiting strategy as intercepting or releasing non-session requests.
在一示例中,对于非会话类请求,如果是REGISTER请求,若过载程度信息为一般过载,则根据特征信息确定请求处于初始注册阶段,判定为需要限流;若过载程度信息为严重过载,则根据特征信息(Expires头的值,大于0表示注册流程的请求,等于0表示注销流程的请求。提取授权Authorization头,如果存在,表示注册初始阶段,反之为最终阶段)确定请求处于最终注册阶段,判定为需要限流;一般过载或严重过载时,注销请求都不需要限流。如果是SUBSCRIBE请求,一般过载或严重过载时,都需要限流。如果是NOTIFY请求,严重过载需要进行限流。如果是MESSAGE请求,一般过载时,通过解析请求体,得到特征信息,即命令类型为Control和Query,则需要限流;严重过载时,命令类型(Control、Query、Notify和Response)的请求都需要限流。其中,需要限流是指拦截请求;否则,放行请求。In one example, for a non-session request, if it is a REGISTER request, if the overload level information is general overload, it is determined according to the characteristic information that the request is in the initial registration stage, and it is determined that current limiting is required; if the overload level information is severe overload, then According to the characteristic information (the value of the Expires header, greater than 0 indicates the request of the registration process, and equal to 0 indicates the request of the cancellation process. Extract the Authorization header, if it exists, it indicates the initial stage of registration, otherwise it is the final stage) to determine that the request is in the final registration stage, It is determined that current limiting is required; in general overload or severe overload, logout requests do not need current limiting. If it is a SUBSCRIBE request, current limiting is required for general overload or severe overload. If it is a NOTIFY request, severe overload requires current limiting. If it is a MESSAGE request, when it is generally overloaded, the characteristic information is obtained by parsing the request body, that is, the command type is Control and Query, and the current limit is required; in severe overload, all requests of the command type (Control, Query, Notify, and Response) need Limiting. Among them, the need to limit the flow refers to intercepting the request; otherwise, the request is released.
在一个具体的实施例中,对于多媒体通信相关请求和响应消息进行解析,得到请求方法的类型信息和特征信息。具体的,多媒体通信相关请求可以是SIP请求,对SIP请求进行解析包括:解析SIP请求的请求行,提取出SIP请求的请求方法,从而得到请求方法的类型信息;解析SIP请求头,提取公共SIP头域数据:从From头域中提取客户端标识信息;提取会话标识Call ID头,提取From头域中的标签tag值和To头域中的tag值。对于部分请求方法,提取特定的SIP头域数据:对于REGISTER请求,确定REGISTER类型,具体的,提取注册有效期Expires头的值,大于0表示注册,等于0表示注销。判断注册流程阶段:提取授权Authorization头,如果存在,表示注册流程初始阶段,反之为最终阶段。对于SUBSCRIBE请求,确定订阅操作类型,具体的,提取Expires头的值,大于0表示建立订阅,等于0表示取消订阅。对于提取出的请求方法,部分请求方法需要解析SIP请求体,并从中提取特定的字段,例如,对于ACK方法,解析SDP请求中的a字段的负载类型payload type内容,确定实际传输的视频流编码类型;对于MESSAGE请求,解析监测报警联网系统控制描述协议(Monitoringand Alarming Network System Control Description Protocol,MANSCDP)结合可扩展标记语言(EXtensible Markup Language,XML)格式的请求体,提取根元素名称和命令类型CmdType元素值,从而确定MESSAGE命令类型和子类型。对历史SIP请求的响应消息进行解析包括:解析响应消息的状态行,提取出响应消息的状态码;解析响应消息头,提取公共头域数据;提取Call ID头,从From头域中提取tag值和To头域中提取tag值。In a specific embodiment, the multimedia communication-related request and response messages are analyzed to obtain the type information and feature information of the request method. Specifically, the request related to multimedia communication can be a SIP request, and parsing the SIP request includes: parsing the request line of the SIP request, extracting the request method of the SIP request, thereby obtaining the type information of the request method; parsing the SIP request header, and extracting the public SIP Header field data: extract the client identification information from the From header field; extract the session identifier Call ID header, extract the tag value in the From header field and the tag value in the To header field. For some request methods, extract specific SIP header field data: For REGISTER requests, determine the REGISTER type, specifically, extract the value of the Expires header of the registration validity period, greater than 0 means registration, and equal to 0 means logout. Determine the stage of the registration process: extract the Authorization header, if it exists, it indicates the initial stage of the registration process, otherwise it is the final stage. For the SUBSCRIBE request, determine the subscription operation type, specifically, extract the value of the Expires header, if it is greater than 0, it means to establish a subscription, and if it is equal to 0, it means to cancel the 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 video stream encoding actually transmitted Type; for the MESSAGE request, analyze the monitoring and alarming network system control description protocol (Monitoring and Alarming Network System Control Description Protocol, MANSCDP) combined with the request body in the Extensible Markup Language (XML) format, and extract the root element name and command type CmdType Element value, thereby determining the MESSAGE command type and subtype. Parsing the response message of the historical SIP request includes: parsing the status line of the response message, extracting the status code of the response message; parsing the response message header, extracting the public header field data; extracting the Call ID header, and extracting the tag value from the From header field and To header field to extract the tag value.
在一个具体的实施例中,对于SIP请求和响应消息进行分析的流程图如图3所示。分析过程包括:In a specific embodiment, a flow chart of analyzing SIP request and response messages is shown in FIG. 3 . The analysis process includes:
步骤S301,判断接收到的客户端发送的请求是否为SIP请求,如果是,则执行步骤S302;如果否,则为历史SIP的响应消息,则执行步骤S312。Step S301, judging whether the received request sent by the client is a SIP request, if yes, execute step S302; if not, then execute step S312 if it is a historical SIP response message.
步骤S302,数据库新增客户端请求记录。Step S302, adding a client request record to the database.
具体的,根据客户端SIP ID和SIP对话信息(会话标识Call ID值和From头的Tag值)在数据库新增请求记录,请求记录中包括SIP请求的请求方法的类型信息、请求时间戳以及各请求方法的特征信息,以REGISTER为例,包含注册或注销,初始阶段注册或最终阶段注册。Specifically, add a new request record in the database according to the client SIP ID and SIP conversation information (the value of the session identifier Call ID and the Tag value of the From header). The request record includes the type information of the request method of the SIP request, the request timestamp, and each The feature information of the request method, taking REGISTER as an example, includes registration or cancellation, initial stage registration or final stage registration.
步骤S303,数据库存储请求方法的特征信息。Step S303, the database stores the feature information of the request method.
步骤S304,判断SIP请求是否为会话类请求,如果是,则执行步骤S305,否则执行步骤S311。Step S304, judging whether the SIP request is a session request, if yes, execute step S305, otherwise execute step S311.
步骤S305,判断SIP请求是否为会话类请求中的INVITE请求,如果是,则执行步骤S306,否则执行步骤S307。Step S305, judging whether the SIP request is an INVITE request in a session request, if yes, execute step S306, otherwise execute step S307.
步骤S306,默认后续视频编码为H264,分辨率为1080P,新增视音频服务平台预分配带宽4Mbps。Step S306, the default subsequent video encoding is H264, the resolution is 1080P, and the newly added video and audio service platform pre-allocates a bandwidth of 4 Mbps.
步骤S307,判断SIP请求是否为会话类请求中的ACK请求,如果是,则执行步骤S308,否则执行步骤S309。Step S307, judging whether the SIP request is an ACK request in the session request, if yes, execute step S308, otherwise execute step S309.
步骤S308,如果是会话类型请求中的ACK请求,根据对SIP请求解析得到的实际视频流编码类型,将预分配带宽转变为实际分配带宽,如实际视频流编码类型是H265,则预分配带宽减少4Mbps,实际分配带宽增加xMbps。Step S308, if it is an ACK request in the session type request, convert the pre-allocated bandwidth to the actual allocated bandwidth according to the actual video stream encoding type obtained by parsing the SIP request, if the actual video stream encoding type is H265, then the pre-allocated bandwidth is reduced 4Mbps, the actual allocated bandwidth increases by xMbps.
步骤S309,判断SIP请求是否为会话类请求中的BYE请求,如果是,则执行步骤S310,否则结束。Step S309, judging whether the SIP request is a BYE request in the session request, if yes, execute step S310, otherwise end.
步骤S310,实际分配带宽减少x Mbps,x的值取决于SIP对话中之前发送的ACK请求的视频流编码类型。In step S310, the actual allocated bandwidth is reduced by x Mbps, and the value of x depends on the encoding type of the video stream of the previously sent ACK request in the SIP session.
步骤S311,如果为非会话类请求,则计算非会话类请求对应的QPS。Step S311, if it is a non-session request, calculate the QPS corresponding to the non-session request.
步骤S312,如果当前处理的是SIP请求的响应消息,则更新对应SIP请求的处理结果(响应状态码)和SIP对话信息(To头域的Tag值)。Step S312, if the current processing is the response message of the SIP request, update the corresponding SIP request processing result (response status code) and SIP dialogue information (Tag value of To header field).
步骤S313,计算并存储当前请求的视音频服务平台的实际处理延时。Step S313, calculating and storing the actual processing delay of the currently requested video and audio service platform.
步骤S314,更新同类型请求的处理时延统计信息,包括:时延的平均数、中位数等。Step S314, updating the statistical information of the processing delay of requests of the same type, including: the average number and the median of the delay.
在一个具体的实施例中,数据限流方法的流程图如图4所示。该方法包括:In a specific embodiment, a flow chart of the method for data current limiting is shown in FIG. 4 . The method includes:
步骤S401,判断接收到的多媒体通信相关请求是否为非法请求,对于来自于未知SIP客户端或者对话的非注册请求,会被确定为非法请求。如果是非法请求,则执行步骤S406,否则执行步骤S402。Step S401, judging whether the received multimedia communication-related request is an illegal request, and a non-registration request from an unknown SIP client or dialogue will be determined to be an illegal request. If it is an illegal request, execute step S406, otherwise execute step S402.
步骤S402,如果不是非法请求,则进行限流可能性判定。Step S402, if it is not an illegal request, determine the possibility of current limitation.
步骤S403,判断是否可能需要限流,如果是,则执行步骤S404;否则执行步骤S407。Step S403, judging whether current limiting may be required, if yes, execute step S404; otherwise, execute step S407.
步骤S404,进行系统过载程度判断。过载程度信息包括严重过载或一般过载。Step S404, judging the degree of system overload. The overload level information includes severe overload or normal overload.
步骤S405,判断请求在当前过载程度下是否需要限流,如果是,则执行步骤S406,否则执行步骤S407。Step S405, judging whether the request needs current limiting under the current overload level, if yes, execute step S406, otherwise execute step S407.
步骤S406,拦截请求。Step S406, intercepting the request.
步骤S407,放行请求。Step S407, release the request.
与本申请实施例提供的方法的应用场景以及方法相对应地,本申请实施例还提供一种数据限流装置。如图5所示为本申请一实施例的数据限流装置的结构框图,该装置包括:Corresponding to the application scenario and method of the method provided in the embodiment of the present application, the embodiment of the present application further provides a data rate limiting device. As shown in Figure 5, it is a structural block diagram of a data current limiting device according to an embodiment of the present application, and the device includes:
获取模块501,用于响应于针对视音频服务平台的多媒体通信相关请求,获取多媒体通信相关请求中的请求方法的类型信息和特征信息;The obtaining
确定模块502,用于根据类型信息和特征信息,确定多媒体通信相关请求对应的第一限流策略;A
限流模块503,用于根据第一限流策略,对多媒体通信相关请求进行相应的处理。The current limiting
本申请提供了一种数据限流装置,响应于针对视音频服务平台的多媒体通信相关请求,获取多媒体通信相关请求中的请求方法的类型信息和特征信息;根据类型信息和特征信息,确定多媒体通信相关请求对应的第一限流策略;根据第一限流策略,对多媒体通信相关请求进行相应的处理。本实施例中,根据多媒体通信相关请求中的请求方法的类型信息和特征信息确定限流策略,通过限流策略对多媒体通信相关请求进行相应的处理,以实现保障视音频服务平台的高可用性、稳定性和安全性。而且,根据请求方法的类型信息和特征信息,可以确定细粒度的和差异化的限流策略,以保障视音频服务平台的服务质量。The present application provides a data current limiting device, in response to a multimedia communication-related request for an audio-visual service platform, obtain the type information and characteristic information of the request method in the multimedia communication-related request; determine the multimedia communication according to the type information and characteristic information A first current limiting policy corresponding to the relevant request; according to the first current limiting policy, corresponding processing is performed on the multimedia communication related request. In this embodiment, the current limiting strategy is determined according to the type information and characteristic information of the request method in the multimedia communication-related request, and the multimedia communication-related request is processed correspondingly through the current limiting strategy, so as to ensure the high availability of the video and audio service platform, Stability and security. Moreover, according to the type information and feature information of the request method, a fine-grained and differentiated traffic limiting strategy can be determined to ensure the service quality of the video and audio service platform.
在一种实现方式中,确定模块502,用于:In one implementation, the
预先获取历史多媒体通信相关请求的响应消息;Obtaining in advance a response message to a request related to historical multimedia communication;
若根据类型信息、特征信息和响应消息,确定多媒体通信相关请求与历史多媒体通信相关请求具有关联关系,则将第一限流策略确定为放行多媒体通信相关请求。If it is determined according to the type information, feature information, and response message that the multimedia communication-related request has an association relationship with the historical multimedia communication-related request, the first current limiting policy is determined to allow the multimedia communication-related request.
在一种实现方式中,多媒体通信相关请求包括会话初始协议SIP请求中的会话类请求,确定模块502,用于:In one implementation, the multimedia communication-related request includes a session request in the session initiation protocol SIP request, and the determining
若请求方法的类型信息为会话确认请求,根据特征信息,确定视频编码类型,特征信息包括请求方法的请求头和请求体中预设字段的值;If the type information of the request method is a session confirmation request, determine the video encoding type according to the characteristic information, and the characteristic information includes the value of the request header and the preset field in the request body of the request method;
若请求方法的类型信息为会话建立请求,则根据类型信息,确定视频编码类型;If the type information of the request method is a session establishment request, then determine the video encoding type according to the type information;
根据视频编码类型,确定会话建立请求或会话确认请求的分配带宽,若分配带宽超过预配置的带宽阈值,则将第一限流策略确定为拦截会话类请求。According to the video coding type, determine the allocated bandwidth of the session establishment request or the session confirmation request, and if the allocated bandwidth exceeds the pre-configured bandwidth threshold, determine the first flow limiting policy as intercepting the session type request.
在一种实现方式中,装置还用于:In one implementation, the device is also used to:
若根据特征信息确定会话建立请求或会话确认请求的分配带宽不超过预配置的带宽阈值,且预设时间段内会话建立请求或会话确认请求的平均处理时延超过预设时间阈值,则将第一限流策略确定为拦截会话类请求。If it is determined according to the characteristic information that the allocated bandwidth of the session establishment request or session confirmation request does not exceed the preconfigured bandwidth threshold, and the average processing delay of the session establishment request or session confirmation request within the preset time period exceeds the preset time threshold, then the second A flow-limiting policy is determined to intercept session-type requests.
在一种实现方式中,多媒体通信相关请求包括会话初始协议SIP请求中的非会话类请求,装置还用于:In an implementation manner, the multimedia communication-related request includes a non-session request in the SIP request, and the device is further used for:
非会话类请求包括多个类型的请求方法,若根据类型信息确定多个类型的请求方法分别对应的每秒查询率超过相应的查询率阈值,则将第一限流策略确定为拦截非会话类请求。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 multiple types of request methods exceed the corresponding query rate threshold, the first flow limiting strategy is determined to intercept non-session requests. ask.
在一种实现方式中,装置还用于:In one implementation, the device is also used to:
若根据类型信息确定多个类型的请求方法分别对应的每秒查询率不超过相应的查询率阈值,且预设时间段内所述多个类型的请求方法分别对应的平均处理时延超过预设时间阈值,则将第一限流策略确定为拦截非会话类请求。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 threshold, and the average processing delay corresponding to the multiple types of request methods within the preset time period exceeds the preset time threshold, the first traffic limiting strategy is determined as intercepting non-session requests.
在一种实现方式中,限流模块503,用于:In an implementation manner, the current limiting
若第一限流策略为拦截多媒体通信相关请求,则确定过载程度信息;If the first current limiting strategy is to intercept multimedia communication-related requests, then determine the overload degree information;
根据类型信息、特征信息和过载程度信息,确定多媒体通信相关请求对应的第二限流策略;According to the type information, feature information and overload degree information, determine a second current limiting strategy corresponding to the request related to multimedia communication;
根据第二限流策略,对多媒体通信相关请求进行相应的处理。According to the second current limiting strategy, corresponding processing is performed on multimedia communication-related requests.
在一种实现方式中,多媒体通信相关请求包括会话初始协议SIP请求中的会话类请求,装置在确定过载程度信息时,用于:In an implementation manner, the multimedia communication-related request includes a session request in the SIP request, and when the device determines the overload degree information, it is used to:
若会话类请求的分配带宽超过预配置的带宽阈值,则将过载程度信息确定为严重过载。If the allocated bandwidth requested by the session class exceeds the pre-configured bandwidth threshold, the overload degree information is determined as serious overload.
在一种实现方式中,装置还用于:In one implementation, the device is also used to:
若类型信息为会话建立请求、会话确认请求和回放控制请求中的任一项,且过载程度信息为严重过载,则将第二限流策略确定为拦截会话类请求。If the type information is any one of session establishment request, session confirmation request and playback control request, and the overload degree information is severe overload, the second current limiting policy is determined as intercepting session type requests.
在一种实现方式中,多媒体通信相关请求包括会话初始协议SIP请求中的非会话类请求,装置在确定过载程度信息时,用于:In an implementation manner, the multimedia communication-related request includes a non-session request in the SIP request, and when the device determines the overload degree information, it is used to:
若非会话类请求的每秒查询率超过相应的查询率阈值,且非会话类请求的平均处理时延超过预设时间阈值,则将过载程度信息确定为严重过载。If the query rate per second of non-session requests exceeds a corresponding query rate threshold, and the average processing delay of non-session requests exceeds a preset time threshold, the overload degree information is determined as severe overload.
在一种实现方式中,装置还用于:In one implementation, the device is also used to:
若类型信息为订阅类请求、通知类请求和消息类请求中的任一项,且过载程度信息为严重过载,则将第二限流策略确定为拦截非会话类请求。If the type information is any one of a subscription request, a notification request, and a message request, and the overload degree information is severe overload, the second current limiting strategy is determined as intercepting non-session requests.
在一种实现方式中,多媒体通信相关请求包括会话初始协议SIP请求中的非会话类请求,装置在根据类型信息、特征信息和过载程度信息,确定多媒体通信相关请求对应的第二限流策略时,用于:In one implementation, the multimedia communication-related request includes a non-session request in the Session Initiation Protocol SIP request, and the device determines the second current limiting policy corresponding to the multimedia communication-related request according to the type information, characteristic information, and overload degree information , for:
若类型信息为登记类请求或消息类请求,则根据登记类请求或消息类请求分别对应的特征信息和过载程度信息,将第二限流策略确定为拦截或放行非会话类请求。If the type information is a registration request or a message request, then according to the characteristic information and overload degree information respectively corresponding to the registration request or the message request, determine the second current limiting strategy as intercepting or releasing non-session requests.
本申请实施例各装置中的各模块的功能可以参见上述方法中的对应描述,并具备相应的有益效果,在此不再赘述。The functions of each module in each device in the embodiment of the present application can refer to the corresponding description in the above method, and have corresponding beneficial effects, and will not be repeated here.
图6为用来实现本申请实施例的电子设备的框图。如图6所示,该电子设备包括:存储器610和处理器620,存储器610内存储有可在处理器620上运行的计算机程序。处理器620执行该计算机程序时实现上述实施例中的方法。存储器610和处理器620的数量可以为一个或多个。FIG. 6 is a block diagram of an electronic device used to implement an embodiment of the present application. As shown in FIG. 6 , the electronic device includes: a
该电子设备还包括:This electronic device also includes:
通信接口630,用于与外界设备进行通信,进行数据交互传输。The
如果存储器610、处理器620和通信接口630独立实现,则存储器610、处理器620和通信接口630可以通过总线相互连接并完成相互间的通信。该总线可以是工业标准体系结构(Industry Standard Architecture,ISA)总线、外部设备互连(Peripheral ComponentInterconnect,PCI)总线或扩展工业标准体系结构(Extended Industry StandardArchitecture,EISA)总线等。该总线可以分为地址总线、数据总线、控制总线等。为便于表示,图6中仅用一条粗线表示,但并不表示仅有一根总线或一种类型的总线。If the
可选的,在具体实现上,如果存储器610、处理器620及通信接口630集成在一块芯片上,则存储器610、处理器620及通信接口630可以通过内部接口完成相互间的通信。Optionally, in a specific implementation, if the
本申请实施例提供了一种计算机可读存储介质,其存储有计算机程序,该程序被处理器执行时实现本申请实施例中提供的方法。The embodiment of the present application provides a computer-readable storage medium, which stores a computer program, and implements the method provided in the embodiment of the present application when the program is executed by a processor.
本申请实施例还提供了一种芯片,该芯片包括处理器,用于从存储器中调用并运行存储器中存储的指令,使得安装有芯片的通信设备执行本申请实施例提供的方法。The embodiment of the present application also provides a chip, the chip includes a processor, configured to call and execute instructions stored in the memory from the memory, so that the communication device installed with the chip executes the method provided in the embodiment of the present application.
本申请实施例还提供了一种芯片,包括:输入接口、输出接口、处理器和存储器,输入接口、输出接口、处理器以及存储器之间通过内部连接通路相连,处理器用于执行存储器中的代码,当代码被执行时,处理器用于执行申请实施例提供的方法。The embodiment of the present application also provides a chip, including: an input interface, an output interface, a processor, and a memory, the input interface, the output interface, the processor, and the memory are connected through 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 by the embodiment of the application.
应理解的是,上述处理器可以是中央处理器(Central Processing Unit,CPU),还可以是其他通用处理器、数字信号处理器(Digital Signal Processor,DSP)、专用集成电路(Application Specific Integrated Circuit,ASIC)、现场可编程门阵列(FieldProgrammable Gate Array,FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件等。通用处理器可以是微处理器或者是任何常规的处理器等。值得说明的是,处理器可以是支持进阶精简指令集机器(Advanced RISC Machines,ARM)架构的处理器。It should be understood that the above-mentioned processor may be a central processing unit (Central Processing Unit, CPU), and may also be other general-purpose processors, a digital signal processor (Digital Signal Processor, DSP), an application specific integrated circuit (Application Specific Integrated Circuit, ASIC), Field Programmable Gate Array (Field Programmable Gate Array, 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 or the like. It should be noted that the processor may be a processor supporting Advanced RISC Machines (ARM) architecture.
进一步地,可选的,上述存储器可以包括只读存储器和随机访问存储器。该存储器可以是易失性存储器或非易失性存储器,或可包括易失性和非易失性存储器两者。其中,非易失性存储器可以包括只读存储器(Read-Only Memory,ROM)、可编程只读存储器(Programmable ROM,PROM)、可擦除可编程只读存储器(Erasable PROM,EPROM)、电可擦除可编程只读存储器(Electrically EPROM,EEPROM)或闪存。易失性存储器可以包括随机访问存储器(Random Access Memory,RAM),其用作外部高速缓存。通过示例性但不是限制性说明,许多形式的RAM均可用。例如,静态随机访问存储器(Static RAM,SRAM)、动态随机访问存储器(Dynamic Random Access Memory,DRAM)、同步动态随机访问存储器(Synchronous DRAM,SDRAM)、双倍数据速率同步动态随机访问存储器(Double Data RateSDRAM,DDR SDRAM)、增强型同步动态随机访问存储器(Enhanced SDRAM,ESDRAM)、同步链接动态随机访问存储器(Sync link DRAM,SLDRAM)和直接内存总线随机访问存储器(DirectRambus RAM,DR RAM)。Further, optionally, the foregoing memory may include a read-only memory and a random access memory. The memory can be either volatile memory or nonvolatile memory, or can include both volatile and nonvolatile memory. Among them, the non-volatile memory can include read-only memory (Read-Only Memory, ROM), programmable read-only memory (Programmable ROM, PROM), erasable programmable read-only memory (Erasable PROM, EPROM), electrically programmable Erase Programmable Read-Only Memory (Electrically EPROM, EEPROM) or Flash. Volatile memory can include Random Access Memory (RAM), which acts as external cache memory. By way of illustration and not limitation, many forms of RAM are available. For example, static random access memory (Static RAM, SRAM), dynamic random access memory (Dynamic Random Access Memory, DRAM), synchronous dynamic random access memory (Synchronous DRAM, SDRAM), double data rate synchronous dynamic random access memory (Double Data RateSDRAM, DDR SDRAM), Enhanced Synchronous Dynamic Random Access Memory (Enhanced SDRAM, ESDRAM), Synchronous Link Dynamic Random Access Memory (Sync link DRAM, SLDRAM) and Direct Memory Bus Random Access Memory (DirectRambus RAM, DR RAM).
在上述实施例中,可以全部或部分地通过软件、硬件、固件或者其任意组合来实现。当使用软件实现时,可以全部或部分地以计算机程序产品的形式实现。计算机程序产品包括一个或多个计算机指令。在计算机上加载和执行计算机程序指令时,全部或部分地产生依照本申请的流程或功能。计算机可以是通用计算机、专用计算机、计算机网络、或者其他可编程装置。计算机指令可以存储在计算机可读存储介质中,或者从一个计算机可读存储介质向另一个计算机可读存储介质传输。In the above embodiments, all or part of them may be implemented by software, hardware, firmware or any combination thereof. When implemented using software, it may be implemented in whole or in part in the form of a computer program product. A computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on the computer, the processes or functions according to the present application are produced in whole or in part. A computer can be a general purpose computer, special purpose computer, computer network, or other programmable device. Computer instructions may be stored in, or transmitted from, one computer-readable storage medium to another computer-readable storage medium.
在本说明书的描述中,参考术语“一个实施例”、“一些实施例”、“示例”、“具体示例”、或“一些示例”等的描述意指结合该实施例或示例描述的具体特征、结构、材料或者特点包括于本申请的至少一个实施例或示例中。而且,描述的具体特征、结构、材料或者特点可以在任一个或多个实施例或示例中以合适的方式结合。此外,在不相互矛盾的情况下,本领域的技术人员可以将本说明书中描述的不同实施例或示例以及不同实施例或示例的特征进行结合和组合。In the description of this specification, descriptions referring to the terms "one embodiment", "some embodiments", "example", "specific examples", or "some examples" mean that specific features described in connection with the embodiment or example , structure, material or characteristic is included in at least one embodiment or example of the present application. Furthermore, the described specific features, structures, materials or characteristics may be combined in any suitable manner in any one or more embodiments or examples. In addition, those skilled in the art can combine and combine different embodiments or examples and features of different embodiments or examples described in this specification without conflicting with each other.
此外,术语“第一”、“第二”仅用于描述目的,而不能理解为指示或暗示相对重要性或者隐含指明所指示的技术特征的数量。由此,限定有“第一”、“第二”的特征可以明示或隐含地包括至少一个该特征。在本申请的描述中,“多个”的含义是两个或两个以上,除非另有明确具体的限定。In addition, the terms "first" and "second" are used for descriptive purposes only, and cannot be interpreted as indicating or implying relative importance or implicitly specifying the quantity of indicated technical features. Thus, the features defined as "first" and "second" may explicitly or implicitly include at least one of these features. In the description of the present application, "plurality" means two or more, unless otherwise specifically defined.
流程图中描述的或在此以其他方式描述的任何过程或方法可以被理解为,表示包括一个或更多个用于实现特定逻辑功能或过程的步骤的可执行指令的代码的模块、片段或部分。并且本申请的优选实施方式的范围包括另外的实现,其中可以不按所示出或讨论的顺序,包括根据所涉及的功能按基本同时的方式或按相反的顺序,来执行功能。Any process or method described in a flowchart or otherwise described herein may be understood as representing a module, segment, or code comprising one or more executable instructions for implementing a specific logical function or step of the process part. Also, the scope of preferred embodiments of the present application includes additional implementations in which functions may be performed out of the order shown or discussed, including substantially concurrently or in reverse order as the functions involved are involved.
在流程图中描述的或在此以其他方式描述的逻辑和/或步骤,例如,可以被认为是用于实现逻辑功能的可执行指令的定序列表,可以具体实现在任何计算机可读介质中,以供指令执行系统、装置或设备(如基于计算机的系统、包括处理器的系统或其他可以从指令执行系统、装置或设备取指令并执行指令的系统)使用,或结合这些指令执行系统、装置或设备而使用。The logic and/or steps described in the flowcharts or otherwise described herein, for example, can be considered as a sequenced listing of executable instructions for implementing logical functions, which can be embodied in any computer-readable medium , for use with an instruction execution system, apparatus, or device (such as a computer-based system, a system including a processor, or other system that can fetch instructions from an instruction execution system, apparatus, or device and execute instructions), or in conjunction with such an instruction execution system, device or equipment.
应理解的是,本申请的各部分可以用硬件、软件、固件或它们的组合来实现。在上述实施方式中,多个步骤或方法可以用存储在存储器中且由合适的指令执行系统执行的软件或固件来实现。上述实施例方法的全部或部分步骤是可以通过程序来指令相关的硬件完成,该程序可以存储于一种计算机可读存储介质中,该程序在执行时,包括方法实施例的步骤之一或其组合。It should be understood that each part of the present application may be realized by hardware, software, firmware or a combination thereof. In the above described embodiments, various steps or methods may be implemented by software or firmware stored in memory and executed by a suitable instruction execution system. All or part of the steps of the method in the above embodiments can be completed by instructing related hardware through a program. The program can be stored in a computer-readable storage medium. When the program is executed, it includes one of the steps of the method embodiment or its combination.
此外,在本申请各个实施例中的各功能单元可以集成在一个处理模块中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个模块中。上述集成的模块既可以采用硬件的形式实现,也可以采用软件功能模块的形式实现。上述集成的模块如果以软件功能模块的形式实现并作为独立的产品销售或使用时,也可以存储在一个计算机可读存储介质中。该存储介质可以是只读存储器,磁盘或光盘等。In addition, each functional unit in each embodiment of the present application may be integrated into one processing module, each unit may exist separately physically, or two or more units may be integrated into one module. The above-mentioned integrated modules can be implemented in the form of hardware or in the form of software function modules. If the above-mentioned integrated modules are implemented in the form of software function modules and sold or used as independent products, they can also be stored in a computer-readable storage medium. The storage medium may be a read-only memory, a magnetic disk or an optical disk, and the like.
以上所述,仅为本申请的示例性实施方式,但本申请的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本申请记载的技术范围内,可轻易想到其各种变化或替换,这些都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应以权利要求的保护范围为准。The above is only an exemplary embodiment of the application, but the scope of protection of the application is not limited thereto, and any skilled person familiar with the technical field can easily think of its various changes within the technical scope of the application Or replacement, all of these should be covered within the scope of protection of this application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
Claims (14)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211611001.0A CN115733803B (en) | 2022-12-12 | 2022-12-12 | Data flow limiting method, device, electronic device and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211611001.0A CN115733803B (en) | 2022-12-12 | 2022-12-12 | Data flow limiting method, device, electronic device and storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN115733803A true CN115733803A (en) | 2023-03-03 |
CN115733803B CN115733803B (en) | 2025-03-14 |
Family
ID=85301333
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202211611001.0A Active CN115733803B (en) | 2022-12-12 | 2022-12-12 | Data flow limiting method, device, electronic device and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN115733803B (en) |
Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
GB0615026D0 (en) * | 2006-07-27 | 2006-09-06 | Motorola Inc | An internet protocol multimedia subsystem network element and method of operation therefor |
CN1852301A (en) * | 2005-09-20 | 2006-10-25 | 华为技术有限公司 | Overload coutrol method for next generation network |
CN101296177A (en) * | 2007-04-29 | 2008-10-29 | 华为技术有限公司 | Method, system and device for implementing overload control in packet network |
US20090310484A1 (en) * | 2008-04-17 | 2009-12-17 | Dorgham Sisalem | Methods, systems, and computer readable media for session initiation protocol (sip) overload control |
CN102223295A (en) * | 2010-04-15 | 2011-10-19 | 阿瓦雅公司 | Phase based prioritization of IMS signaling messages for overload throttling |
CN103036885A (en) * | 2012-12-18 | 2013-04-10 | 迈普通信技术股份有限公司 | Session initiation protocol (SIP) server overload protective system and method |
US20140006630A1 (en) * | 2012-06-28 | 2014-01-02 | Yigang Cai | Session initiation protocol (sip) for message throttling |
CN114679434A (en) * | 2022-05-27 | 2022-06-28 | 武汉中科通达高新技术股份有限公司 | Session message processing system, method, computer device and storage medium |
-
2022
- 2022-12-12 CN CN202211611001.0A patent/CN115733803B/en active Active
Patent Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1852301A (en) * | 2005-09-20 | 2006-10-25 | 华为技术有限公司 | Overload coutrol method for next generation network |
GB0615026D0 (en) * | 2006-07-27 | 2006-09-06 | Motorola Inc | An internet protocol multimedia subsystem network element and method of operation therefor |
CN101296177A (en) * | 2007-04-29 | 2008-10-29 | 华为技术有限公司 | Method, system and device for implementing overload control in packet network |
US20090310484A1 (en) * | 2008-04-17 | 2009-12-17 | Dorgham Sisalem | Methods, systems, and computer readable media for session initiation protocol (sip) overload control |
CN102223295A (en) * | 2010-04-15 | 2011-10-19 | 阿瓦雅公司 | Phase based prioritization of IMS signaling messages for overload throttling |
US20140006630A1 (en) * | 2012-06-28 | 2014-01-02 | Yigang Cai | Session initiation protocol (sip) for message throttling |
CN103036885A (en) * | 2012-12-18 | 2013-04-10 | 迈普通信技术股份有限公司 | Session initiation protocol (SIP) server overload protective system and method |
CN114679434A (en) * | 2022-05-27 | 2022-06-28 | 武汉中科通达高新技术股份有限公司 | Session message processing system, method, computer device and storage medium |
Non-Patent Citations (2)
Title |
---|
LUCA MONACELLI ET AL.: "Includeing overload control in existing IMS compliant networks by using traffic shapers", PROCEEDINGS OF THE 5TH INTERNATIONAL ICST MOBILE MULTIMEDIA COMMUNICATIONS CONFERENCE, 7 September 2009 (2009-09-07) * |
任子龙: "基于SIP协议的多媒体通信系统的设计与实现", 《中国优秀硕士学位论文全文数据库》, 15 August 2019 (2019-08-15) * |
Also Published As
Publication number | Publication date |
---|---|
CN115733803B (en) | 2025-03-14 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
EP2418848A1 (en) | Content location method and content delivery network node | |
US20090063649A1 (en) | Request and Notification for Metadata of Content | |
US9210463B2 (en) | Network autodiscovery as a lever to decorrelated service activation through event driven architecture | |
US20170134459A1 (en) | Preference-aware content streaming | |
CN106210049B (en) | Cluster communication method and system based on message queue | |
US11051078B2 (en) | Video distribution method and device | |
EP3059945A1 (en) | Method and system for video surveillance content adaptation, and central server and device | |
EP4070529A1 (en) | User plane function load control | |
US20110265121A1 (en) | Service processing method and system in content distribution network of interactive network tv | |
US20210344706A1 (en) | Method and apparatus for implementing server anti-attack | |
CN108093086A (en) | The data transmission method and system of a kind of gateway | |
US20170134437A1 (en) | Methods, Systems, And Computer Program Products For Security Protocol Selection In Internet Protocol Multimedia Subsystem Networks | |
US20200244753A1 (en) | Method, system and server for stream-pushing | |
CN108512889A (en) | A kind of application response method for pushing and proxy server based on HTTP | |
US20140324952A1 (en) | Method and apparatus for network communication | |
US20240406015A1 (en) | Charging functions and methods for updating charging resources | |
CN118741265B (en) | Camera video playback method, device, system and electronic equipment | |
CN115733803A (en) | Data current limiting method and device, electronic equipment and storage medium | |
KR102636491B1 (en) | Terminal based dynamic network policy control method on 5g network, terminal and network system implementing the same method | |
CN111224886A (en) | Network traffic control method and system | |
CN111586344B (en) | Message sending method and device of network camera | |
EP2415290A1 (en) | A method and nodes for transmitting user context between communication networks | |
US8386831B2 (en) | DCAS headend system and method for processing error of secure micro client software | |
US20250126034A1 (en) | Methods, apparatus and computer-readable medium for monitoring site access over a mobile communication network | |
CN101534314A (en) | Method, system and device for reporting cache instruction |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |