WO2019071608A1 - Request processing method and device, and computer-readable storage medium - Google Patents

Request processing method and device, and computer-readable storage medium Download PDF

Info

Publication number
WO2019071608A1
WO2019071608A1 PCT/CN2017/106169 CN2017106169W WO2019071608A1 WO 2019071608 A1 WO2019071608 A1 WO 2019071608A1 CN 2017106169 W CN2017106169 W CN 2017106169W WO 2019071608 A1 WO2019071608 A1 WO 2019071608A1
Authority
WO
WIPO (PCT)
Prior art keywords
request
subsystem
protocol format
format
streaming media
Prior art date
Application number
PCT/CN2017/106169
Other languages
French (fr)
Chinese (zh)
Inventor
裴卫斌
谭喆
林大镰
姚开方
Original Assignee
深圳中兴力维技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 深圳中兴力维技术有限公司 filed Critical 深圳中兴力维技术有限公司
Priority to PCT/CN2017/106169 priority Critical patent/WO2019071608A1/en
Publication of WO2019071608A1 publication Critical patent/WO2019071608A1/en

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/40Network security protocols

Definitions

  • the present invention relates to the field of computer technologies, and in particular, to a request processing method, apparatus, and computer readable storage medium.
  • the heterogeneity of software software from different manufacturers, the internal coordination and calling mechanism is different, that is, the communication protocol is different, which constitutes the heterogeneity of the software.
  • the interfaces provided by most manufacturers are either too rigid and cannot be extended, or they provide limited functions and scope. They can only provide SDK (software bursting toolkit) to make secondary bursts to the interface, while SDK mode is limited to operation.
  • SDK software bursting toolkit
  • Security control is reflected in rights management, data encryption, intrusion detection, anti-virus and other aspects. Due to heterogeneous problems, poor compatibility of permissions, no consideration of edge issues, etc.; and due to heterogeneous problems, core information needs to be transmitted in clear text; on the Internet side, due to remote procedure call permissions or even server permissions, resulting in various Abnormal host intrusion and illegal module injection problems.
  • the main object of the present invention is to provide a request processing method, apparatus and computer readable storage medium, Designed to overcome the effects of software heterogeneity and smoothly implement data interaction between software.
  • the present invention provides a request processing method, the method comprising: receiving a request of a first protocol format sent by a requester; converting the request from the first protocol format to a child a second protocol format recognizable by the system, the subsystem is configured to process the request; the request of the second protocol format is sent to the subsystem; and the subsystem processes the request to obtain the a result of the second protocol format; converting the result from the second protocol format to the first protocol format; returning the result to the requester.
  • the method before the converting the request from the first protocol format to a second protocol format recognizable by the subsystem, the method further includes: performing checksum on the request/ Or authentication, performing the conversion of the request from the first protocol format to a second protocol format recognizable by the subsystem after the checksum/or authentication succeeds.
  • the request is used to apply for a streaming media resource
  • the result is an address of the streaming media resource
  • the foregoing method after the processing, by the subsystem, the result of the second protocol format, specifically: the subsystem acquiring the first encapsulation and/or compression format according to the request The streaming media resource, converting the streaming media resource from the first encapsulation and/or compression format to a second encapsulation and/or compression format corresponding to the requestor, and the second encapsulation and/or The address of the streaming media resource in the compressed format is used as the result, so that the requester obtains the streaming media resource according to the address.
  • the address of the streaming media resource in the second encapsulation and/or compression format is used as the result, where the requester obtains the content according to the address
  • the streaming media resource specifically includes: after transmitting the streaming media resource with the requester, adding session information in each transmitted resource data.
  • the present invention further provides a request processing apparatus, the apparatus comprising: an interface management module, configured to receive a request of a first protocol format sent by a requester; a system interface module, configured to Transmitting, by the first protocol format, a second protocol format recognizable by a subsystem, the subsystem is configured to process the request, and the system management module sends the request in the second protocol format Giving the subsystem; the subsystem, configured to process the request to obtain a result of the second protocol format; the system management module converting the result from the second protocol format to the first After the protocol format, the system interface module and the interface management module return the result to the requester.
  • an interface management module configured to receive a request of a first protocol format sent by a requester
  • a system interface module configured to Transmitting, by the first protocol format, a second protocol format recognizable by a subsystem, the subsystem is configured to process the request, and the system management module sends the request in the second protocol format Giving the subsystem
  • the subsystem configured to process the request to obtain
  • the interface management module before the converting the request from the first protocol format to a second protocol format recognizable by a subsystem, the interface management module further performing the request And/or authenticating, after the checksum/or authentication succeeds, the system interface module performs the converting of the request from the first protocol format to a second protocol format recognizable by the subsystem.
  • the request is used to apply for a streaming media resource
  • the result is an address of the streaming media resource
  • the subsystem acquires the streaming media resource in a first encapsulation and/or compression format according to the request, and the streaming media resource is used by the first encapsulation and/or Compressing the format into a second encapsulation and/or compression format corresponding to the requestor, using the address of the streaming media resource in the second encapsulation and/or compression format as the result, for the requester to press
  • the address acquires the streaming media resource.
  • the subsystem adds session information in each transmitted resource data after transmitting the streaming media resource with the requester.
  • the present invention also provides a computer readable storage medium storing one or more programs, the one or more programs may be processed by one or more The device is executed to implement the steps of the foregoing method.
  • the request processing method, apparatus, and computer readable storage medium of the present invention have at least the following advantages:
  • the request sent by the requester does not directly reach the subsystem that processes the request, but first needs to be converted by the protocol format, converted into a protocol format recognizable by the subsystem, and then sent.
  • the subsystem is processed, and the processing result of the subsystem is also converted into the protocol format and returned to the requester. It can be seen that the conversion of the protocol format overcomes the influence of software heterogeneity between the requester and the subsystem, so that the requester and the requester Request processing and data interaction can be successfully completed between subsystems Brief description of the drawing
  • FIG. 1 is a block diagram of a request processing apparatus in accordance with an embodiment of the present invention.
  • FIG. 2 is a schematic diagram of a request processing device in accordance with an embodiment of the present invention.
  • FIG. 3 is a block diagram of a request processing apparatus in accordance with an embodiment of the present invention.
  • FIG. 4A is a block diagram of a request processing apparatus in accordance with an embodiment of the present invention.
  • FIG. 4B is a schematic diagram of a request processing device in accordance with an embodiment of the present invention.
  • FIG. 5 is a flowchart of a request processing method according to an embodiment of the present invention.
  • FIG. 6 is a flow chart of a request processing method according to an embodiment of the present invention.
  • module the suffixes such as “module”, “component” or “unit” used to denote an element are merely for the purpose of facilitating the description of the present invention, and have no specific meaning per se. Therefore, “module”, “part” or “unit” can be used in combination.
  • an embodiment of the present invention provides a request processing apparatus.
  • the apparatus of this embodiment includes:
  • the interface management module 110 is configured to receive a request of the first protocol format sent by the requester.
  • the type of the first protocol format is not limited, and specifically, HTTP may be adopted.
  • the interface management module 110 is located at the uppermost layer of the entire request processing device, and is responsible for the northbound output.
  • the output interface specification can adopt the aforementioned HTTP+JSON.
  • the system interface module 120 is configured to convert the request from the first protocol format to a second protocol format recognizable by the subsystem, and the subsystem is configured to process the request.
  • the type of the second protocol format is not limited, and specifically, SIP ( Session Initiation Protocol) or other proprietary format.
  • the system interface module 120 is responsible for receiving the request message sent by the interface management module 110 and returning the result message to the interface management module 110. Therefore, the system interface module 120 needs to have a protocol conversion function, for example, from HTTP+JSON. The format is converted to SI P or other proprietary format.
  • the system interface module 120 embodies a process of converting a standard protocol into an internal protocol, and implements a protocol conversion function.
  • the system management module 130 sends a request for the second protocol format to the subsystem.
  • the system management module 130 selects a corresponding subsystem according to the converted request message to obtain a corresponding resource file.
  • the system management module 130 is responsible for the management of the entire device, manages the newly added and exited subsystems, and receives the request packets converted by the system interface module 120 and analyzes and processes the request packets, for different request messages. Reasonably dispatched to the corresponding subsystem.
  • the request packet can be classified into a resource query, an alarm query, a media request, a picture query, and the like, and is distributed to different subsystems according to the type of the request message. If the number of requests sent by the requester is multiple, the system management module 130 performs comprehensive feedback after collecting resources from multiple subsystems (for example, the alarm processing subsystem, the image query subsystem, etc.), as shown in FIG. 2 . Shown.
  • the subsystem 140 is configured to obtain a result of the second protocol format after processing the request.
  • the number of subsystems is one or more, and is used to process requests for different services.
  • the subsystem 140 receives the request dispatched by the system management module 130, performs the actual processing, and returns the processing result to the system management module 130.
  • the subsystem can be an alarm management module that obtains an alarm management file and returns to the system management module 130.
  • each subsystem processes only the corresponding item service and acquires the required resource file.
  • the system management module 130 converts the result from the second protocol format to the first protocol format
  • the system interface module 120 and the interface management module 110 return the result to the requester.
  • the system management module 130 returns the processing result to the system interface module 120 as it is, and the system interface module 120 converts the result message into an HTTP+JSON format and returns it to the interface management module 110.
  • the interface management module 1 10 then returns these results to the original requester in HTTP+JSON format.
  • Restful is a relatively mature interface design theory for Internet applications. It uses URLs to locate and point to resources, uses JSON and other formats to represent resource forms, and uses HTTP and other methods to manipulate resources.
  • the outermost interface management module 110 is advertised by means of HTTP+JSON, the external interface is standard and extensible, and there is no need to consider the version dependency problem of the operating system and related modules, that is, not subject to software differences. The influence of structure. Therefore, according to the technical solution of the embodiment, the burst amount and the technical threshold required for acquiring resources are greatly reduced.
  • An embodiment of the present invention provides a request processing apparatus, where the apparatus of this embodiment includes:
  • the interface management module 110 is configured to receive a request of the first protocol format sent by the requester, request the application for the streaming media resource, and perform verification and/or authentication on the request.
  • the manner of verifying and authenticating is not limited.
  • an HTTP request for an external resource request is received, and a corresponding function is invoked for authentication and statistics, and the request is subsequently processed after the authentication succeeds.
  • the system interface module 120 may perform source check and statistics on the request protocol, for example, verifying the validity according to the source address, and performing an authentication operation on the request protocol, that is, according to the request. The account information in the judgment determines whether the request should be rejected or allowed.
  • a user interface admission prompt is generated, and the request is transmitted to the system interface module 120, as shown in FIG. .
  • the system interface module 120 is configured to convert the request from the first protocol format to a second protocol format recognizable by the subsystem after the checksum/authentication succeeds, and the subsystem is configured to process the request.
  • the received request such as the HTTP format
  • the converted synonym message is forwarded to the system management module 130 for processing.
  • the system management module 130 sends a request for the second protocol format to the subsystem.
  • the translation and the request are dispatched, and the classification process is performed according to different functions of the request message.
  • the request of the alarm query class is distributed to the alarm subsystem, and the resource query class
  • the request is dispatched to the resource query subsystem
  • the streaming media class request is dispatched to the streaming media subsystem
  • the resulting message is replied to by the respective subsystems.
  • the interface management module 110 can integrate wsdl (network service description language) files, and can be dynamically adapted as a client of the network service for some resources that require SOAP (Simple Object Access Protocol) protocol calls.
  • SOAP Simple Object Access Protocol
  • the subsystem 140 acquires the streaming media resource in the first encapsulation and/or compression format according to the request, and the streaming media resource
  • the source is converted into a second encapsulation and/or compression format of the corresponding requester by the first encapsulation and/or compression format, and the address of the streaming resource of the second encapsulation and/or compression format is used as a result for the requester to obtain by address Streaming media resources, the result is the address of the streaming media resource.
  • the subsystem can return the URL (address) of a video resource, and the requester can directly access the URL.
  • streaming media or picture resources such as audio and video
  • the requester obtains these resources through standard methods such as RTSP (Real Streaming Protocol), RT MP (Real Message Transfer Protocol), HTTP, FTP (File Transfer Protocol), etc. after obtaining the URL of the stream and the picture.
  • the corresponding subsystem providing the streaming media resource needs to have a code stream conversion module, and the module undertakes the resource positioning and dispatching task of the streaming media.
  • the resource location is the resource location of the generated streaming media, that is, the URL, and the resource is uniquely indicated by the UR L.
  • the module obtains the original stream from the streaming media server, that is, requests the original stream transcoding before the reply to generate the URL of the stream resource. After the URL is generated, it is returned to the system management module 130, and the system management module 130 returns it to the requester as it is.
  • the code stream conversion module then converts the original stream, including media compression format conversion (G711 to AAC, MPEG4 to H.264, etc., G711, ACC, MPEG4, H.264 for different media compression formats), media packetization Conversion, such as TS (Transport Stream) Packet, PS (Program Stream) Packet, FLV (-Streaming Media Format) format, etc., so that streaming media can be decoded and played on different platforms and players.
  • media compression format conversion G711 to AAC, MPEG4 to H.264, etc., G711, ACC, MPEG4, H.264 for different media compression formats
  • media packetization Conversion such as TS (Transport Stream) Packet, PS (Program Stream) Packet, FLV (-Streaming Media Format) format, etc.
  • TS Transport Stream
  • PS Program Stream
  • FLV -Streaming Media Format
  • the requester and the subsystem are peer-to-peer, that is, The requester of the media is directly requested to apply the streaming media to the subsystem providing the URL (specifically, the code stream conversion module therein) without passing through other intermediate links of the interface management module and the like. Due to the adoption of standard media negotiation methods and standard media packet formats, the selection conditions for streaming media processing and playback are very broad, further reducing the difficulty of calling the original applicant.
  • system interface module 120 and the system management module 130 are roughly equivalent to the ESB (Enterprise Service Bus, supporting routing, protocol conversion, message exchange, protocol authentication, security policy, load, etc.) Balance, dynamic access and other functions), they are responsible for protocol conversion, routing, service access and management services.
  • ESB Enterprise Service Bus, supporting routing, protocol conversion, message exchange, protocol authentication, security policy, load, etc.
  • Balance dynamic access and other functions
  • system management module 130 converts the result from the second protocol format to the first protocol format
  • the system interface module 120 and the interface management module 110 return the result to the requester.
  • the subsystem 140 adds a session f ⁇ interest in each transmitted resource data after transmitting the streaming media resource with the requester.
  • the requester receives the streaming media URL and directly requests the streaming media resource through the player, and the application manner may be RTMP, RTSP, etc. according to the return format of the URL.
  • the technical solution of the embodiment is also considered, mainly by adding an authentication mechanism and an effective period authentication in the negotiation session. For example, in a video negotiation session, session information is added to the RTSP header field to indicate the inconsistency of each session, thereby improving the security of the session.
  • a request processing method is provided.
  • the method in this embodiment includes:
  • Step S510 Receive a request of the first protocol format sent by the requester.
  • the type of the first protocol format is not limited, and specifically, HTTP may be adopted.
  • Step S520 Convert the request from the first protocol format to a second protocol format recognizable by the subsystem, and the subsystem is used to process the request.
  • the type of the second protocol format is not limited, and specifically, a SIP (Session Initiation Protocol) or other proprietary format may be adopted.
  • this step implements protocol conversion, such as conversion from HTTP+JSON format to SIP or other proprietary format.
  • the step reflects the process of converting the standard protocol into an internal protocol, and implements the protocol conversion function.
  • Step S530 sending a request of the second protocol format to the subsystem.
  • the corresponding subsystem is selected according to the converted request message to obtain the corresponding resource file. Specifically, the request packet after the protocol conversion is received, and the request packet is analyzed and processed, and different request messages are appropriately allocated to the corresponding subsystem.
  • the request packet can be classified into a resource query, an alarm query, a media request, a picture query, and the like, and is distributed to different subsystems according to the type of the request message. If the requester sends more than one request.
  • Step S540 The subsystem obtains the result of the second protocol format after processing the request.
  • the number of subsystems is one or more, and is used to process requests for different services.
  • the subsystem performs the actual processing after receiving the dispatch request.
  • the subsystem can be an alarm management module that obtains an alarm management file and returns to the system management module 130.
  • each subsystem processes only the corresponding item service and acquires the required resource file.
  • Step S550 The result is converted from the second protocol format to the first protocol format and returned to the requester.
  • the processing result of the subsystem is converted into an HTTP+JSON format and returned to the original requester.
  • the received request format can be, for example, HTTP+JSON, it is standard and extensible to implement the external interface, and there is no need to consider the version dependency of the operating system and related modules, that is, not affected by software heterogeneity. Therefore, according to the technical solution of the embodiment, the burst amount and the technical threshold required for acquiring resources are greatly reduced.
  • an embodiment of the present invention provides a request processing method, and the method in this embodiment includes:
  • Step S610 Receive a request of the first protocol format sent by the requester, request the application for the streaming media resource, and perform verification and/or authentication on the request.
  • the manner of verification and authentication is not limited.
  • an HTTP request for an external resource request is received, and a corresponding function is invoked for authentication and statistics, and the request is subsequently processed after the authentication succeeds.
  • the source protocol checksum statistics may be performed on the request protocol, for example, verifying the validity according to the source address, and performing an authentication operation on the request protocol, that is, according to the account information in the request. Determine whether the request should be rejected or allowed. After the validity check and authentication operations are successful, generate a user interface admission prompt and perform subsequent operations.
  • Step S620 After the checksum/or authentication succeeds, the request is converted from the first protocol format to a second protocol format identifiable by the subsystem, and the subsystem is configured to process the request.
  • the received request such as the HTTP format
  • Prevail is protocol converted, converted into a message format that each subsystem can understand, such as SIP or other special format, or a custom message standard of each manufacturer.
  • Step S630 sending a request of the second protocol format to the subsystem.
  • the translation and the request are dispatched, and the classification process is performed according to different functions of the request message, for example, the request of the alarm query class is distributed to the alarm subsystem, and the resource query class The request is dispatched to the resource query subsystem, the streaming media class request is dispatched to the streaming media subsystem, and the resulting message is replied to by the respective subsystems.
  • wsdl Network Service Description Language
  • SOAP Simple Object Access Protocol
  • Step S640 the subsystem acquires the streaming media resource in the first encapsulation and/or compression format according to the request, and converts the streaming media resource from the first encapsulation and/or compression format to the second encapsulation and/or compression of the corresponding requester.
  • the format takes the address of the streaming resource in the second encapsulation and/or compression format as a result, so that the requester obtains the streaming media resource by address, and the result is the address of the streaming media resource.
  • the subsystem can return the URL (address) of a video resource, and the requester can directly access the URL.
  • streaming media or picture resources such as audio and video
  • the requester obtains these resources through standard methods such as RTSP (Real Streaming Protocol), RT MP (Real Message Transfer Protocol), HTTP, FTP (File Transfer Protocol), etc. after obtaining the URL of the stream and the picture.
  • the corresponding subsystem providing the streaming media resource needs to have a code stream conversion module, and the module undertakes the resource positioning and dispatching task of the streaming media.
  • the resource location is a resource location for generating a streaming media, that is, a URL, and the resource is uniquely indicated by using a URL.
  • the module obtains the original stream from the streaming media server, that is, requests the original stream transcoding before the reply to generate the URL of the stream resource. After the U RL is generated, it is returned to the requester as it is.
  • the code stream conversion module converts the original stream, including the conversion of the media compression format (G711 to AAC, MPEG4 to H.264, etc., G711, ACC, MPEG4, H.264 are different media compression formats), and the media packet method Conversion, such as TS (Transport Stream) Packet, PS (Program Stream) Packet, FLV (-Streaming Media Format) format, etc., so that streaming media can be decoded and played on different platforms and players.
  • the requester can apply for resources by using various means and protocols such as R TMP, RTSP, HLS (Dynamic Rate Rate Adaptive Technology) according to the URL.
  • the requester and the subsystem are in a peer-to-peer manner, that is, the requester of the media directly applies the streaming media to the subsystem providing the URL (specifically, the code stream conversion module therein) without passing through other intermediate links. Due to the adoption of standard media negotiation mode and standard media packet format, the selection conditions of streaming media processing and playback are very wide, which further reduces the difficulty of calling the original applicant.
  • Step S650 converting the result from the second protocol format to the first protocol format, and returning the result to the requester
  • Step S660 After the streaming media resource is transmitted with the requester, the session f ⁇ information is added to the resource data transmitted each time.
  • the requester receives the streaming media URL and directly requests the streaming media resource through the player, and the application manner may be RTMP, RTSP, etc. according to the return format of the URL.
  • the technical solution of the embodiment is also considered, mainly by adding an authentication mechanism and an effective period authentication in the negotiation session. For example, in a video negotiation session, session information is added to the RTSP header field to indicate the inconsistency of each session, thereby improving the security of the session.
  • a computer readable storage medium storing one or more programs, one or more programs executable by one or more processors, The steps of the request processing method of the foregoing embodiment are implemented.
  • the request sent by the requester does not directly reach the subsystem that processes the request, but first needs to be converted by the protocol format, converted into a protocol format recognizable by the subsystem, and then sent.
  • the subsystem is processed, and the processing result of the subsystem is also converted into the protocol format and returned to the requester. It can be seen that the conversion of the protocol format overcomes the influence of software heterogeneity between the requester and the subsystem, so that the requester and the requester Request processing and data interaction can be successfully completed between subsystems
  • the request sent by the requester does not directly reach the subsystem that processes the request, but first needs to be converted by the protocol format, converted into a protocol format recognizable by the subsystem, and then sent.
  • the subsystem is processed, and the processing result of the subsystem is also converted into the protocol format and returned to the requester. It can be seen that the conversion of the protocol format overcomes the influence of software heterogeneity between the requester and the subsystem, so that the requester and the requester Request processing and data interaction can be successfully completed between subsystems. Therefore, it is industrial.

Abstract

Disclosed in the present invention are a request processing method and device and a computer-readable storage medium, the method comprising: receiving a request sent by a requester in a first protocol format; converting the request from the first protocol format into a second protocol format which may be recognized by a subsystem, the subsystem being used for processing a request; transmitting the request in the second protocol format to the subsystem; obtaining a result for the second protocol format after the subsystem processes the request; converting the result from the second protocol format into the first protocol format; and returning the result to the requester. According to the technical solution of the present invention, the request issued by the requester does not directly reach the subsystem that processes the request, but first needs to be converted into a protocol format which may be recognized by the subsystem, and then is sent to the subsystem for processing; and after the processing result of the subsystem is subjected to protocol format conversion, the result is returned to the requester.

Description

请求处理方法、 装置和计算机可读存储介质 技术领域  Request processing method, device and computer readable storage medium
[0001] 本发明涉及计算机技术领域, 尤其涉及一种请求处理方法、 装置和计算机可读 存储介质。  [0001] The present invention relates to the field of computer technologies, and in particular, to a request processing method, apparatus, and computer readable storage medium.
背景技术  Background technique
[0002] 随着国家智慧城市建设的推进, 包括音视频、 图片、 文本在内的大数据资源成 几何级数地增长。 这些数据被越来越多地使用并产生巨大的应用价值。 但是, 如何将不同厂家的软件系统中的数据集成起来为我所用, 如何更好地采集不同 数据源中的数据, 这个矛盾越来越凸显, 我们称之为数据共享的矛盾。  [0002] With the advancement of national smart city construction, big data resources including audio and video, pictures, and text have grown geometrically. These data are being used more and more and have great application value. However, how to integrate the data in the software systems of different manufacturers for my use, how to better collect data from different data sources, this contradiction has become more and more prominent, we call it the contradiction of data sharing.
[0003] 从数据共享的角度看, 软件有以下特性:  [0003] From the perspective of data sharing, the software has the following characteristics:
[0004] 1、 软件的异构性: 不同厂家幵发的软件, 其内部的协调和调用机制是不同的 , 也就是通信协议不同, 这构成了软件的异构性。 大多数的厂家提供的接口要 么太死板无法扩展, 要么提供的功能和范围有限, 要么只能提供 SDK (软件幵 发工具包) 以对接口做二次幵发, 而采用 SDK方式又局限于操作系统和所依赖 的共同模块, 制约非常大。  [0004] 1, the heterogeneity of software: software from different manufacturers, the internal coordination and calling mechanism is different, that is, the communication protocol is different, which constitutes the heterogeneity of the software. The interfaces provided by most manufacturers are either too rigid and cannot be extended, or they provide limited functions and scope. They can only provide SDK (software bursting toolkit) to make secondary bursts to the interface, while SDK mode is limited to operation. The system and the common modules that depend on it are very restrictive.
[0005] 2、 安全控制特性: 安全控制体现在权限管理、 数据加密、 入侵检测、 反病毒 等多个方面。 由于异构问题, 导致权限兼容性差, 未考虑边缘问题等; 并且同 样由于异构问题, 导致核心信息需采用明文传输; 在互联网一侧, 由于远程过 程调用权限甚至服务器权限的幵放, 导致种种异常主机入侵和非法模块注入的 问题。  [0005] 2, security control features: Security control is reflected in rights management, data encryption, intrusion detection, anti-virus and other aspects. Due to heterogeneous problems, poor compatibility of permissions, no consideration of edge issues, etc.; and due to heterogeneous problems, core information needs to be transmitted in clear text; on the Internet side, due to remote procedure call permissions or even server permissions, resulting in various Abnormal host intrusion and illegal module injection problems.
[0006] 上述特性构成了软件集成和数据共享的最大瓶颈。 因此需要一种新的技术方案 , 可以有效地减轻数据交互吋由于软件异构性带来的巨大幵发量, 解决了操作 系统和依赖库版本的依赖性等问题, 并且有效改善稳定性的传导和安全控制特 性。  [0006] The above characteristics constitute the biggest bottleneck for software integration and data sharing. Therefore, a new technical solution is needed, which can effectively alleviate the data interaction, the huge burst of software due to software heterogeneity, solve the problem of dependence of the operating system and dependent library version, and effectively improve the conduction of stability. And security control features.
技术问题  technical problem
[0007] 本发明的主要目的在于提出一种请求处理方法、 装置和计算机可读存储介质, 旨在克服软件异构性的影响, 顺利实现在软件之间的数据交互。 The main object of the present invention is to provide a request processing method, apparatus and computer readable storage medium, Designed to overcome the effects of software heterogeneity and smoothly implement data interaction between software.
问题的解决方案  Problem solution
技术解决方案  Technical solution
[0008] 为实现上述目的, 本发明提供了一种请求处理方法, 所述方法包括: 接收请求 者发送出的第一协议格式的请求; 将所述请求由所述第一协议格式转换为子系 统可识别的第二协议格式, 所述子系统用于处理所述请求; 将所述第二协议格 式的所述请求发送给所述子系统; 所述子系统处理所述请求后得到所述第二协 议格式的结果; 将所述结果由所述第二协议格式转换为所述第一协议格式; 将 所述结果返回给所述请求者。  [0008] In order to achieve the above object, the present invention provides a request processing method, the method comprising: receiving a request of a first protocol format sent by a requester; converting the request from the first protocol format to a child a second protocol format recognizable by the system, the subsystem is configured to process the request; the request of the second protocol format is sent to the subsystem; and the subsystem processes the request to obtain the a result of the second protocol format; converting the result from the second protocol format to the first protocol format; returning the result to the requester.
[0009] 可选地, 前述的方法, 在所述将所述请求由所述第一协议格式转换为子系统可 识别的第二协议格式之前, 还包括: 对所述请求进行校验和 /或鉴权, 在校验和 / 或鉴权成功后执行所述将所述请求由所述第一协议格式转换为子系统可识别的 第二协议格式。  [0009] Optionally, before the converting the request from the first protocol format to a second protocol format recognizable by the subsystem, the method further includes: performing checksum on the request/ Or authentication, performing the conversion of the request from the first protocol format to a second protocol format recognizable by the subsystem after the checksum/or authentication succeeds.
[0010] 可选地, 前述的方法, 所述请求用于申请流媒体资源, 所述结果为所述流媒体 资源的地址。  [0010] Optionally, in the foregoing method, the request is used to apply for a streaming media resource, and the result is an address of the streaming media resource.
[0011] 可选地, 前述的方法, 所述子系统处理所述请求后得到所述第二协议格式的结 果, 具体包括: 所述子系统根据所述请求获取第一封装和 /或压缩格式的所述流 媒体资源, 将所述流媒体资源由所述第一封装和 /或压缩格式转换为对应所述请 求者的第二封装和 /或压缩格式, 将所述第二封装和 /或压缩格式的所述流媒体资 源的地址作为所述结果, 以供所述请求者按所述地址获取所述流媒体资源。  [0011] Optionally, the foregoing method, after the processing, by the subsystem, the result of the second protocol format, specifically: the subsystem acquiring the first encapsulation and/or compression format according to the request The streaming media resource, converting the streaming media resource from the first encapsulation and/or compression format to a second encapsulation and/or compression format corresponding to the requestor, and the second encapsulation and/or The address of the streaming media resource in the compressed format is used as the result, so that the requester obtains the streaming media resource according to the address.
[0012] 可选地, 前述的方法, 所述将所述第二封装和 /或压缩格式的所述流媒体资源 的地址作为所述结果, 以供所述请求者按所述地址获取所述流媒体资源, 具体 包括: 在与所述请求者传输所述流媒体资源吋, 在每次传输的资源数据中添加 会话信息。  [0012] Optionally, the foregoing method, the address of the streaming media resource in the second encapsulation and/or compression format is used as the result, where the requester obtains the content according to the address The streaming media resource specifically includes: after transmitting the streaming media resource with the requester, adding session information in each transmitted resource data.
[0013] 为实现上述目的, 本发明还提供了一种请求处理装置, 所述装置包括: 接口管 理模块, 用于接收请求者发送出的第一协议格式的请求; 系统接口模块, 用于 将所述请求由所述第一协议格式转换为子系统可识别的第二协议格式, 所述子 系统用于处理所述请求; 系统管理模块, 将所述第二协议格式的所述请求发送 给所述子系统; 所述子系统, 用于处理所述请求后得到所述第二协议格式的结 果; 所述系统管理模块将所述结果由所述第二协议格式转换为所述第一协议格 式后, 经所系统接口模块、 所述接口管理模块将所述结果返回给所述请求者。 [0013] In order to achieve the above object, the present invention further provides a request processing apparatus, the apparatus comprising: an interface management module, configured to receive a request of a first protocol format sent by a requester; a system interface module, configured to Transmitting, by the first protocol format, a second protocol format recognizable by a subsystem, the subsystem is configured to process the request, and the system management module sends the request in the second protocol format Giving the subsystem; the subsystem, configured to process the request to obtain a result of the second protocol format; the system management module converting the result from the second protocol format to the first After the protocol format, the system interface module and the interface management module return the result to the requester.
[0014] 可选地, 前述的装置, 在所述将所述请求由所述第一协议格式转换为子系统可 识别的第二协议格式之前, 所述接口管理模块还对所述请求进行校验和 /或鉴权 , 在校验和 /或鉴权成功后所述系统接口模块执行所述将所述请求由所述第一协 议格式转换为子系统可识别的第二协议格式。  [0014] Optionally, the foregoing apparatus, before the converting the request from the first protocol format to a second protocol format recognizable by a subsystem, the interface management module further performing the request And/or authenticating, after the checksum/or authentication succeeds, the system interface module performs the converting of the request from the first protocol format to a second protocol format recognizable by the subsystem.
[0015] 可选地, 前述的装置, 所述请求用于申请流媒体资源, 所述结果为所述流媒体 资源的地址。  [0015] Optionally, in the foregoing device, the request is used to apply for a streaming media resource, and the result is an address of the streaming media resource.
[0016] 可选地, 前述的装置, 所述子系统根据所述请求获取第一封装和 /或压缩格式 的所述流媒体资源, 将所述流媒体资源由所述第一封装和 /或压缩格式转换为对 应所述请求者的第二封装和 /或压缩格式, 将所述第二封装和 /或压缩格式的所述 流媒体资源的地址作为所述结果, 以供所述请求者按所述地址获取所述流媒体 资源。  [0016] Optionally, the foregoing apparatus, the subsystem acquires the streaming media resource in a first encapsulation and/or compression format according to the request, and the streaming media resource is used by the first encapsulation and/or Compressing the format into a second encapsulation and/or compression format corresponding to the requestor, using the address of the streaming media resource in the second encapsulation and/or compression format as the result, for the requester to press The address acquires the streaming media resource.
[0017] 可选地, 前述的装置, 所述子系统在与所述请求者传输所述流媒体资源吋, 在 每次传输的资源数据中添加会话信息。  [0017] Optionally, in the foregoing apparatus, the subsystem adds session information in each transmitted resource data after transmitting the streaming media resource with the requester.
[0018] 为实现上述目的, 本发明还提供了一种计算机可读存储介质, 所述计算机可读 存储介质存储有一个或者多个程序, 所述一个或者多个程序可被一个或者多个 处理器执行, 以实现前述方法的步骤。 [0018] In order to achieve the above object, the present invention also provides a computer readable storage medium storing one or more programs, the one or more programs may be processed by one or more The device is executed to implement the steps of the foregoing method.
[0019] 根据以上技术方案, 可知本发明的请求处理方法、 装置和计算机可读存储介质 至少具有以下优点: [0019] According to the above technical solution, it is known that the request processing method, apparatus, and computer readable storage medium of the present invention have at least the following advantages:
发明的有益效果  Advantageous effects of the invention
有益效果  Beneficial effect
[0020] 根据本发明的技术方案, 请求者发出的请求并非直接到达处理请求的子系统, 而是首先需要经过协议格式的转换, 将其转换为子系统能够识别的协议格式, 再将其发送给子系统进行处理, 子系统的处理结果同样进行协议格式转换后, 返回给请求者, 可见通过协议格式的转换, 克服了请求者与子系统之间软件异 构性的影响, 从而请求者与子系统之间可以顺利地完成请求处理以及数据交互 对附图的简要说明 [0020] According to the technical solution of the present invention, the request sent by the requester does not directly reach the subsystem that processes the request, but first needs to be converted by the protocol format, converted into a protocol format recognizable by the subsystem, and then sent. The subsystem is processed, and the processing result of the subsystem is also converted into the protocol format and returned to the requester. It can be seen that the conversion of the protocol format overcomes the influence of software heterogeneity between the requester and the subsystem, so that the requester and the requester Request processing and data interaction can be successfully completed between subsystems Brief description of the drawing
附图说明  DRAWINGS
[0021] 图 1为根据本发明的一个实施例的请求处理装置的框图;  1 is a block diagram of a request processing apparatus in accordance with an embodiment of the present invention;
[0022] 图 2为根据本发明的一个实施例的请求处理装置的原理图;  2 is a schematic diagram of a request processing device in accordance with an embodiment of the present invention;
[0023] 图 3为根据本发明的一个实施例的请求处理装置的框图;  3 is a block diagram of a request processing apparatus in accordance with an embodiment of the present invention;
[0024] 图 4A为根据本发明的一个实施例的请求处理装置的框图;  4A is a block diagram of a request processing apparatus in accordance with an embodiment of the present invention; [0024] FIG.
[0025] 图 4B为根据本发明的一个实施例的请求处理装置的原理图;  4B is a schematic diagram of a request processing device in accordance with an embodiment of the present invention; [0025] FIG.
[0026] 图 5为根据本发明的一个实施例的请求处理方法的流程图;  FIG. 5 is a flowchart of a request processing method according to an embodiment of the present invention; FIG.
[0027] 图 6为根据本发明的一个实施例的请求处理方法的流程图。  6 is a flow chart of a request processing method according to an embodiment of the present invention.
[0028] 本发明目的的实现、 功能特点及优点将结合实施例, 参照附图做进一步说明。  [0028] The implementation, functional features, and advantages of the present invention will be further described with reference to the accompanying drawings.
本发明的实施方式 Embodiments of the invention
[0029] 应当理解, 此处所描述的具体实施例仅仅用以解释本发明, 并不用于限定本发 明。  [0029] It is to be understood that the specific embodiments described herein are merely illustrative of the invention.
[0030] 在后续的描述中, 使用用于表示元件的诸如"模块"、 "部件 "或"单元"的后缀仅 为了有利于本发明的说明, 其本身没有特有的意义。 因此, "模块"、 "部件 "或" 单元"可以混合地使用。  [0030] In the following description, the suffixes such as "module", "component" or "unit" used to denote an element are merely for the purpose of facilitating the description of the present invention, and have no specific meaning per se. Therefore, "module", "part" or "unit" can be used in combination.
[0031] 如图 1所示, 本发明的一个实施例中提供了一种请求处理装置, 本实施例的装 置包括:  [0031] As shown in FIG. 1, an embodiment of the present invention provides a request processing apparatus. The apparatus of this embodiment includes:
[0032] 接口管理模块 110, 用于接收请求者发送出的第一协议格式的请求。  [0032] The interface management module 110 is configured to receive a request of the first protocol format sent by the requester.
[0033] 在本实施例中, 对第一协议格式的类型不进行限制, 具体地, 可以采用 HTTP [0033] In this embodiment, the type of the first protocol format is not limited, and specifically, HTTP may be adopted.
(超文本传输协议) +JSON (JavaScript对象标记) 格式。 在本实施例中, 接口 管理模块 110位于整个请求处理装置的最上层, 负责北向输出, 输出的接口规范 可以采用前述的 HTTP+JSON。  (Hypertext Transfer Protocol) + JSON (JavaScript Object Marker) format. In this embodiment, the interface management module 110 is located at the uppermost layer of the entire request processing device, and is responsible for the northbound output. The output interface specification can adopt the aforementioned HTTP+JSON.
[0034] 系统接口模块 120, 用于将请求由第一协议格式转换为子系统可识别的第二协 议格式, 子系统用于处理请求。 [0034] The system interface module 120 is configured to convert the request from the first protocol format to a second protocol format recognizable by the subsystem, and the subsystem is configured to process the request.
[0035] 在本实施例中, 对第二协议格式的类型不进行限制, 具体地, 可以采用 SIP ( 会话初始协议) 或其他私有的格式。 在本实施例中, 系统接口模块 120负责接收 接口管理模块 110发送过来的请求报文和向接口管理模块 110返回结果报文, 所 以系统接口模块 120需要具有协议转换功能, 例如从 HTTP+JSON的格式转换为 SI P或者其他私有格式。 本实施例中, 系统接口模块 120体现的是标准协议转换为 内部协议的过程, 实现了协议转换功能。 [0035] In this embodiment, the type of the second protocol format is not limited, and specifically, SIP ( Session Initiation Protocol) or other proprietary format. In this embodiment, the system interface module 120 is responsible for receiving the request message sent by the interface management module 110 and returning the result message to the interface management module 110. Therefore, the system interface module 120 needs to have a protocol conversion function, for example, from HTTP+JSON. The format is converted to SI P or other proprietary format. In this embodiment, the system interface module 120 embodies a process of converting a standard protocol into an internal protocol, and implements a protocol conversion function.
[0036] 系统管理模块 130, 将第二协议格式的请求发送给子系统。 [0036] The system management module 130 sends a request for the second protocol format to the subsystem.
[0037] 在本实施例中, 系统管理模块 130根据转换后的请求报文来选择相应的子系统 来获取对应的资源文件。 系统管理模块 130负责整个装置的管理, 对于新加入和 退出的子系统进行管理, 并接收系统接口模块 120协议转换后的请求报文并对请 求报文进行分析和处理, 针对不同的请求报文进行合理分派到对应的子系统。 请求报文可以分为资源査询、 告警査询、 媒体请求、 图片査询等多种, 根据请 求报文的类型向不同的子系统进行派发。 若请求者发送的请求为多个, 系统管 理模块 130对从多个子系统 (例如, 告警处理子系统、 图片査询子系统等等) 获 取资源后进行汇总整理后进行综合反馈, 具体如图 2所示。 [0037] In this embodiment, the system management module 130 selects a corresponding subsystem according to the converted request message to obtain a corresponding resource file. The system management module 130 is responsible for the management of the entire device, manages the newly added and exited subsystems, and receives the request packets converted by the system interface module 120 and analyzes and processes the request packets, for different request messages. Reasonably dispatched to the corresponding subsystem. The request packet can be classified into a resource query, an alarm query, a media request, a picture query, and the like, and is distributed to different subsystems according to the type of the request message. If the number of requests sent by the requester is multiple, the system management module 130 performs comprehensive feedback after collecting resources from multiple subsystems (for example, the alarm processing subsystem, the image query subsystem, etc.), as shown in FIG. 2 . Shown.
[0038] 子系统 140, 用于处理请求后得到第二协议格式的结果。 [0038] The subsystem 140 is configured to obtain a result of the second protocol format after processing the request.
[0039] 在本实施例中, 子系统的数量为一个或多个, 用于处理不同业务的请求。 在本 实施例中, 子系统 140收到系统管理模块 130派发的请求后进行实际处理, 并将 处理结果返回给系统管理模块 130。 例如, 子系统可以是报警管理模块, 获取报 警管理文件并返回系统管理模块 130。  [0039] In this embodiment, the number of subsystems is one or more, and is used to process requests for different services. In this embodiment, the subsystem 140 receives the request dispatched by the system management module 130, performs the actual processing, and returns the processing result to the system management module 130. For example, the subsystem can be an alarm management module that obtains an alarm management file and returns to the system management module 130.
[0040] 在本实施例中, 每个子系统仅处理对应的项业务, 获取所需的资源文件。 系统 管理模块 130将结果由第二协议格式转换为第一协议格式后, 经统接口模块 120 、 接口管理模块 110将结果返回给请求者。  [0040] In this embodiment, each subsystem processes only the corresponding item service and acquires the required resource file. After the system management module 130 converts the result from the second protocol format to the first protocol format, the system interface module 120 and the interface management module 110 return the result to the requester.
[0041] 系统管理模块 130将处理结果按原路返回给系统接口模块 120, 系统接口模块 12 0将结果报文转换成 HTTP+JSON格式再返回给接口管理模块 110。 接口管理模块 1 10再将这些结果以 HTTP+JSON的格式返回给最初的请求者。 由此可见, 本实施 例中接口管理模块 110的设计采用了 Restful形式。 Restful是目前比较成熟的一套 互联网应用程序的接口设计理论, 它使用 URL来定位和指向资源, 使用 JSON等 格式表现资源的形式, 使用 HTTP等若干方法对资源进行操作。 [0042] 根据本实施例的技术方案, 实现了一种完整的用于处理请求并分配结果资源的 技术方案。 由于最外层的接口管理模块 110通过 HTTP+JSON的方式向外公布, 因 此对外的接口是标准和可扩展的, 并且完全不需要考虑操作系统和相关模块的 版本依赖问题, 即不受软件异构性的影响。 因此根据本实施例的技术方案, 获 取资源而需要的幵发量和技术门槛大大降低了。 [0041] The system management module 130 returns the processing result to the system interface module 120 as it is, and the system interface module 120 converts the result message into an HTTP+JSON format and returns it to the interface management module 110. The interface management module 1 10 then returns these results to the original requester in HTTP+JSON format. It can be seen that the design of the interface management module 110 in this embodiment adopts the Restful form. Restful is a relatively mature interface design theory for Internet applications. It uses URLs to locate and point to resources, uses JSON and other formats to represent resource forms, and uses HTTP and other methods to manipulate resources. [0042] According to the technical solution of the embodiment, a complete technical solution for processing a request and allocating a result resource is implemented. Since the outermost interface management module 110 is advertised by means of HTTP+JSON, the external interface is standard and extensible, and there is no need to consider the version dependency problem of the operating system and related modules, that is, not subject to software differences. The influence of structure. Therefore, according to the technical solution of the embodiment, the burst amount and the technical threshold required for acquiring resources are greatly reduced.
[0043] 本发明的一个实施例中提供了一种请求处理装置, 本实施例的装置包括: [0043] An embodiment of the present invention provides a request processing apparatus, where the apparatus of this embodiment includes:
[0044] 接口管理模块 110, 用于接收请求者发送出的第一协议格式的请求, 请求用于 申请流媒体资源, 以及对请求进行校验和 /或鉴权。 [0044] The interface management module 110 is configured to receive a request of the first protocol format sent by the requester, request the application for the streaming media resource, and perform verification and/or authentication on the request.
[0045] 在本实施例中, 对校验、 鉴权的方式不进行限制。 在本实施例中, 接收外部的 资源申请的 HTTP请求, 并调用相应功能进行鉴权和统计, 鉴权成功后对请求进 行后续处理。 具体地, 系统接口模块 120接收外部的 HTTP+JSON请求协议后, 可 以对请求协议进行来源校验和统计, 例如根据源地址来校验合法性, 以及对请 求协议进行鉴权操作, 即根据请求中的账号信息判断是否应该拒绝或者允许该 请求, 在合法性校验和鉴权操作都成功过之后, 生成用户界面准入提示, 并将 请求传到系统接口模块 120, 具体如图 3所示。  [0045] In this embodiment, the manner of verifying and authenticating is not limited. In this embodiment, an HTTP request for an external resource request is received, and a corresponding function is invoked for authentication and statistics, and the request is subsequently processed after the authentication succeeds. Specifically, after receiving the external HTTP+JSON request protocol, the system interface module 120 may perform source check and statistics on the request protocol, for example, verifying the validity according to the source address, and performing an authentication operation on the request protocol, that is, according to the request. The account information in the judgment determines whether the request should be rejected or allowed. After the validity check and the authentication operation are successful, a user interface admission prompt is generated, and the request is transmitted to the system interface module 120, as shown in FIG. .
[0046] 系统接口模块 120, 用于在校验和 /或鉴权成功后将请求由第一协议格式转换为 子系统可识别的第二协议格式, 子系统用于处理请求。  [0046] The system interface module 120 is configured to convert the request from the first protocol format to a second protocol format recognizable by the subsystem after the checksum/authentication succeeds, and the subsystem is configured to process the request.
[0047] 在本实施例中, 对接收的例如 HTTP格式的请求进行协议转换, 转换为各个子 系统可以理解的报文格式, 例如 SIP或者其他特种格式, 或者以各个厂家的自定 义报文标准为准, 转换后的同义报文转发给系统管理模块 130进行处理。  [0047] In this embodiment, the received request, such as the HTTP format, is protocol-converted, converted into a message format that each subsystem can understand, such as SIP or other special format, or a custom message standard of each manufacturer. The converted synonym message is forwarded to the system management module 130 for processing.
[0048] 系统管理模块 130, 将第二协议格式的请求发送给子系统。  [0048] The system management module 130 sends a request for the second protocol format to the subsystem.
[0049] 在本实施例中, 收到请求报文后进行翻译和请求分派, 根据请求报文的不同功 用进行分类处理, 例如告警査询类的请求向告警子系统派发, 资源査询类的请 求向资源査询子系统派发, 流媒体类请求向流媒体子系统派发, 以及等待相应 各个子系统回复的结果报文。 同吋, 接口管理模块 110可以集成 wsdl (网络服务 描述语言) 文件, 针对某些需要 SOAP (简单对象访问协议) 协议调用的资源, 可以动态地作为网络服务的客户端进行适配调用。  [0049] In this embodiment, after the request message is received, the translation and the request are dispatched, and the classification process is performed according to different functions of the request message. For example, the request of the alarm query class is distributed to the alarm subsystem, and the resource query class The request is dispatched to the resource query subsystem, the streaming media class request is dispatched to the streaming media subsystem, and the resulting message is replied to by the respective subsystems. Similarly, the interface management module 110 can integrate wsdl (network service description language) files, and can be dynamically adapted as a client of the network service for some resources that require SOAP (Simple Object Access Protocol) protocol calls.
[0050] 子系统 140, 根据请求获取第一封装和 /或压缩格式的流媒体资源, 将流媒体资 源由第一封装和 /或压缩格式转换为对应请求者的第二封装和 /或压缩格式, 将第 二封装和 /或压缩格式的流媒体资源的地址作为结果, 以供请求者按地址获取流 媒体资源, 结果为流媒体资源的地址。 [0050] The subsystem 140 acquires the streaming media resource in the first encapsulation and/or compression format according to the request, and the streaming media resource The source is converted into a second encapsulation and/or compression format of the corresponding requester by the first encapsulation and/or compression format, and the address of the streaming resource of the second encapsulation and/or compression format is used as a result for the requester to obtain by address Streaming media resources, the result is the address of the streaming media resource.
[0051] 在本实施例中, 例如, 请求者请求的是视频资源的话, 那么子系统可以返回一 个视频资源的 URL (地址) , 那么请求者可以直接访问 URL。 在本实施例中, 针对音视频等流媒体或者图片资源, 可以通过将 URL封装在 JSON返回报文中的 方式给出。 请求者在得到流和图片的 URL后通过 RTSP (实吋流传输协议) 、 RT MP (实吋消息传输协议) 、 HTTP、 FTP (文件传输协议) 等标准手段获取这些 资源。  [0051] In this embodiment, for example, if the requester requests a video resource, then the subsystem can return the URL (address) of a video resource, and the requester can directly access the URL. In this embodiment, streaming media or picture resources, such as audio and video, can be given by encapsulating the URL in the JSON return message. The requester obtains these resources through standard methods such as RTSP (Real Streaming Protocol), RT MP (Real Message Transfer Protocol), HTTP, FTP (File Transfer Protocol), etc. after obtaining the URL of the stream and the picture.
[0052] 在本实施例中, 针对申请流媒体资源的请求, 对应的提供流媒体资源的子系统 中需要具有码流转换模块, 这个模块承担了流媒体的资源定位和派发任务。 如 图 4A和图 4B所示, 所谓资源定位就是生成流媒体的资源位置, 即 URL, 使用 UR L唯一地标示资源。 在接收到系统管理模块 130派发过来的媒体资源申请报文后 , 该模块向流媒体服务器获取原始流, 即在回复之前先行请求原始流转码, 以 生成流资源的 URL。 生成 URL后再将其回复给系统管理模块 130, 系统管理模块 130将其按原路返回给请求者。 之后码流转换模块将原始流进行转换, 包括媒体 压缩格式的转换 (G711转 AAC, MPEG4转 H.264等, G711、 ACC、 MPEG4、 H. 264为不同的媒体压缩格式) , 媒体封包方式的转换, 例如 TS (传输流) 封包、 PS (节目流) 封包、 FLV (—种流媒体格式) 格式等, 以便流媒体在不同的平 台和播放器中解码播放。 请求者收到了 URL后, 可以根据 URL的标示采用 RTMP 、 RTSP、 HLS (动态码率自适应技术) 等各种手段和协议进行资源申请, 请求 者与子系统之间是点对点的方式, 也就是说媒体的请求者直接向提供 URL的子 系统 (具体地, 可以是其中的码流转换模块) 申请流媒体而不经过接口管理模 块等 130其他中间环节。 由于采用了标准媒体协商方式和标准媒体封包格式, 因 此流媒体处理和播放的选择条件非常宽广, 进一步降低了原始申请者的调用难 度。  [0052] In this embodiment, for the request for the streaming media resource, the corresponding subsystem providing the streaming media resource needs to have a code stream conversion module, and the module undertakes the resource positioning and dispatching task of the streaming media. As shown in FIG. 4A and FIG. 4B, the resource location is the resource location of the generated streaming media, that is, the URL, and the resource is uniquely indicated by the UR L. After receiving the media resource application message sent by the system management module 130, the module obtains the original stream from the streaming media server, that is, requests the original stream transcoding before the reply to generate the URL of the stream resource. After the URL is generated, it is returned to the system management module 130, and the system management module 130 returns it to the requester as it is. The code stream conversion module then converts the original stream, including media compression format conversion (G711 to AAC, MPEG4 to H.264, etc., G711, ACC, MPEG4, H.264 for different media compression formats), media packetization Conversion, such as TS (Transport Stream) Packet, PS (Program Stream) Packet, FLV (-Streaming Media Format) format, etc., so that streaming media can be decoded and played on different platforms and players. After the requester receives the URL, it can use the various means and protocols such as RTMP, RTSP, HLS (Dynamic Rate Rate Adaptive Technology) to apply for the resource according to the URL. The requester and the subsystem are peer-to-peer, that is, The requester of the media is directly requested to apply the streaming media to the subsystem providing the URL (specifically, the code stream conversion module therein) without passing through other intermediate links of the interface management module and the like. Due to the adoption of standard media negotiation methods and standard media packet formats, the selection conditions for streaming media processing and playback are very broad, further reducing the difficulty of calling the original applicant.
[0053] 在整个装置中, 系统接口模块 120和系统管理模块 130大致相当于 ESB (企业服 务总线, 支持路由选择、 协议转换、 报文交换、 协议鉴权、 安全策略、 负载均 衡、 动态接入等多种功能) , 他们负责协议转换、 路由选择、 服务准入准出管 理等服务工作。 [0053] Throughout the device, the system interface module 120 and the system management module 130 are roughly equivalent to the ESB (Enterprise Service Bus, supporting routing, protocol conversion, message exchange, protocol authentication, security policy, load, etc.) Balance, dynamic access and other functions), they are responsible for protocol conversion, routing, service access and management services.
[0054] 系统管理模块 130将结果由第二协议格式转换为第一协议格式后, 经统接口模 块 120、 接口管理模块 110将结果返回给请求者。  [0054] After the system management module 130 converts the result from the second protocol format to the first protocol format, the system interface module 120 and the interface management module 110 return the result to the requester.
[0055] 子系统 140在与请求者传输流媒体资源吋, 在每次传输的资源数据中添加会话 f π息。 [0055] The subsystem 140 adds a session f π interest in each transmitted resource data after transmitting the streaming media resource with the requester.
[0056] 在本实施例中, 请求者收到流媒体的 URL后通过播放器直接申请流媒体资源, 申请的方式可以根据 URL的返回格式分别为 RTMP、 RTSP等。 而针对视频流传 输控制的安全性, 本实施例的技术方案中也有考虑, 主要是通过在协商会话中 加入鉴权机制和有效期鉴别实现。 例如在视频协商会话中, 在 RTSP的头域中加 入会话信息, 标示每次会话的不一致性, 从而提高会话的安全性。  [0056] In this embodiment, the requester receives the streaming media URL and directly requests the streaming media resource through the player, and the application manner may be RTMP, RTSP, etc. according to the return format of the URL. For the security of the video stream transmission control, the technical solution of the embodiment is also considered, mainly by adding an authentication mechanism and an effective period authentication in the negotiation session. For example, in a video negotiation session, session information is added to the RTSP header field to indicate the inconsistency of each session, thereby improving the security of the session.
[0057] 如图 5所示, 本发明的一个实施例中提供了一种请求处理方法, 本实施例的方 法包括:  [0057] As shown in FIG. 5, in an embodiment of the present invention, a request processing method is provided. The method in this embodiment includes:
[0058] 步骤 S510, 接收请求者发送出的第一协议格式的请求。  [0058] Step S510: Receive a request of the first protocol format sent by the requester.
[0059] 在本实施例中, 对第一协议格式的类型不进行限制, 具体地, 可以采用 HTTP  [0059] In this embodiment, the type of the first protocol format is not limited, and specifically, HTTP may be adopted.
(超文本传输协议) +JSON (JavaScript对象标记) 格式。  (Hypertext Transfer Protocol) + JSON (JavaScript Object Marker) format.
[0060] 步骤 S520, 将请求由第一协议格式转换为子系统可识别的第二协议格式, 子系 统用于处理请求。 [0060] Step S520: Convert the request from the first protocol format to a second protocol format recognizable by the subsystem, and the subsystem is used to process the request.
[0061] 在本实施例中, 对第二协议格式的类型不进行限制, 具体地, 可以采用 SIP ( 会话初始协议) 或其他私有的格式。 在本实施例中, 本步骤实现了协议转换功 育 , 例如从 HTTP+JSON的格式转换为 SIP或者其他私有格式。 本实施例中, 本步 骤体现的是标准协议转换为内部协议的过程, 实现了协议转换功能。  [0061] In this embodiment, the type of the second protocol format is not limited, and specifically, a SIP (Session Initiation Protocol) or other proprietary format may be adopted. In this embodiment, this step implements protocol conversion, such as conversion from HTTP+JSON format to SIP or other proprietary format. In this embodiment, the step reflects the process of converting the standard protocol into an internal protocol, and implements the protocol conversion function.
[0062] 步骤 S530, 将第二协议格式的请求发送给子系统。  [0062] Step S530, sending a request of the second protocol format to the subsystem.
[0063] 在本实施例中, 根据转换后的请求报文来选择相应的子系统来获取对应的资源 文件。 具体地, 接收协议转换后的请求报文并对请求报文进行分析和处理, 针 对不同的请求报文进行合理分派到对应的子系统。 请求报文可以分为资源査询 、 告警査询、 媒体请求、 图片査询等多种, 根据请求报文的类型向不同的子系 统进行派发。 若请求者发送的请求为多个。 [0064] 步骤 S540, 子系统处理请求后得到第二协议格式的结果。 [0063] In this embodiment, the corresponding subsystem is selected according to the converted request message to obtain the corresponding resource file. Specifically, the request packet after the protocol conversion is received, and the request packet is analyzed and processed, and different request messages are appropriately allocated to the corresponding subsystem. The request packet can be classified into a resource query, an alarm query, a media request, a picture query, and the like, and is distributed to different subsystems according to the type of the request message. If the requester sends more than one request. [0064] Step S540: The subsystem obtains the result of the second protocol format after processing the request.
[0065] 在本实施例中, 子系统的数量为一个或多个, 用于处理不同业务的请求。 在本 实施例中, 子系统收到派发的请求后进行实际处理。 例如, 子系统可以是报警 管理模块, 获取报警管理文件并返回系统管理模块 130。  [0065] In this embodiment, the number of subsystems is one or more, and is used to process requests for different services. In this embodiment, the subsystem performs the actual processing after receiving the dispatch request. For example, the subsystem can be an alarm management module that obtains an alarm management file and returns to the system management module 130.
[0066] 在本实施例中, 每个子系统仅处理对应的项业务, 获取所需的资源文件。 [0066] In this embodiment, each subsystem processes only the corresponding item service and acquires the required resource file.
[0067] 步骤 S550, 将结果由第二协议格式转换为第一协议格式后返回给请求者。 [0067] Step S550: The result is converted from the second protocol format to the first protocol format and returned to the requester.
[0068] 在本实施例中, 例如, 子系统的处理结果转换成 HTTP+JSON格式再返回给最 初的请求者。 In the present embodiment, for example, the processing result of the subsystem is converted into an HTTP+JSON format and returned to the original requester.
[0069] 根据本实施例的技术方案, 实现了一种完整的用于处理请求并分配结果资源的 技术方案。 由于接收的请求格式可以为例如 HTTP+JSON, 所以能够实现对外的 接口是标准和可扩展的, 并且完全不需要考虑操作系统和相关模块的版本依赖 问题, 即不受软件异构性的影响。 因此根据本实施例的技术方案, 获取资源而 需要的幵发量和技术门槛大大降低了。  [0069] According to the technical solution of the embodiment, a complete technical solution for processing a request and allocating a result resource is implemented. Since the received request format can be, for example, HTTP+JSON, it is standard and extensible to implement the external interface, and there is no need to consider the version dependency of the operating system and related modules, that is, not affected by software heterogeneity. Therefore, according to the technical solution of the embodiment, the burst amount and the technical threshold required for acquiring resources are greatly reduced.
[0070] 如图 6所示, 本发明的一个实施例中提供了一种请求处理方法, 本实施例的方 法包括:  As shown in FIG. 6, an embodiment of the present invention provides a request processing method, and the method in this embodiment includes:
[0071] 步骤 S610, 接收请求者发送出的第一协议格式的请求, 请求用于申请流媒体资 源, 以及对请求进行校验和 /或鉴权。  [0071] Step S610: Receive a request of the first protocol format sent by the requester, request the application for the streaming media resource, and perform verification and/or authentication on the request.
[0072] 在本实施例中, 对校验、 鉴权的方式不进行限制。 在本实施例中, 接收外部的 资源申请的 HTTP请求, 并调用相应功能进行鉴权和统计, 鉴权成功后对请求进 行后续处理。 具体地, 接收外部的 HTTP+JSON请求协议后, 可以对请求协议进 行来源校验和统计, 例如根据源地址来校验合法性, 以及对请求协议进行鉴权 操作, 即根据请求中的账号信息判断是否应该拒绝或者允许该请求, 在合法性 校验和鉴权操作都成功过之后, 生成用户界面准入提示, 并执行后续的操作。  [0072] In this embodiment, the manner of verification and authentication is not limited. In this embodiment, an HTTP request for an external resource request is received, and a corresponding function is invoked for authentication and statistics, and the request is subsequently processed after the authentication succeeds. Specifically, after receiving the external HTTP+JSON request protocol, the source protocol checksum statistics may be performed on the request protocol, for example, verifying the validity according to the source address, and performing an authentication operation on the request protocol, that is, according to the account information in the request. Determine whether the request should be rejected or allowed. After the validity check and authentication operations are successful, generate a user interface admission prompt and perform subsequent operations.
[0073] 步骤 S620, 在校验和 /或鉴权成功后将请求由第一协议格式转换为子系统可识 别的第二协议格式, 子系统用于处理请求。  [0073] Step S620: After the checksum/or authentication succeeds, the request is converted from the first protocol format to a second protocol format identifiable by the subsystem, and the subsystem is configured to process the request.
[0074] 在本实施例中, 对接收的例如 HTTP格式的请求进行协议转换, 转换为各个子 系统可以理解的报文格式, 例如 SIP或者其他特种格式, 或者以各个厂家的自定 义报文标准为准。 [0075] 步骤 S630, 将第二协议格式的请求发送给子系统。 [0074] In this embodiment, the received request, such as the HTTP format, is protocol converted, converted into a message format that each subsystem can understand, such as SIP or other special format, or a custom message standard of each manufacturer. Prevail. [0075] Step S630, sending a request of the second protocol format to the subsystem.
[0076] 在本实施例中, 收到请求报文后进行翻译和请求分派, 根据请求报文的不同功 用进行分类处理, 例如告警査询类的请求向告警子系统派发, 资源査询类的请 求向资源査询子系统派发, 流媒体类请求向流媒体子系统派发, 以及等待相应 各个子系统回复的结果报文。 同吋, 还可以集成 wsdl (网络服务描述语言) 文件 , 针对某些需要 SOAP (简单对象访问协议) 协议调用的资源, 可以动态地作为 网络服务的客户端进行适配调用。  [0076] In this embodiment, after the request message is received, the translation and the request are dispatched, and the classification process is performed according to different functions of the request message, for example, the request of the alarm query class is distributed to the alarm subsystem, and the resource query class The request is dispatched to the resource query subsystem, the streaming media class request is dispatched to the streaming media subsystem, and the resulting message is replied to by the respective subsystems. Similarly, you can also integrate wsdl (Network Service Description Language) files, which can be dynamically adapted as a client of a network service for certain resources that require SOAP (Simple Object Access Protocol) protocol calls.
[0077] 步骤 S640, 子系统根据请求获取第一封装和 /或压缩格式的流媒体资源, 将流 媒体资源由第一封装和 /或压缩格式转换为对应请求者的第二封装和 /或压缩格式 , 将第二封装和 /或压缩格式的流媒体资源的地址作为结果, 以供请求者按地址 获取流媒体资源, 结果为流媒体资源的地址。  [0077] Step S640, the subsystem acquires the streaming media resource in the first encapsulation and/or compression format according to the request, and converts the streaming media resource from the first encapsulation and/or compression format to the second encapsulation and/or compression of the corresponding requester. The format takes the address of the streaming resource in the second encapsulation and/or compression format as a result, so that the requester obtains the streaming media resource by address, and the result is the address of the streaming media resource.
[0078] 在本实施例中, 例如, 请求者请求的是视频资源的话, 那么子系统可以返回一 个视频资源的 URL (地址) , 那么请求者可以直接访问 URL。 在本实施例中, 针对音视频等流媒体或者图片资源, 可以通过将 URL封装在 JSON返回报文中的 方式给出。 请求者在得到流和图片的 URL后通过 RTSP (实吋流传输协议) 、 RT MP (实吋消息传输协议) 、 HTTP、 FTP (文件传输协议) 等标准手段获取这些 资源。  [0078] In this embodiment, for example, if the requester requests a video resource, then the subsystem can return the URL (address) of a video resource, and the requester can directly access the URL. In this embodiment, streaming media or picture resources, such as audio and video, can be given by encapsulating the URL in the JSON return message. The requester obtains these resources through standard methods such as RTSP (Real Streaming Protocol), RT MP (Real Message Transfer Protocol), HTTP, FTP (File Transfer Protocol), etc. after obtaining the URL of the stream and the picture.
[0079] 在本实施例中, 针对申请流媒体资源的请求, 对应的提供流媒体资源的子系统 中需要具有码流转换模块, 这个模块承担了流媒体的资源定位和派发任务。 如 图 4所示, 所谓资源定位就是生成流媒体的资源位置, 即 URL, 使用 URL唯一地 标示资源。 在接收到派发过来的媒体资源申请报文后, 该模块向流媒体服务器 获取原始流, 即在回复之前先行请求原始流转码, 以生成流资源的 URL。 生成 U RL后再将其按原路返回给请求者。 之后码流转换模块将原始流进行转换, 包括 媒体压缩格式的转换 (G711转 AAC, MPEG4转 H.264等, G711、 ACC、 MPEG4 、 H.264为不同的媒体压缩格式) , 媒体封包方式的转换, 例如 TS (传输流) 封 包、 PS (节目流) 封包、 FLV (—种流媒体格式) 格式等, 以便流媒体在不同 的平台和播放器中解码播放。 请求者收到了 URL后, 可以根据 URL的标示采用 R TMP、 RTSP、 HLS (动态码率自适应技术) 等各种手段和协议进行资源申请, 请求者与子系统之间是点对点的方式, 也就是说媒体的请求者直接向提供 URL 的子系统 (具体地, 可以是其中的码流转换模块) 申请流媒体而不经过其他中 间环节。 由于采用了标准媒体协商方式和标准媒体封包格式, 因此流媒体处理 和播放的选择条件非常宽广, 进一步降低了原始申请者的调用难度。 [0079] In this embodiment, for the request for the streaming media resource, the corresponding subsystem providing the streaming media resource needs to have a code stream conversion module, and the module undertakes the resource positioning and dispatching task of the streaming media. As shown in FIG. 4, the resource location is a resource location for generating a streaming media, that is, a URL, and the resource is uniquely indicated by using a URL. After receiving the submitted media resource application message, the module obtains the original stream from the streaming media server, that is, requests the original stream transcoding before the reply to generate the URL of the stream resource. After the U RL is generated, it is returned to the requester as it is. Afterwards, the code stream conversion module converts the original stream, including the conversion of the media compression format (G711 to AAC, MPEG4 to H.264, etc., G711, ACC, MPEG4, H.264 are different media compression formats), and the media packet method Conversion, such as TS (Transport Stream) Packet, PS (Program Stream) Packet, FLV (-Streaming Media Format) format, etc., so that streaming media can be decoded and played on different platforms and players. After receiving the URL, the requester can apply for resources by using various means and protocols such as R TMP, RTSP, HLS (Dynamic Rate Rate Adaptive Technology) according to the URL. The requester and the subsystem are in a peer-to-peer manner, that is, the requester of the media directly applies the streaming media to the subsystem providing the URL (specifically, the code stream conversion module therein) without passing through other intermediate links. Due to the adoption of standard media negotiation mode and standard media packet format, the selection conditions of streaming media processing and playback are very wide, which further reduces the difficulty of calling the original applicant.
[0080] 步骤 S650, 将结果由第二协议格式转换为第一协议格式后将结果返回给请求者 [0080] Step S650, converting the result from the second protocol format to the first protocol format, and returning the result to the requester
[0081] 步骤 S660, 在与请求者传输流媒体资源吋, 在每次传输的资源数据中添加会话 f π息。 [0081] Step S660: After the streaming media resource is transmitted with the requester, the session f π information is added to the resource data transmitted each time.
[0082] 在本实施例中, 请求者收到流媒体的 URL后通过播放器直接申请流媒体资源, 申请的方式可以根据 URL的返回格式分别为 RTMP、 RTSP等。 而针对视频流传 输控制的安全性, 本实施例的技术方案中也有考虑, 主要是通过在协商会话中 加入鉴权机制和有效期鉴别实现。 例如在视频协商会话中, 在 RTSP的头域中加 入会话信息, 标示每次会话的不一致性, 从而提高会话的安全性。  [0082] In this embodiment, the requester receives the streaming media URL and directly requests the streaming media resource through the player, and the application manner may be RTMP, RTSP, etc. according to the return format of the URL. For the security of the video stream transmission control, the technical solution of the embodiment is also considered, mainly by adding an authentication mechanism and an effective period authentication in the negotiation session. For example, in a video negotiation session, session information is added to the RTSP header field to indicate the inconsistency of each session, thereby improving the security of the session.
[0083] 本发明的一个实施例中还提供了一种计算机可读存储介质, 计算机可读存储介 质存储有一个或者多个程序, 一个或者多个程序可被一个或者多个处理器执行 , 以实现前述实施例的请求处理方法的步骤。  [0083] In one embodiment of the present invention, there is also provided a computer readable storage medium storing one or more programs, one or more programs executable by one or more processors, The steps of the request processing method of the foregoing embodiment are implemented.
[0084] 根据本发明的技术方案, 请求者发出的请求并非直接到达处理请求的子系统, 而是首先需要经过协议格式的转换, 将其转换为子系统能够识别的协议格式, 再将其发送给子系统进行处理, 子系统的处理结果同样进行协议格式转换后, 返回给请求者, 可见通过协议格式的转换, 克服了请求者与子系统之间软件异 构性的影响, 从而请求者与子系统之间可以顺利地完成请求处理以及数据交互  [0084] According to the technical solution of the present invention, the request sent by the requester does not directly reach the subsystem that processes the request, but first needs to be converted by the protocol format, converted into a protocol format recognizable by the subsystem, and then sent. The subsystem is processed, and the processing result of the subsystem is also converted into the protocol format and returned to the requester. It can be seen that the conversion of the protocol format overcomes the influence of software heterogeneity between the requester and the subsystem, so that the requester and the requester Request processing and data interaction can be successfully completed between subsystems
[0085] 需要说明的是, 在本文中, 术语"包括"、 "包含 "或者其任何其他变体意在涵盖 非排他性的包含, 从而使得包括一系列要素的过程、 方法、 物品或者装置不仅 包括那些要素, 而且还包括没有明确列出的其他要素, 或者是还包括为这种过 程、 方法、 物品或者装置所固有的要素。 在没有更多限制的情况下, 由语句 "包 括一个 ...... "限定的要素, 并不排除在包括该要素的过程、 方法、 物品或者装置 中还存在另外的相同要素。 [0086] 上述本发明实施例序号仅仅为了描述, 不代表实施例的优劣。 [0085] It is to be noted that the terms "comprising", "including", or any other variations thereof are intended to encompass a non-exclusive inclusion, such that a process, method, article, or device that comprises a Those elements, but also other elements not explicitly listed, or elements that are inherent to such a process, method, item or device. An element that is defined by the phrase "comprising a ..." does not exclude the presence of additional elements in the process, method, article, or device that comprises the element. [0086] The foregoing serial numbers of the embodiments of the present invention are merely for the description, and do not represent the advantages and disadvantages of the embodiments.
[0087] 通过以上的实施方式的描述, 本领域的技术人员可以清楚地了解到上述实施例 方法可借助软件加必需的通用硬件平台的方式来实现, 当然也可以通过硬件, 但很多情况下前者是更佳的实施方式。 基于这样的理解, 本发明的技术方案本 质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来, 该计 算机软件产品存储在一个存储介质 (如 ROM/RAM、 磁碟、 光盘) 中, 包括若干 指令用以使得一台终端 (可以是手机, 计算机, 服务器, 空调器, 或者网络设 备等) 执行本发明各个实施例所述的方法。 [0087] Through the description of the above embodiments, those skilled in the art can clearly understand that the foregoing embodiment method can be implemented by means of software plus a necessary general hardware platform, and of course, can also be through hardware, but in many cases, the former It is a better implementation. Based on such understanding, the technical solution of the present invention, which is essential or contributes to the prior art, may be embodied in the form of a software product stored in a storage medium (such as ROM/RAM, disk, The optical disc includes a number of instructions for causing a terminal (which may be a cell phone, a computer, a server, an air conditioner, or a network device, etc.) to perform the methods described in various embodiments of the present invention.
[0088] 上面结合附图对本发明的实施例进行了描述, 但是本发明并不局限于上述的具 体实施方式, 上述的具体实施方式仅仅是示意性的, 而不是限制性的, 本领域 的普通技术人员在本发明的启示下, 在不脱离本发明宗旨和权利要求所保护的 范围情况下, 还可做出很多形式, 这些均属于本发明的保护之内。 The embodiments of the present invention have been described above with reference to the drawings, but the present invention is not limited to the specific embodiments described above, and the specific embodiments described above are merely illustrative and not restrictive. The skilled person is able to make various forms within the scope of the present invention without departing from the spirit and scope of the invention as claimed.
工业实用性  Industrial applicability
[0089] 根据本发明的技术方案, 请求者发出的请求并非直接到达处理请求的子系统, 而是首先需要经过协议格式的转换, 将其转换为子系统能够识别的协议格式, 再将其发送给子系统进行处理, 子系统的处理结果同样进行协议格式转换后, 返回给请求者, 可见通过协议格式的转换, 克服了请求者与子系统之间软件异 构性的影响, 从而请求者与子系统之间可以顺利地完成请求处理以及数据交互 。 因此, 具有工业性。  [0089] According to the technical solution of the present invention, the request sent by the requester does not directly reach the subsystem that processes the request, but first needs to be converted by the protocol format, converted into a protocol format recognizable by the subsystem, and then sent. The subsystem is processed, and the processing result of the subsystem is also converted into the protocol format and returned to the requester. It can be seen that the conversion of the protocol format overcomes the influence of software heterogeneity between the requester and the subsystem, so that the requester and the requester Request processing and data interaction can be successfully completed between subsystems. Therefore, it is industrial.

Claims

权利要求书 Claim
[权利要求 1] 一种请求处理方法, 其特征在于, 所述方法包括:  [Claim 1] A request processing method, the method comprising:
接收请求者发送出的第一协议格式的请求;  Receiving a request of the first protocol format sent by the requester;
将所述请求由所述第一协议格式转换为子系统可识别的第二协议格式 Converting the request from the first protocol format to a second protocol format identifiable by the subsystem
, 所述子系统用于处理所述请求; The subsystem is configured to process the request;
将所述第二协议格式的所述请求发送给所述子系统;  Transmitting the request of the second protocol format to the subsystem;
所述子系统处理所述请求后得到所述第二协议格式的结果; 将所述结果由所述第二协议格式转换为所述第一协议格式; 将所述结果返回给所述请求者。  And the subsystem obtains the result of the second protocol format after processing the request; converting the result from the second protocol format to the first protocol format; and returning the result to the requester.
[权利要求 2] 根据权利要求 1所述的方法, 其特征在于, 在所述将所述请求由所述 第一协议格式转换为子系统可识别的第二协议格式之前, 还包括: 对所述请求进行校验和 /或鉴权, 在校验和 /或鉴权成功后执行所述将 所述请求由所述第一协议格式转换为子系统可识别的第二协议格式。  [Claim 2] The method according to claim 1, wherein before the converting the request from the first protocol format to a second protocol format recognizable by the subsystem, the method further comprises: The request is verified and/or authenticated, and after the checksum/or authentication succeeds, the second protocol format that converts the request from the first protocol format to a subsystem identifiable is performed.
[权利要求 3] 根据权利要求 1所述的方法, 其特征在于, 所述请求用于申请流媒体 资源, 所述结果为所述流媒体资源的地址。  [Claim 3] The method according to claim 1, wherein the request is for applying for a streaming media resource, and the result is an address of the streaming media resource.
[权利要求 4] 根据权利要求 3所述的方法, 其特征在于, 所述子系统处理所述请求 后得到所述第二协议格式的结果, 具体包括:  [Claim 4] The method according to claim 3, wherein the obtaining, by the subsystem, the result of the second protocol format after processing the request, specifically includes:
所述子系统根据所述请求获取第一封装和 /或压缩格式的所述流媒体 资源, 将所述流媒体资源由所述第一封装和 /或压缩格式转换为对应 所述请求者的第二封装和 /或压缩格式, 将所述第二封装和 /或压缩格 式的所述流媒体资源的地址作为所述结果, 以供所述请求者按所述地 址获取所述流媒体资源。  Obtaining, by the subsystem, the streaming media resource in a first encapsulation and/or compression format according to the request, converting the streaming media resource from the first encapsulation and/or compression format to a number corresponding to the requester And a second encapsulation and/or compression format, the address of the streaming media resource in the second encapsulation and/or compression format is used as the result, so that the requester obtains the streaming media resource according to the address.
[权利要求 5] 根据权利要求 4所述的方法, 其特征在于, 所述将所述第二封装和 /或 压缩格式的所述流媒体资源的地址作为所述结果, 以供所述请求者按 所述地址获取所述流媒体资源, 具体包括: [Claim 5] The method according to claim 4, wherein the address of the streaming media resource in the second encapsulation and/or compression format is used as the result for the requester Obtaining the streaming media resource according to the address, specifically:
在与所述请求者传输所述流媒体资源吋, 在每次传输的资源数据中添 加会话信息。  After transmitting the streaming media resource with the requester, session information is added to each transmitted resource data.
[权利要求 6] —种请求处理装置, 其特征在于, 所述装置包括: 接口管理模块, 用于接收请求者发送出的第一协议格式的请求; 系统接口模块, 用于将所述请求由所述第一协议格式转换为子系统可 识别的第二协议格式, 所述子系统用于处理所述请求; [Claim 6] A request processing device, wherein the device comprises: An interface management module, configured to receive a request of a first protocol format sent by a requester, and a system interface module, configured to convert the request from the first protocol format to a second protocol format recognizable by a subsystem, where a subsystem for processing the request;
系统管理模块, 将所述第二协议格式的所述请求发送给所述子系统; 所述子系统, 用于处理所述请求后得到所述第二协议格式的结果; 所述系统管理模块将所述结果由所述第二协议格式转换为所述第一协 议格式后, 经所系统接口模块、 所述接口管理模块将所述结果返回给 所述请求者。 a system management module, configured to send the request in the second protocol format to the subsystem; the subsystem, configured to obtain a result of the second protocol format after processing the request; After the result is converted into the first protocol format by the second protocol format, the system interface module and the interface management module return the result to the requester.
根据权利要求 6所述的装置, 其特征在于, The device according to claim 6, wherein
在所述将所述请求由所述第一协议格式转换为子系统可识别的第二协 议格式之前, 所述接口管理模块还对所述请求进行校验和 /或鉴权, 在校验和 /或鉴权成功后所述系统接口模块执行所述将所述请求由所 述第一协议格式转换为子系统可识别的第二协议格式。 Before the converting the request from the first protocol format to a second protocol format recognizable by the subsystem, the interface management module further performs verification and/or authentication on the request, in the checksum / or after the authentication succeeds, the system interface module performs the conversion of the request from the first protocol format to a second protocol format recognizable by the subsystem.
根据权利要求 6所述的装置, 其特征在于, 所述请求用于申请流媒体 资源, 所述结果为所述流媒体资源的地址。 The apparatus according to claim 6, wherein the request is for applying for a streaming media resource, and the result is an address of the streaming media resource.
根据权利要求 8所述的装置, 其特征在于, The device according to claim 8, wherein
所述子系统根据所述请求获取第一封装和 /或压缩格式的所述流媒体 资源, 将所述流媒体资源由所述第一封装和 /或压缩格式转换为对应 所述请求者的第二封装和 /或压缩格式, 将所述第二封装和 /或压缩格 式的所述流媒体资源的地址作为所述结果, 以供所述请求者按所述地 址获取所述流媒体资源。 Obtaining, by the subsystem, the streaming media resource in a first encapsulation and/or compression format according to the request, converting the streaming media resource from the first encapsulation and/or compression format to a number corresponding to the requester And a second encapsulation and/or compression format, the address of the streaming media resource in the second encapsulation and/or compression format is used as the result, so that the requester obtains the streaming media resource according to the address.
根据权利要求 9所述的装置, 其特征在于, The device according to claim 9, wherein
所述子系统在与所述请求者传输所述流媒体资源吋, 在每次传输的资 源数据中添加会话信息。 The subsystem adds the session information to the resource data transmitted each time after transmitting the streaming media resource with the requester.
一种计算机可读存储介质, 其特征在于, 所述计算机可读存储介质存 储有一个或者多个程序, 所述一个或者多个程序可被一个或者多个处 理器执行, 以实现权利要求 1至 5中任一项所述方法的步骤。 A computer readable storage medium, characterized in that the computer readable storage medium stores one or more programs, the one or more programs being executable by one or more processors to implement claim 1 The method of any of the methods of 5.
PCT/CN2017/106169 2017-10-13 2017-10-13 Request processing method and device, and computer-readable storage medium WO2019071608A1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
PCT/CN2017/106169 WO2019071608A1 (en) 2017-10-13 2017-10-13 Request processing method and device, and computer-readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2017/106169 WO2019071608A1 (en) 2017-10-13 2017-10-13 Request processing method and device, and computer-readable storage medium

Publications (1)

Publication Number Publication Date
WO2019071608A1 true WO2019071608A1 (en) 2019-04-18

Family

ID=66101196

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2017/106169 WO2019071608A1 (en) 2017-10-13 2017-10-13 Request processing method and device, and computer-readable storage medium

Country Status (1)

Country Link
WO (1) WO2019071608A1 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113852666A (en) * 2021-08-25 2021-12-28 天翼数字生活科技有限公司 Method for acquiring HTTP (hyper text transport protocol) resources in real time through FTP (file transfer protocol)
CN115102829A (en) * 2022-08-25 2022-09-23 平安银行股份有限公司 Request message processing method and device

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101110774A (en) * 2007-08-28 2008-01-23 中兴通讯股份有限公司 Flow media system NAT traversing device supporting authentication and implementing method thereof
US20080192736A1 (en) * 2007-02-09 2008-08-14 Dilithium Holdings, Inc. Method and apparatus for a multimedia value added service delivery system
CN102347947A (en) * 2011-09-21 2012-02-08 杭州海康威视软件有限公司 Streaming media adaptor, streaming media network interaction system and method
CN102932359A (en) * 2012-11-08 2013-02-13 华为软件技术有限公司 Method, device and system for streaming media service request

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080192736A1 (en) * 2007-02-09 2008-08-14 Dilithium Holdings, Inc. Method and apparatus for a multimedia value added service delivery system
CN101110774A (en) * 2007-08-28 2008-01-23 中兴通讯股份有限公司 Flow media system NAT traversing device supporting authentication and implementing method thereof
CN102347947A (en) * 2011-09-21 2012-02-08 杭州海康威视软件有限公司 Streaming media adaptor, streaming media network interaction system and method
CN102932359A (en) * 2012-11-08 2013-02-13 华为软件技术有限公司 Method, device and system for streaming media service request

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113852666A (en) * 2021-08-25 2021-12-28 天翼数字生活科技有限公司 Method for acquiring HTTP (hyper text transport protocol) resources in real time through FTP (file transfer protocol)
CN113852666B (en) * 2021-08-25 2024-03-12 天翼数字生活科技有限公司 Method for acquiring HTTP (hyper text transport protocol) resources in real time through FTP (File transfer protocol)
CN115102829A (en) * 2022-08-25 2022-09-23 平安银行股份有限公司 Request message processing method and device
CN115102829B (en) * 2022-08-25 2022-11-29 平安银行股份有限公司 Request message processing method and device

Similar Documents

Publication Publication Date Title
RU2406233C2 (en) Bulk transmission of messages using single http request
US8997199B2 (en) Token-based security for links to media streams
US9444813B1 (en) Token-based security for remote resources
US20100005183A1 (en) Method, System and Apparatus for Converting Media Contents
WO2015055010A1 (en) Data transmission method, device and storage medium
US20140207843A1 (en) Data processing method, connection auditing device, and system
WO2014000303A1 (en) Method for receiving message, and deep packet inspection device and system
CN106559405B (en) Portal authentication method and equipment
US10904220B2 (en) Provisioning using a generic configuration
US9047482B2 (en) Token-based security for links to media streams
WO2014114086A1 (en) Hypertext transfer protocol living streaming content distribution method, system and device
CN110099129B (en) Data transmission method and equipment
WO2014183540A1 (en) Method and system for video surveillance content adaptation, and central server and device
WO2010133097A1 (en) Data sharing method, server and data sharing system for widget system
WO2019071608A1 (en) Request processing method and device, and computer-readable storage medium
WO2013017001A1 (en) Method, device and system for realizing application performance self-adaption
RU2621961C2 (en) Gateway and corresponding method, computer program and storage media
CN108810475B (en) Android video monitoring device based on Onvif standard and Sip protocol
CN111565168B (en) Object storage method, system, storage medium and electronic equipment
WO2012097728A1 (en) Method and device for proxy access of open platform
CN116261021A (en) Video stream playing method and device, electronic equipment and storage medium
KR101550256B1 (en) A server, a system, a method, a computer program and a computer program product for accessing a server in a computer network
CN108965939A (en) Media data processing method, device, system and readable storage medium storing program for executing
CN106487890A (en) A kind of cross-node communication network requesting method based on XMPP
CN112468886A (en) Multicast data forwarding method, device, equipment and readable storage medium

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 17928780

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 17928780

Country of ref document: EP

Kind code of ref document: A1