RTSP streaming media intelligent cache proxy method and system for embedded system

By introducing RTSP proxy and secondary distribution services into the embedded system, the problems of resource bottlenecks and network bandwidth redundancy in the vehicle local area network are solved, and intelligent scheduling and optimized allocation of resources are realized, thereby improving system stability and real-time performance.

CN121691279APending Publication Date: 2026-03-17CHINA FAW CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511868227.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-11
Publication Date
2026-03-17

AI Technical Summary

Technical Problem

In a vehicle-mounted local area network environment, the RTSP technology solution for embedded devices suffers from resource bottlenecks, network bandwidth redundancy exacerbates the system burden, and resource conflicts between services are difficult to coordinate.

Method used

By introducing RTSP proxy and secondary distribution services, and establishing a virtual RTSP service address, we can achieve shared caching and intelligent distribution of video data, establish multiple data stream queues, and schedule resources according to application priority requirements.

Benefits of technology

Reduce the load on the embedded source server, lower CPU and network load, save network bandwidth, ensure the stability and real-time performance of core functions, achieve resource collaborative scheduling, and avoid competition between applications.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121691279A_ABST
    Figure CN121691279A_ABST
Patent Text Reader

Abstract

The invention discloses an RTSP streaming media intelligent cache proxy method and system for an embedded system, and relates to the field of vehicle streaming media control, and the method comprises the steps: deploying an RTSP proxy and a secondary distribution service in a client embedded device; the connection management module initiates an RTSP session establishment request to an RTSP server of the source-end embedded device, the connection management module and the RTSP server of the source-end embedded device establish and maintain an uplink RTSP session, and coded video data received through the uplink RTSP session is written into a shared cache pool; a virtual RTSP service address is provided on a local network of the client embedded device, and an application in the client embedded device initiates an RTSP streaming media access request to the virtual RTSP service address; and receiving an access request of an application, identifying a priority rule demand of resource allocation, reading corresponding video data from the shared cache pool, establishing at least two data flow queues according to the priority rule demand of resource allocation, and secondarily distributing the video data to each application.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of vehicle streaming media control, and in particular to an RTSP streaming media intelligent caching proxy method for embedded systems, an RTSP streaming media intelligent caching proxy system for embedded systems, an electronic device, and a storage medium. Background Technology

[0002] With the rapid development of intelligent connected vehicles, in-vehicle entertainment systems are becoming increasingly feature-rich. Devices such as in-vehicle cameras, dashcams, and rear-seat entertainment screens need to transmit audio and video streams in real time to terminals such as the central control unit, passenger screen, and rear-seat screens via a local area network (such as Ethernet or Wi-Fi). The RTSP protocol, due to its excellent real-time performance and controllability, is widely used for establishing and controlling such streaming media sessions.

[0003] In existing RTSP technology solutions, the most common mode is the client direct connection mode: that is, each client application establishes an independent session directly with the RTSP server.

[0004] However, in the context of in-vehicle local area networks (ILANs), where embedded devices are the primary focus, this technical solution suffers from numerous serious problems:

[0005] Server-side resource bottlenecks are prominent: Embedded servers have extremely limited CPU, memory, network bandwidth, and encoding capabilities. When multiple clients access the server concurrently, the server needs to establish multiple sessions and perform the same encoding and sending operations multiple times, which can easily exhaust resources, affecting core functions (such as perception and decision-making) and reducing system stability.

[0006] Network bandwidth redundancy exacerbates system burden: The same video data is repeatedly transmitted multiple times on internal networks (such as CAN / CAN FD, vehicle Ethernet), needlessly occupying the already limited network bandwidth and switching processing capacity, increasing system cost and power consumption. Summary of the Invention

[0007] In view of this, the purpose of this invention is to provide an RTSP streaming media intelligent caching proxy method for embedded systems, an RTSP streaming media intelligent caching proxy system for embedded systems, an electronic device and a storage medium, aiming to solve the technical problems of prominent resource bottlenecks, network bandwidth redundancy and difficulty in coordinating resource conflicts between services in the prior art.

[0008] This invention provides the following solution:

[0009] According to one aspect of the present invention, a method for intelligent caching proxy of RTSP streaming media for embedded systems is provided, comprising the following steps:

[0010] Deploy RTSP proxy and secondary distribution services;

[0011] Initiate an RTSP session establishment request;

[0012] In response to RTSP proxy and secondary distribution service requests, establish and maintain an uplink RTSP session;

[0013] Based on the aforementioned uplink RTSP session, the received encoded video data is shared and cached;

[0014] Configure a virtual RTSP service address, and the application sends an access request to the virtual RTSP service address;

[0015] Receive access requests from applications, identify priority rules for resource allocation, and obtain corresponding video data based on sharing and caching.

[0016] Based on the priority rules for resource allocation, multiple data stream queues are established to redistribute video data to various applications.

[0017] Furthermore, the sharing and caching of received encoded video data includes storing the encoded video data received through the uplink RTSP session into a shared cache pool, which is a circular buffer.

[0018] Furthermore, setting the virtual RTSP service address includes: providing a virtual RTSP service address on the local network of the client embedded device, wherein the local network is localhost or the internal bus network of the client embedded device;

[0019] The virtual RTSP service address is a private address within the local network.

[0020] Furthermore, the priority rules for resource allocation include: low latency requirements and high integrity requirements;

[0021] Establish multiple data stream queues, including: real-time data stream queues and non-real-time data stream queues;

[0022] The real-time data stream queue is used to distribute data to applications with low latency requirements, prioritizing the reading of the latest keyframes from the shared cache pool;

[0023] Applications requiring low latency include real-time preview applications and video rendering applications;

[0024] The non-real-time data stream queue is used to distribute data to applications with high integrity requirements, and reads historical data from the shared cache pool in the order in which video frames are generated.

[0025] Applications requiring high integrity include: video recording applications and image recognition applications.

[0026] Furthermore, it also includes: an intelligent distribution engine;

[0027] The intelligent distribution engine obtains the cache duration requirements of all applications within the client's embedded device, and takes the maximum value among all cache duration requirements as the total cache duration of the shared cache pool.

[0028] The intelligent distribution engine also includes:

[0029] The real-time data stream queue is controlled to store image group data, which is continuously filled until complete when a new P frame / B frame is received;

[0030] The non-real-time data stream queue calculates the total duration of the currently stored image group data based on the total cache duration of the shared cache pool;

[0031] If the total duration exceeds the total cache duration, the earliest image group data will be deleted.

[0032] Furthermore, the application's access request to the virtual RTSP service address includes:

[0033] It directly initiates an RTSP protocol request, and the internal virtual RTSP service module responds and provides streaming media services;

[0034] Streaming media data is obtained by calling the API interface provided by the internal virtual RTSP service module through the Binder feature of the Android system.

[0035] According to a second aspect of the present invention, an RTSP streaming media intelligent caching proxy system for embedded systems is provided, comprising:

[0036] The module includes a service deployment module, a request initiation module, a session establishment module, a shared buffer module, an access request module, a demand identification module, and a secondary distribution module.

[0037] The service deployment module is used to deploy RTSP proxy and secondary distribution services;

[0038] The request initiation module is used to initiate RTSP session establishment requests;

[0039] The session establishment module is used to establish and maintain an uplink RTSP session in response to RTSP proxy and secondary distribution service requests;

[0040] A shared buffer module is used to share and buffer the received encoded video data according to the uplink RTSP session;

[0041] The access request module is used to set the virtual RTSP service address, and the application sends an access request to the virtual RTSP service address;

[0042] The demand identification module is used to receive access requests from applications, identify priority rules for resource allocation, and obtain corresponding video data based on sharing and caching.

[0043] The secondary distribution module is used to establish multiple data stream queues according to the priority rules of resource allocation, and to redistribute video data to various applications.

[0044] According to three aspects of the present invention, an electronic device is provided, comprising: a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other through the communication bus;

[0045] The memory stores a computer program, which, when executed by a processor, causes the processor to perform steps of an RTSP streaming media smart cache proxy method for embedded systems.

[0046] According to four aspects of the present invention, a computer-readable storage medium is provided that stores a computer program executable by an electronic device, which, when run on the electronic device, causes the electronic device to perform the steps of an RTSP streaming media smart caching proxy method for an embedded system.

[0047] Compared with the prior art, the present invention has the following advantages:

[0048] This application significantly reduces the load on the embedded source server, drastically lowering its CPU and network load, thus ensuring the stability and real-time performance of its core functions. It eliminates redundant traffic on the internal network, ensuring that the same video data is transmitted only once between different devices within the embedded system's internal network (such as an in-vehicle network), with proxy nodes handling replication and distribution, significantly saving network bandwidth and reducing system load and power consumption. Furthermore, it enables resource coordination and scheduling within client devices, with a unified proxy service responsible for data retrieval and distribution. This allows for comprehensive management of CPU, memory, and I / O resources within client devices, and intelligent scheduling based on application priority (such as allocating more resources for real-time preview), avoiding disorderly competition between applications. Attached Figure Description

[0049] To more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the specific embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.

[0050] Figure 1 This is a flowchart of an RTSP streaming media intelligent caching proxy method for embedded systems provided by one or more embodiments of the present invention.

[0051] Figure 2 This is a structural diagram of an RTSP streaming media intelligent caching proxy system for embedded systems provided by one or more embodiments of the present invention.

[0052] Figure 3 This is an architecture diagram of an RTSP streaming media intelligent caching proxy system for embedded systems, according to a specific embodiment of the present invention.

[0053] Figure 4 This is a signal transmission architecture diagram of an in-vehicle video system according to a specific embodiment of the present invention.

[0054] Figure 5 This is an architecture diagram of the internal video stream processing of an in-vehicle cockpit system according to a specific embodiment of the present invention.

[0055] Figure 6 This is a schematic diagram of the structure of an image group in video encoding according to a specific embodiment of the present invention.

[0056] Figure 7 This is an electronic device structure diagram of an RTSP streaming media intelligent caching proxy method for embedded systems provided by one or more embodiments of the present invention. Detailed Implementation

[0057] The technical solution of the present invention will now be clearly and completely described with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0058] The terminology used in the embodiments of this application is for the purpose of describing particular embodiments only and is not intended to limit the application. The singular forms “a,” “said,” and “the” used in the embodiments of this application and the appended claims are also intended to include the plural forms, and “multiple” generally includes at least two unless the context clearly indicates otherwise.

[0059] It should be understood that the term "and / or" used in this article is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, and B existing alone. Additionally, the character " / " in this article generally indicates that the preceding and following related objects have an "or" relationship.

[0060] It should be understood that although the terms first, second, third, etc., may be used in the embodiments of this application, these descriptions should not be limited to these terms. These terms are only used to distinguish the descriptions. For example, first may also be referred to as second without departing from the scope of the embodiments of this application, and similarly, second may also be referred to as first.

[0061] Depending on the context, the words “if” or “suppose” as used here can be interpreted as “when” or “in response to determination” or “in response to detection.” Similarly, depending on the context, the phrases “if determination” or “if detection (of the stated condition or event)” can be interpreted as “when determination” or “in response to determination” or “when detection (of the stated condition or event)” or “in response to detection (of the stated condition or event).”

[0062] It should also be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that an article or device that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such an article or device. Without further limitation, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the article or device that includes said element.

[0063] It should be noted that any symbols and / or numbers present in the specification that are not marked in the accompanying drawings are not reference numerals.

[0064] Figure 1 This is a flowchart of an RTSP streaming media intelligent caching proxy method for embedded systems provided by one or more embodiments of the present invention.

[0065] like Figure 1 As shown, it includes the following steps:

[0066] Step S1: Deploy the RTSP proxy and secondary distribution service;

[0067] Specifically, by introducing a unified RTSP proxy and secondary distribution service, multiple external pull requests originally sent to the source device are transformed into one external pull request and multiple internal data distributions within the device.

[0068] This further reduces the load on the embedded source server, significantly lowering its CPU and network load and ensuring the stability and real-time performance of its core functions; it eliminates redundant traffic in the internal network, ensuring that the same video data is transmitted only once between different devices in the embedded system's internal network (such as an in-vehicle network), with the proxy node handling replication and distribution, significantly saving network bandwidth and reducing system load and power consumption; it enables resource coordination and scheduling within client devices, with a unified proxy service responsible for data retrieval and distribution, and can manage the CPU, memory, and I / O resources within client devices in a coordinated manner, intelligently scheduling resources according to application priority (such as allocating more resources for real-time preview), avoiding disorderly competition between applications.

[0069] Step S2: Initiate an RTSP session establishment request; in response to the RTSP proxy and secondary distribution service request, establish and maintain an uplink RTSP session;

[0070] Based on the aforementioned uplink RTSP session, the received encoded video data is shared and cached;

[0071] Specifically, the connection management module in the RTSP proxy service on the client device establishes and maintains a single uplink RTSP session with the RTSP server on the source device. Video data received through this session is stored in a shared cache pool within the device.

[0072] Step S3: Set a virtual RTSP service address, and the application sends an access request to the virtual RTSP service address;

[0073] Specifically, the internal RTSP proxy module provides a virtual RTSP service address or other audio / video server on the local network (such as localhost or the internal bus). All applications within the client no longer access the source device's address, but instead access this local virtual address. This transforms cross-device, unstable external network access into high-speed, stable memory-level data exchange within the device. The addition, removal, or failure of applications is completely isolated within the client device, fully decoupled from external systems and networks.

[0074] Step S4: Receive the application's access request, identify the priority rules for resource allocation, and obtain the corresponding video data based on sharing and caching.

[0075] Based on the priority rules for resource allocation, multiple data stream queues are established to redistribute video data to various applications.

[0076] Specifically, when a local application connects to the local distribution service, the distribution engine reads data from the shared cache pool and distributes it to each application. It can implement QoS policies, such as providing low-latency data streams for real-time preview applications (prioritizing the sending of the latest keyframes) and high-integrity data streams for audio and video recording applications (ensuring all frames are delivered in order). This achieves unified scheduling and optimized allocation of resources within the client device, avoiding resource contention between applications and providing differentiated service quality for different services.

[0077] Furthermore, the sharing and caching of received encoded video data includes storing the encoded video data received through the uplink RTSP session into a shared cache pool, which is a circular buffer.

[0078] Furthermore, setting the virtual RTSP service address includes: providing a virtual RTSP service address on the local network of the client embedded device, wherein the local network is localhost or the internal bus network of the client embedded device;

[0079] The virtual RTSP service address is a private address within the local network.

[0080] Furthermore, the priority rules for resource allocation include: low latency requirements and high integrity requirements;

[0081] Establish multiple data stream queues, including: real-time data stream queues and non-real-time data stream queues;

[0082] The real-time data stream queue is used to distribute data to applications with low latency requirements, prioritizing the reading of the latest keyframes from the shared cache pool;

[0083] Applications requiring low latency include real-time preview applications and video rendering applications;

[0084] The non-real-time data stream queue is used to distribute data to applications with high integrity requirements, and reads historical data from the shared cache pool in the order in which video frames are generated.

[0085] Applications requiring high integrity include: video recording applications and image recognition applications.

[0086] Furthermore, it also includes: an intelligent distribution engine;

[0087] The intelligent distribution engine obtains the cache duration requirements of all applications within the client's embedded device, and takes the maximum value among all cache duration requirements as the total cache duration of the shared cache pool.

[0088] The intelligent distribution engine also includes:

[0089] The real-time data stream queue is controlled to store image group data, which is continuously filled until complete when a new P frame / B frame is received;

[0090] The non-real-time data stream queue calculates the total duration of the currently stored image group data based on the total cache duration of the shared cache pool;

[0091] If the total duration exceeds the total cache duration, the earliest image group data will be deleted.

[0092] Furthermore, the application's access request to the virtual RTSP service address includes:

[0093] It directly initiates an RTSP protocol request, and the internal virtual RTSP service module responds and provides streaming media services;

[0094] Streaming media data is obtained by calling the API interface provided by the internal virtual RTSP service module through the Binder feature of the Android system.

[0095] Specifically, by introducing a unified RTSP proxy and secondary distribution service, multiple external pull requests originally sent to the source device are transformed into one external pull request and multiple internal data distributions within the device.

[0096] This solution significantly reduces the load on embedded source servers, drastically lowering their CPU and network loads and ensuring the stability and real-time performance of their core functions. It eliminates redundant traffic on the internal network, ensuring that the same video data is transmitted only once between different devices within the embedded system's internal network (such as an in-vehicle network), with proxy nodes handling replication and distribution, significantly saving network bandwidth and reducing system load and power consumption. Furthermore, it enables resource coordination and scheduling within client devices, with a unified proxy service responsible for data retrieval and distribution. This allows for comprehensive management of CPU, memory, and I / O resources within client devices, and intelligent scheduling based on application priority (e.g., allocating more resources for real-time preview), avoiding disorderly competition between applications.

[0097] Figure 2 This is a structural diagram of an RTSP streaming media intelligent caching proxy system for embedded systems provided by one or more embodiments of the present invention.

[0098] like Figure 2 As shown, it includes:

[0099] The module includes a service deployment module, a request initiation module, a session establishment module, a shared buffer module, an access request module, a demand identification module, and a secondary distribution module.

[0100] The service deployment module is used to deploy RTSP proxy and secondary distribution services;

[0101] The request initiation module is used to initiate RTSP session establishment requests;

[0102] The session establishment module is used to establish and maintain an uplink RTSP session in response to RTSP proxy and secondary distribution service requests;

[0103] A shared buffer module is used to share and buffer the received encoded video data according to the uplink RTSP session;

[0104] The access request module is used to set the virtual RTSP service address, and the application sends an access request to the virtual RTSP service address;

[0105] The demand identification module is used to receive access requests from applications, identify priority rules for resource allocation, and obtain corresponding video data based on sharing and caching.

[0106] The secondary distribution module is used to establish multiple data stream queues according to the priority rules of resource allocation, and to redistribute video data to various applications.

[0107] It is worth noting that although only some basic functional modules are disclosed in this embodiment, it does not mean that the composition of this system is limited to the above-mentioned basic functional modules. On the contrary, what this embodiment intends to express is that, based on the above-mentioned basic functional modules, those skilled in the art can arbitrarily add one or more functional modules in combination with existing technology to form an infinite number of embodiments or technical solutions. That is to say, this system is open rather than closed. The fact that this embodiment only discloses a few basic functional modules does not mean that the scope of protection of the claims of this invention is limited to the disclosed basic functional modules. At the same time, for the convenience of description, the above device is described separately according to its functions as various units and modules. Of course, in implementing this invention, the functions of each unit and module can be implemented in one or more software and / or hardware.

[0108] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without any creative effort.

[0109] Figure 3 This is an architecture diagram of an RTSP streaming media intelligent caching proxy system for embedded systems, according to a specific embodiment of the present invention.

[0110] like Figure 3 As shown, it specifically includes:

[0111] Unified external connection management. The connection management module in the RTSP proxy service on the client device establishes and maintains a single uplink RTSP session with the RTSP server on the source device. Video data received through this session is stored in a shared buffer pool (such as a ring buffer) within the device. This reduces the load on the source device and cross-device network traffic to a level comparable to the number of embedded devices, which is the most fundamental optimization.

[0112] Internal virtualization and service-oriented architecture. The internal RTSP proxy module provides a virtual RTSP service address or other audio / video server on the local network (such as localhost or internal bus). All applications within the client no longer access the source device's address, but instead access this local virtual address. This transforms cross-device, unstable external network access into high-speed, stable memory-level data exchange within the device. The addition, removal, or failure of applications is completely isolated within the client device, fully decoupled from external systems and networks.

[0113] Intelligent internal secondary distribution. When a local application connects to the local distribution service, the distribution engine reads data from the shared cache pool and distributes it to each application. It can implement QoS policies, such as providing low-latency data streams for real-time preview applications (prioritizing the sending of the latest keyframes); and providing high-integrity data streams for audio and video recording applications (ensuring all frames are delivered in order). This achieves unified scheduling and optimized allocation of resources within the client device, avoiding resource contention between applications and providing differentiated service quality for different services.

[0114] In another embodiment, it specifically involves CSC (Entertainment Domain Controller), HAD (Advanced Automated Driving Controller), AVM (Around View Camera), DVR (Dashcam Camera), etc., such as Figure 4 As shown.

[0115] In this embodiment, the DVR and AVM cameras are connected to the HAD device via LVDS. The HAD is responsible for encoding the video data and providing video streaming services to the outside world via the RTSP protocol. The CSC is connected to the HAD via Ethernet, and the CSC pulls real-time video stream data from the HAD via the RTSP protocol.

[0116] After HAD encoding, the video stream data flows to CSC, which pulls the data stream for caching and provides a secondary RTSP service for consumption by other applications within CSC.

[0117] In another embodiment, such as Figure 5 As shown.

[0118] In this embodiment, the HAD acts as the RTSP server device, and the CSC acts as the client device. Multiple applications within the CSC require camera data to be retrieved from the RTSP server.

[0119] In this embodiment, the CSC establishes only one connection with the HAD's RTSP service and pulls at most one set of audio and video data. The dependencies of multiple applications within the CSC on the audio and video data in the HAD are transformed into internal dependencies within the CSC. The CSC internally implements an RTSP proxy; this proxy architecture can either directly provide RTSP services to different applications or provide API interfaces through the Android system's binder feature.

[0120] In this embodiment, the proxy service caches the data obtained from HARD. The caching duration can be set comprehensively according to the needs of each app. For example, if app1 needs to obtain 10 seconds of cached data and app2 needs to obtain 30 seconds of cached data, the proxy will automatically take 30 seconds as the data caching length.

[0121] In this embodiment, the agent module categorizes data applications into two types: those with high real-time requirements and those with low real-time requirements. The agent creates two data stream queues for each type of application. Each data stream can contain multiple different data consumption plugins. These plugins implement basic audio and video application functions, such as encoding / decoding, video rendering, video recording, image recognition, and audio recognition. Each plugin can provide different application functions for the app.

[0122] For functions with high real-time requirements, such as encoding / decoding and video preview, the app attaches corresponding plugins to the real-time video stream through an interface. The function is not blocked, and each frame of data is processed in real time. For functions with low real-time requirements, such as recording, the app attaches corresponding plugins to the non-real-time video stream through an interface and consumes historical cached data.

[0123] This proxy module implements RTSP service proxying in real-time data streams. That is, when an app needs to directly pull RTSP data streams, the proxy module treats it as if it were grabbing and forwarding data from a real-time data stream.

[0124] In this embodiment, when different applications need to perform the same task, such as multiple apps triggering recording events simultaneously, each app registers and mounts different recording plugins to the non-real-time video stream. Multiple instances of the recording plugin can exist, and their operation does not interfere with each other. The same app can also mount multiple similar plugins to the video stream simultaneously without affecting each other's operation.

[0125] In this embodiment, data caching is based on video grouped blocks (GOPs). The most recent GOP data is stored in the real-time data stream, while several GOPs are stored in the non-real-time data stream according to the cache length requirements. When the real-time stream finishes processing the latest GOP data, it transfers the GOP to the non-real-time data stream, which maintains a length based on the GOP's time. This architecture is a two-level caching scheme. The GOP data flow is as follows: Figure 6 As shown.

[0126] The latest Group of Pictures (GOP) in real-time data may not be complete. It continuously receives the latest P-frames or B-frames to populate the current GOP. When another I-frame is received, it is considered that the next GOP has arrived. The current GOP is then packaged and moved to the non-real-time data queue, becoming GOP number 2. The latest GOP in the real-time data then begins reassembling its data. When a new GOP is added to a non-real-time GOP, the duration is calculated based on the total number of GOPs and compared with the required buffering duration. If the buffering duration exceeds the required data, outdated data is deleted starting from the nth GOP. This method of transferring data in entire GOP blocks greatly simplifies data reading and duration calculation.

[0127] In this embodiment, there is only one client device, CSC. When multiple clients connect to HAD, the number of devices required to provide the number of RTSP data streams depends on the number of clients connected to HAD. Each client internally uses the same architecture as the CSC device.

[0128] Figure 7 This is an electronic device structure diagram of an RTSP streaming media intelligent caching proxy method for embedded systems provided by one or more embodiments of the present invention.

[0129] like Figure 7 As shown, this application provides an electronic device, including: a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other through the communication bus;

[0130] The memory stores a computer program that, when executed by a processor, causes the processor to perform steps of an RTSP streaming media smart caching agent method for embedded systems.

[0131] This application also provides a computer-readable storage medium storing a computer program executable by an electronic device, which, when run on the electronic device, causes the electronic device to perform the steps of an RTSP streaming media smart caching proxy method for an embedded system.

[0132] RTSP stands for Real-Time Streaming Protocol, an application-layer protocol used to control real-time data transmission.

[0133] For the sake of simplicity, the method embodiments are described as a series of actions. However, those skilled in the art should understand that the embodiments of the present invention are not limited to the described order of actions, because according to the embodiments of the present invention, some steps can be performed in other orders or simultaneously. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are preferred embodiments, and the actions involved are not necessarily essential to the embodiments of the present invention.

[0134] As can be seen from the above description of the embodiments, those skilled in the art can clearly understand that this application can be implemented by means of software plus necessary general-purpose hardware platforms. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in various embodiments or some parts of the embodiments of this application.

[0135] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for RTSP streaming intelligent cache proxy for embedded systems, characterized in that, The method comprises the following steps: deploying an RTSP proxy and a secondary distribution service; initiating an RTSP session establishment request; establishing and maintaining an uplink RTSP session in response to the RTSP proxy and the secondary distribution service request; sharing and caching received encoded video data based on the uplink RTSP session; setting a virtual RTSP service address, and initiating an access request to the virtual RTSP service address by an application; receiving the access request of the application, identifying priority rule requirements of resource allocation, and obtaining corresponding video data based on sharing and caching; establishing multiple data stream queues according to the priority rule requirements of resource allocation, and distributing video data to each application.

2. The RTSP streaming intelligent cache proxy method for embedded systems according to claim 1, wherein, The sharing and caching of the received encoded video data comprises: storing the encoded video data received through the uplink RTSP session into a shared cache pool, and the shared cache pool is a ring buffer.

3. The RTSP streaming intelligent cache proxy method for embedded systems according to claim 1, wherein, The setting of the virtual RTSP service address comprises: providing a virtual RTSP service address on a local network of the client embedded device, and the local network is a localhost or an internal bus network of the client embedded device; The virtual RTSP service address is a private address in the local network.

4. The RTSP streaming intelligent cache proxy method for embedded systems according to claim 2, wherein, The priority rule requirements of resource allocation comprise: low delay requirements and high integrity requirements; The establishment of multiple data stream queues comprises: a real-time data stream queue and a non-real-time data stream queue; The real-time data stream queue is used to distribute data to applications with low delay requirements, and the latest key frame in the shared cache pool is read preferentially; The applications with low delay requirements comprise real-time preview applications and video rendering applications; The non-real-time data stream queue is used to distribute data to applications with high integrity requirements, and historical data in the shared cache pool is read in the order of video frame generation; The applications with high integrity requirements comprise video recording applications and image recognition applications.

5. The RTSP streaming intelligent cache proxy method for embedded systems according to claim 1, characterized in that, Further comprising: an intelligent distribution engine; Through the intelligent distribution engine, the cache duration requirements of all applications in the client embedded device are obtained, and the maximum value of all cache duration requirements is taken as the total cache duration of the shared cache pool.

6. The RTSP streaming intelligent cache proxy method for embedded systems according to claim 5, wherein, The intelligent distribution engine further comprises: controlling the real-time data stream queue to store image group data, and the image group data is continuously filled to complete when a new P frame / B frame is received; The non-real-time data stream queue calculates the total duration of the currently stored image group data according to the total cache duration of the shared cache pool; If the total duration exceeds the total cache duration, the earliest entered image group data is deleted.

7. The RTSP streaming intelligent cache proxy method for embedded systems according to claim 1, wherein, The application initiates an access request to the virtual RTSP service address, which comprises: directly initiating an RTSP protocol request, and the internal virtual RTSP service module responds and provides streaming media services; calling the API interface provided by the internal virtual RTSP service module through the Binder feature of the Android system to obtain streaming media data.

8. An RTSP streaming intelligent cache proxy system for embedded systems, characterized in that, Comprise: The service deployment module, the request initiation module, the session establishment module, the shared buffer module, the access request module, the requirement identification module and the secondary distribution module; The service deployment module is configured to deploy the RTSP agent and the secondary distribution service; The request initiation module is configured to initiate an RTSP session establishment request; The session establishment module is configured to establish and maintain an uplink RTSP session in response to the RTSP agent and the secondary distribution service request; The shared buffer module is configured to share and buffer the received encoded video data according to the uplink RTSP session; The access request module is configured to set a virtual RTSP service address and initiate an access request to the virtual RTSP service address by an application; The requirement identification module is configured to receive the access request of the application, identify the priority rule requirement of resource allocation, and obtain corresponding video data based on the sharing and buffering; The secondary distribution module is configured to establish a plurality of data stream queues according to the priority rule requirement of resource allocation, and distribute the video data to each application.

9. An electronic device, comprising: It comprises: a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other through the communication bus; The memory stores a computer program, and when the computer program is executed by the processor, the processor executes the steps of the RTSP streaming media intelligent cache agent method for an embedded system according to any one of claims 1-7.

10. A computer-readable storage medium, characterized in that, It stores a computer program executable by an electronic device, and when the computer program runs on the electronic device, the electronic device executes the steps of the RTSP streaming media intelligent cache agent method for an embedded system according to any one of claims 1-7.