Data management module and method, and video security system
Through the data management module, the frame data information is updated in real time and query results are generated, which solves the problem of low efficiency of existing frame existence detection methods, and realizes more efficient frame existence detection and resource utilization.
Patent Information
- Application Number
- CN202510047660.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-10
- Publication Date
- 2025-04-25
AI Technical Summary
Existing frame presence detection methods rely on polling or blocking calls, resulting in increased system performance overhead and low efficiency.
It provides a data management module, through the storage unit and the execution unit, update the frame data information in the structure array in real time, generate query results and send them to the frame output module, avoiding calling the decoding channel where frame data does not exist.
The system overhead of frame presence detection is reduced, the efficiency of frame presence detection is improved, the system resource waste is avoided, and the frame fetching time is reduced.
Smart Images

Figure CN119893130A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of data processing technology, and in particular to a data management module, method, and video security system. Background Art
[0002] Data encoding and decoding technology is widely used in network video, digital television, video security and other fields because it can effectively compress data volume and has the advantages of easy storage and transmission.
[0003] With the development of data decoding technology and the improvement of decoding device performance, a large number of decoding devices currently adopt a multi-channel decoding architecture. The multi-channel decoding architecture allows decoding channels to work in parallel, and each decoding channel can process video data independently, which significantly improves the system's ability to process multiple video sources and enhances video decoding performance. In the multi-channel decoding architecture, frame existence detection is required for multiple decoding channels. The purpose of frame existence detection is to determine whether there is frame data in the buffer area corresponding to each decoding channel. If there is, the frame data is taken away and handed over to other devices or processing units for processing. However, the current frame existence detection relies on polling or blocking calls to each decoding channel to query whether there is frame data in the buffer area corresponding to the decoding channel. If there is frame data in the buffer area corresponding to the decoding channel, the frame data is taken out. If there is no frame data in the decoding channel, the next decoding channel is called. This method will increase unnecessary system performance overhead and make the efficiency of frame existence detection low. Summary of the invention
[0004] The embodiments of the present application provide a data management module, method, and video security system, which can reduce the system overhead of frame existence detection and increase the efficiency of frame existence detection.
[0005] In a first aspect, the present application provides a data management module, the data management module includes a storage unit and an execution unit, the storage unit is used to store a structure array, the data management module establishes a communication connection with a decoding module and a frame output module, the decoding module includes a plurality of decoding channel groups, and each decoding channel group includes a plurality of decoding channels;
[0006] The execution units are configured as:
[0007] After a data change event of frame data writing or frame data reading occurs in a buffer area corresponding to a decoding channel, data change information associated with the data change event is obtained;
[0008] The frame data information included in the structure array is updated according to the data change information; the frame data information is used to indicate the identification information of the target decoding channel group in which the frame data exists in the buffer area, and the identification information of the target decoding channel included in the target decoding channel group;
[0009] Obtain the data query instruction sent by the frame output module; generate the query result according to the frame data information included in the structure array, and send the query result to the frame output module.
[0010] In some embodiments, the data change information associated with the data change event includes first data change information associated with the data change event of writing frame data, or second data change information associated with the data change event of reading frame data; the frame data information includes a first subarray associated with the identification information of the target decoding channel group, and a second subarray associated with the identification information of the target decoding channel;
[0011] The execution unit executes updating of the frame data information included in the structure array according to the data change information, and is specifically configured as follows:
[0012] According to the first data change information, a first update operation is performed on the frame data information included in the structure array; the first update operation at least includes adding a first sub-array, adding a second sub-array, incrementing the value of a first data member representing the number of target decoding channel groups, incrementing the value of a second data member representing the number of target decoding channels, and incrementing the value of a third data member representing the number of frame data;
[0013] According to the second data change information, a second update operation is performed on the frame data information included in the structure array; the second update operation includes at least one of deleting the first sub-array, deleting the second sub-array, decrementing the value of the first data member, decrementing the value of the second data member, and decrementing the value of the third data member.
[0014] In some embodiments, the execution unit performs a first update operation on the structure array according to the first data change information, and is specifically configured as follows:
[0015] Check whether there is a first subarray associated with the identification information of the target decoding channel group in the structure array;
[0016] If the structure array contains a first subarray associated with the identification information of the target decoding channel group, it is detected whether the structure array contains a second subarray associated with the identification information of the target decoding channel;
[0017] If the structure array has a second subarray associated with the identification information of the target decoding channel, the value of the third data member included in the second subarray associated with the identification information of the target decoding channel is incremented.
[0018] In some embodiments, after the execution unit detects whether the structure array has a second sub-array associated with the identification information of the target decoding channel, it is further configured to:
[0019] If the structure array does not contain the second subarray associated with the identification information of the target decoding channel, add the second subarray associated with the identification information of the target decoding channel to the first subarray associated with the identification information of the target decoding channel group;
[0020] Setting the value of the third data member included in the second subarray associated with the identification information of the target decoding channel to an initial value;
[0021] The value of the second data member included in the identification information of the target decoding channel group is incremented.
[0022] In some embodiments, after the execution unit detects whether there is a first sub-array associated with the identification information of the target decoding channel group in the structure array, the execution unit is further configured to:
[0023] If the first subarray associated with the identification information of the target decoding channel group does not exist in the structure array, add the first subarray associated with the identification information of the target decoding channel group to the structure array;
[0024] Adding a second subarray associated with the identification information of the target decoding channel to the first subarray associated with the identification information of the target decoding channel group;
[0025] Setting the value of the third data member included in the second subarray associated with the identification information of the target decoding channel to an initial value;
[0026] Setting the value of the second data member included in the first subarray associated with the identification information of the target decoding channel group to an initial value;
[0027] Increment the value of the first data member.
[0028] In some embodiments, the execution unit performs a second update operation on the structure array according to the second data change information, and is specifically configured as follows:
[0029] In the structure array, the value of the third data member included in the second subarray associated with the identification information of the target decoding channel is decremented;
[0030] If the value of the third data member included in the second subarray associated with the identification information of the target decoding channel is the first value, decrementing the value of the second data member included in the first subarray associated with the identification information of the target decoding channel group;
[0031] The second subarray associated with the identification information of the target decoding channel is deleted.
[0032] In some embodiments, after the execution unit performs the decrement processing on the value of the second data member included in the first sub-array associated with the identification information of the target decoding channel group, the execution unit is further configured to:
[0033] If the value of the second data member associated with the identification information of the target decoding channel group is the first value, decrementing the value of the first data member;
[0034] The first subarray associated with the identification information of the target decoding channel group is deleted.
[0035] In some embodiments, the query result includes a first query result and a second query result, the first query result includes identification information of the target decoding channel group and identification information of the target decoding channel; the second query result includes blank information, and the blank information is used to indicate that there is no frame data in the buffer area corresponding to all current decoding channels;
[0036] The execution unit generates query results based on the frame data information, and is specifically configured as follows:
[0037] Detecting whether the value of the first data member is greater than the first value;
[0038] If the value of the first data member is greater than the first value, generating a first query result;
[0039] If the value of the first data member is less than or equal to the first value, a second query result is generated.
[0040] In a second aspect, the present application provides a data management method, which is applied to a data management module, wherein the data management module includes a storage unit and an execution unit, wherein the storage unit is used to store a structure array, and the execution unit establishes a communication connection with a decoding module and a frame output module, wherein the decoding module includes a plurality of decoding channel groups, and each decoding channel group includes a plurality of decoding channels;
[0041] Methods include:
[0042] After a data change event of frame data writing or frame data reading occurs in a buffer area corresponding to a decoding channel, data change information associated with the data change event is obtained;
[0043] The frame data information included in the structure array is updated according to the data change information; the frame data information is used to indicate the identification information of the target decoding channel group in which the frame data exists in the buffer area, and the identification information of the target decoding channel included in the target decoding channel group;
[0044] Obtain the data query instruction sent by the frame output module; generate the query result according to the frame data information included in the structure array, and send the query result to the frame output module.
[0045] In a third aspect, the present application provides a video security system, the video security system comprising: a front-end device, a transmission device and a back-end device; the back-end device comprises a decoding module, a data management module and a frame output module;
[0046] The front-end device is configured to collect original video data and encode the original video data to obtain video encoding data;
[0047] A transmission device configured to transmit the video encoding data to the decoding module;
[0048] The decoding module is configured to use the target decoding channel to decode the video encoding data to obtain frame data; and write the frame data into a buffer area corresponding to the target decoding channel;
[0049] The data management module is configured to update the frame data information included in the structure array according to the data change information; the frame data information is used to indicate the identification information of the target decoding channel group in which the frame data exists in the buffer area, and the identification information of the target decoding channel included in the target decoding channel group;
[0050] A frame output module is configured to send a data query instruction to the data management module;
[0051] The data management module is further configured to obtain a data query instruction sent by the frame output module; generate a query result according to the frame data information included in the structure array, and send the query result to the frame output module;
[0052] The frame output module is also configured to obtain frame data from a buffer area corresponding to a target decoding channel according to a query result.
[0053] It can be known from the above technical content that the present application provides a data management module that updates the frame data information included in the structure array according to the data change information associated with the data change event of frame data writing or frame data reading. The structure array is a custom array that can record the identification information of the target decoding channel group in which frame data exists in the buffer area, and the identification information of the target decoding channel included in the target decoding channel group. And after the data change event of frame data writing or frame data reading occurs, the frame data information included in the structure array is updated. After obtaining the data query instruction sent by the frame output module, according to the frame data information recorded by the structure array, the frame output module is instructed to obtain frame data from the buffer area corresponding to the target decoding channel. Avoid the waste of system resources caused by calling the decoding channel where no frame data exists, reduce the frame acquisition time, and improve the frame acquisition efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0054] In order to more clearly illustrate the technical solution of the present application, the drawings required for use in the embodiments are briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0055] Figure 1An example diagram of a video security system to which a data management module provided in an embodiment of the present application is applicable;
[0056] Figure 2 An architecture diagram for decoding and outputting video data from multiple video sources provided in an embodiment of the present application;
[0057] Figure 3 A data management module provided in an embodiment of the present application is arranged to decode and output video data of multiple video sources;
[0058] Figure 4 A schematic diagram of the structure of a data management module provided in an embodiment of the present application;
[0059] Figure 5 A structural example diagram of a structure array applicable to a data management module provided in an embodiment of the present application;
[0060] Figure 6 A data management module provided in an embodiment of the present application includes an execution unit executing an execution logic flow chart for updating a structure array according to first data change information;
[0061] Figure 7 A data management module provided in an embodiment of the present application includes an execution logic flow chart for updating a structure array according to second data change information;
[0062] Figure 8 A flowchart of a data processing method provided in an embodiment of the present application. DETAILED DESCRIPTION
[0063] The following embodiments are described in detail, and examples thereof are shown in the accompanying drawings. When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The implementations described in the following embodiments do not represent all implementations consistent with the present application. They are only examples of systems and methods consistent with some aspects of the present application as detailed in the claims.
[0064] In this application, the terms "first", "second", etc. are used to distinguish between identical or similar items with substantially the same effects and functions. It should be understood that there is no logical or temporal dependency between "first", "second", and "nth", nor is there a limitation on the quantity and execution order. It should also be understood that although the following description uses the terms first, second, etc. to describe various elements, these elements should not be limited by the terms.
[0065] These terms are only used to distinguish one element from another element. For example, without departing from the scope of various examples, a first action can be referred to as a second action, and similarly, a second action can also be referred to as a first action. Both the first action and the second action can be actions, and in some cases, can be separate and different actions.
[0066] Here, at least one means one or more than one, for example, at least one action can be one action, two actions, three actions, or any other action that is an integer greater than or equal to one. And multiple means two or more than two, for example, multiple actions can be two actions, three actions, or any other action that is an integer greater than or equal to two.
[0067] Video security system is a comprehensive system that uses video technology, information technology and network technology to effectively collect, store, transmit and control video data in the video acquisition area. Video security system is widely used in urban security, enterprise security, smart home and other fields.
[0068] like Figure 1 As shown, an example diagram of a video security system is introduced. The video security system is mainly composed of a front-end device 10, a transmission device 20, and a back-end device 30.
[0069] The front-end device 10 is mainly responsible for collecting raw video data in the video collection area. The front-end device 10 includes, for example, a camera, a signal processing chip, and the like.
[0070] The camera may include a lens assembly and a photosensitive element. The lens assembly is provided with a photosensitive element and a lens. The lens can refract light through multiple lenses so that the light is irradiated on the photosensitive element. The photosensitive element can be made of materials based on a charge-coupled device (CCD) or a complementary metal oxide semiconductor (CMOS). The light signal captured by the photosensitive element is converted into an electrical signal, and then the electrical signal is converted into raw video data and output.
[0071] In some application scenarios, a video security system generally includes multiple cameras (camera 1 to camera n) for respectively collecting video data of different video collection areas.
[0072] The signal processing chip is responsible for amplifying, filtering, and performing analog-to-digital conversion on the analog electrical signals collected by the image sensor, and compressing, encoding, enhancing, and reducing noise on the digital video signal to improve the quality of the video data and reduce the demand for storage space and transmission bandwidth. In an embodiment of the present application, the signal processing chip includes a video encoding module for encoding the raw video data output by the image sensor to obtain video encoding data.
[0073] In an application scenario where a video security system includes multiple cameras, a video encoding module generally includes multiple encoding channels, and each encoding channel is responsible for encoding the original video data collected by the corresponding camera to obtain video encoding data.
[0074] The transmission device 20 is responsible for transmitting the original video data collected by the front-end device 10 or the video coded data output after being processed by the signal processing chip to the back-end device 30. The types of the transmission device 20 include, for example, coaxial cables, network cables, optical fibers, and wireless transmission. In order to reduce the bandwidth requirements of the transmission device 20 and transmit more video data under limited bandwidth resources, in some embodiments, the transmission device 20 is mainly responsible for transmitting the video coded data after being coded by the signal processing chip to the back-end device 30.
[0075] The back-end device 30 mainly includes a video decoding module, a frame output module, a video recorder, a display device, etc.
[0076] The video decoding module (decoding module) is mainly used to decode the video encoding data output by the video encoding module to obtain video decoding data (also called frame data).
[0077] In the application scenario where the video security system includes multiple cameras, the decoding module generally adopts a multi-channel decoding architecture. Each channel of video decoding data (video encoding data output by one encoding channel) is decoded and processed by one or more decoding channels. Each decoding channel can output different types of frame data. Different types of frame data output include, for example: crop output, zoom output, original image output, rotation output, mirror flip output, etc. In this way, one channel of video decoding data is decoded and processed by multiple decoding channels to achieve different types of frame data output.
[0078] The frame output module is mainly used to take out the frame data from the corresponding buffer area and hand it over to other devices for further processing. In the prior art, the frame output module mainly uses a single-threaded polling or blocking call to call each decoding channel in turn to determine whether there is frame data in the buffer area corresponding to each decoding channel. If so, the frame data is taken out, and if not, the next decoding channel is called. Alternatively, multiple threads are used to call each decoding channel at the same time to determine whether there is frame data in the buffer area corresponding to each decoding channel. If so, the frame data is taken out.
[0079] The video recorder is used to store frame data for subsequent viewing and playback.
[0080] The display device includes a display, a memory and a controller. The display is used to display frame data in real time for easy viewing by operators.
[0081] The controller is used to control the operation of the display device and respond to user operations through various video playback or video processing software programs stored in the memory. These video playback software or video processing software generates the need to obtain frame data, and the frame data module performs frame acquisition operations according to the needs of these software.
[0082] In some embodiments, the video decoding module and the frame output module may also be deployed in the display device in the form of hardware and / or software, or as an independent device to establish a communication connection with the display device, obtain the frame data requirements of the video playback or video processing software program through the communication connection, and perform the frame acquisition operation.
[0083] Since the multi-channel decoding architecture allows multiple decoding channels to work in parallel, each decoding channel can independently decode the video encoded data, which can significantly improve the system's ability to process video data from multiple video sources, thereby improving the video data processing efficiency of the video security system.
[0084] As shown in Figure 3 below, an architecture diagram for decoding and outputting video data from multiple video sources is introduced. It should be noted that since this application optimizes and improves the frame existence detection in the video processing link, it does not involve improvements to the front-end device 10 and the transmission device 20. Therefore, the front-end device 10 and the transmission device 20 in the video security system are regarded as video sources, and the front-end device 10 and the transmission device 20 are no longer described. In addition, the display, video recorder, etc. are regarded as frame data consumption devices and are no longer described.
[0085] Figure 2 The architecture diagram shown includes several video sources (V1-Vn), a video decoding module, a frame output module and a frame data consumption device.
[0086] Each video source is used to represent an input of one channel of video encoding data.
[0087] The video decoding module includes several decoding channels (a1 to am). The number of decoding channels can be the same as the number of video sources or different from the number of video sources ( Figure 2 The number of decoding channels shown is the same as the number of video sources), and each video source is connected to at least one decoding channel. Each decoding channel has a corresponding buffer area, which is used to store frame data output by the decoding channel.
[0088] The frame output module is connected to a plurality of decoding channels, takes out frame data from the buffer area corresponding to the decoding channel, and sends the frame data to a frame data consumption device (display device, video recorder, etc.).
[0089] At present, the frame output module mainly adopts a single-thread polling or blocking call to the decoding channel to fetch frames, or a multi-threaded call to the decoding channel to fetch frames at the same time. However, when single-threaded polling or calling the decoding channel is adopted, a single thread is required to call each decoding channel in turn to determine whether there is frame data in the buffer corresponding to each decoding channel, and if so, the frame data is taken out. If not, the next decoding channel is called. Due to the hardware parameters of each video source, the output video specifications may be different, or due to factors such as video source failure and manual shutdown, there may be no frame data in the buffer corresponding to some decoding channels. When the frame output module adopts single-threaded polling or blocking to call these decoding channels, the frame data will not be obtained, and a certain waiting time will be consumed. After the waiting time, the blank information returned will be received before the next decoding channel is called. This method will cause a waste of system resources, increase the frame fetching time, and reduce the frame fetching efficiency.
[0090] Although the multi-threaded simultaneous frame acquisition method can call the same number of decoding channels as the number of threads at the same time, due to the large number of decoding channels, if a thread is assigned to each decoding channel, it will increase the system resources required to maintain the thread operation. If a thread manages multiple decoding channels, there will still be a problem of wasting system resources when calling some decoding channels because the corresponding buffers of these decoding channels do not have decoding data.
[0091] In response to the above problems, an embodiment of the present application provides a data management module that can indicate to the frame output module the existence of decoding channels for frame data and the number of frame data in the cache areas corresponding to these decoding channels, so that the frame output module can use a single thread to directly call these decoding channels to perform frame acquisition operations, thereby avoiding the waste of system resources caused by calling decoding channels that do not have frame data, reducing frame acquisition time, and improving frame acquisition efficiency.
[0092] In some embodiments, the data management module may be arranged in a framework for decoding and outputting video data of a plurality of video sources, and the data management module establishes a communication connection with the video decoding module and the frame output module.
[0093] like Figure 3 As shown in FIG. 1 , the data management module provided in the embodiment of the present application is arranged to decode and output the video data of multiple video sources. It can be known that due to Figure 3 Zhongyu Figure 2 Similar parts have been described in detail in the above embodiments, and will not be repeated here.
[0094] exist Figure 3 In the process, the data management module establishes a communication connection with the decoding module. After the decoding module stores the frame data into the buffer area corresponding to the target decoding channel, the data management module records the frame data and stores it into the buffer area corresponding to the target decoding channel.
[0095] The data management module establishes a communication connection with the frame output module. When the frame output module takes out the frame data in the buffer area corresponding to the target decoding channel, the data management module records that the frame data is taken out from the buffer area corresponding to the target decoding channel.
[0096] When the data management module obtains the data query instruction sent by the frame output module, it outputs the query result to the frame output module according to the recorded frame data information. The frame data module calls the target decoding channel according to the data query result and takes out the frame data from the buffer area corresponding to the target decoding channel.
[0097] The data management module provided in the embodiment of the present application is introduced in detail below.
[0098] like Figure 4 As shown, a structural example diagram of a data management module is introduced. The data management module 300 includes a storage unit 310 and an execution unit 320. The storage unit 310 is used to store a structure array.
[0099] Among them, the structure array is an array of a custom data type. The structure array that records frame data information may include multiple data members, and the data members are a defined data type. In some embodiments, the structure array includes a first data member, a second data member, and a third data member. Among them, the first data member is used to characterize the number of target decoding channel groups in the structure array; the second data member is used to characterize the number of target decoding channels included in the target decoding channel group; the third data member is used to characterize the number of frame data included in the target decoding channel; the structure array can store multiple first data members, second data members, and third data members. As Figure 5 As shown in the figure, an example diagram of the structure of a structure array is introduced.
[0100] The structure array includes a three-layer structure. The first layer structure includes a first data member and a first sub-array associated with the identification information of the decoding channel group. The number of the first sub-array is the same as the value of the first data member. When the value of the first data member is 0 (the first value), the structure array does not include any first sub-array. Figure 5 In the example, the value of the first data member is n (n is a positive integer), and the structure array includes the first sub-array 1 to the first sub-array n.
[0101] The second layer structure is a second data member included in the first subarray and a second subarray associated with the identification information of the decoding channel; the number of the second subarrays is the same as the value of the second data member. When the value of the second data member is 0, the first subarray does not include any second subarray. Figure 5 , the value of the second data member included in the first sub-array 1 is m (m is a positive integer), and the first sub-array 1 includes the second sub-array 1 to the second sub-array m.
[0102] The third layer structure is the third data member included in the second sub-array. The value of the third data member is used to represent the number of frame data in the buffer corresponding to the decoding channel associated with the second sub-array. When the value of the third data member is 0, there is no frame data in the buffer corresponding to the decoding channel associated with the second sub-array. Figure 5 In the example, the value of the third data member included in the second sub-array 1 is p (p is a positive integer), indicating that there are p frames of frame data in the buffer area corresponding to the decoding channel associated with the second sub-array 1.
[0103] What we know is that Figure 5 The structure array shown is only an example, and the present application embodiment does not impose any limitation on the specific structure of the structure array.
[0104] The execution unit 320 is configured to perform the following steps:
[0105] Step S1: after a data change event of writing frame data or reading frame data occurs in a buffer area corresponding to a decoding channel, data change information associated with the data change event is obtained.
[0106] The data change event refers to an event triggered by the decoding module to write frame data into the buffer area corresponding to the decoding channel, or an event triggered by the frame output module to retrieve frame data from the buffer area corresponding to the decoding channel.
[0107] The data change information includes first data change information and second data change information. The first data change information includes information associated with an event triggered by a decoding module to write frame data into a cache area corresponding to a decoding channel; the second data change information includes information associated with an event triggered by a frame output module to retrieve frame data from a cache area corresponding to a decoding channel.
[0108] In some embodiments, the data change information may include, for example, identification information of a target decoding channel group where the frame data exists, and identification information of a target decoding channel included in the target decoding channel group.
[0109] In some embodiments, the decoding module includes a plurality of decoding channel groups, and the decoding channel group includes a plurality of decoding channels. The decoding channel group corresponds to a video source, and one decoding channel group corresponds to one video source. For example, in a system with 16 video sources, the number of decoding channel groups can be 16, if each decoding channel group needs to perform cropping, scaling, and decoding output of the original image on the video decoding data input by the video source. Then, each decoding channel group includes 3 decoding channels, and the 3 decoding channels perform cropping, scaling, and decoding output of the original image respectively, and the system includes a total of 48 decoding channels.
[0110] It can be known that more decoding channels can be added according to user needs to perform more types of decoding outputs, such as mirror flip output, rotation output, etc. Correspondingly, each decoding channel group includes more decoding channels. The embodiment of the present application is illustrated by taking the decoding channel group including 3 decoding channels as an example. Similarly, each decoding channel group can include more or fewer decoding channels. The embodiment is no longer described one by one.
[0111] Step S2: updating the frame data information included in the structure array according to the data change information.
[0112] In some embodiments, the data management module 300 updates the structure array according to the data change information, which can be specifically divided into the following two cases a1 to a2:
[0113] a1: According to the first data change information, a first update operation is performed on the frame data information included in the structure array.
[0114] Among them, the first update operation includes at least one of adding a first sub-array, adding a second sub-array, incrementing the value of a first data member representing the number of target decoding channel groups, incrementing the value of a second data member representing the number of target decoding channels, and incrementing the value of a third data member representing the number of frame data.
[0115] In some embodiments, the first data change information may be sent by the decoding module to the data management module 300 after writing the frame data into the buffer area corresponding to the decoding channel. The execution unit 320 included in the data management module 300 updates the structure array according to the first data change information.
[0116] In some embodiments, the first data change information may also be periodically obtained from the decoding module by the execution unit 320 of the data management module 300 .
[0117] Among them, the execution unit 320 periodically obtains the first data change information from the decoding module and supports blocking and timeout. Blocking means that when the execution unit 320 accesses the decoding module, if the first data change information is not obtained, no message is returned until the first data change information is obtained. After the first update operation is performed on the frame data information included in the structure array according to the first data change information, the decoding module is accessed again to execute the process in a loop. Timeout means that when the execution unit 320 accesses the decoding module, if the first data change information is not obtained, the timing is started. If the first data change information is not obtained after the timing reaches the preset time, empty information is returned. If the first data change information is obtained, the frame data information included in the structure array is first updated according to the first data change information. After that, the decoding module is accessed again and the process is executed in a loop.
[0118] a2: According to the second data change information, a second update operation is performed on the frame data information included in the structure array.
[0119] The second update operation includes at least one of deleting the first subarray, deleting the second subarray, decrementing the value of the first data member, decrementing the value of the second data member, and decrementing the value of the third data member.
[0120] In some embodiments, the second data change information may be sent to the data management module 300 after the frame output module takes out the frame data from the buffer area corresponding to the target decoding channel. The execution unit 320 included in the data management module 300 updates the structure array according to the second data change information.
[0121] In some embodiments, the second data change information may also be obtained from a periodic frame output module of the execution unit 320 of the data management module 300 .
[0122] The following describes the process in which the execution unit 320 included in the data management module 300 performs an update operation on the structure array according to the first data change information and performs an update operation on the structure array according to the second data change information.
[0123] With respect to the above situation a1, in some embodiments, the execution unit 320 performs a first update operation on the structure array according to the first data change information, and is specifically configured as follows:
[0124] Check whether there is a first sub-array associated with the identification information of the target decoding channel group in the structure array; if there is a first sub-array associated with the identification information of the target decoding channel group in the structure array, check whether there is a second sub-array associated with the identification information of the target decoding channel in the structure array; if there is a second sub-array associated with the identification information of the target decoding channel in the structure array, increment the value of the third data member included in the second sub-array associated with the identification information of the target decoding channel.
[0125] In some embodiments, the execution unit 320 may obtain the identification information of the target decoding channel group and the identification information of the target decoding channel through the first data change information. According to the identification information of the target decoding channel group, it is queried whether there is a first sub-array associated with the identification information of the decoding channel group in the structure array. If the first sub-array exists, it is queried whether there is a second sub-array associated with the identification information of the target decoding channel in the structure array according to the identification information of the target decoding channel. If the second sub-array exists, the value of the third data member included in the second sub-array is added by 1.
[0126] In some embodiments, the value of the third data member may be an integer value, and each increase of 1 in the value indicates that the frame data in the buffer corresponding to the decoding channel associated with the third data member increases by one frame.
[0127] Since the execution unit 320 first queries whether there is a first sub-array associated with the identification information of the target decoding channel group in the structure array according to the identification information of the target decoding channel group, if there is a first sub-array associated with the identification information of the target decoding channel group in the structure array, it means that the execution unit 320 has recorded that the target decoding channel group includes frame data before updating the structure array according to the first data change information. Therefore, it can be further queried whether the target decoding channel includes frame data in the structure array according to the identification information of the decoding channel. If there is a second sub-array corresponding to the identification information of the target decoding channel in the structure array, it means that the execution unit 320 has recorded that the buffer area corresponding to the target decoding channel includes frame data before updating the structure array according to the first data change information. Therefore, the value of the third data member related to the identification information of the decoding channel can be directly incremented. In this way, the execution unit 320 only needs to accurately and efficiently record the information of the increase of frame data according to simple query instructions and add instructions.
[0128] The above embodiment describes a process in which the execution unit 320 updates the structure array by acquiring the first data change information triggered by the decoding module storing the frame data into the buffer area corresponding to the target decoding channel in the target decoding channel group when the buffer area corresponding to the target decoding channel has frame data. In some embodiments, other situations may occur in the process of the execution unit 320 updating the structure array according to the first data change information. The following describes two possible situations a11 and a12.
[0129] a11: When frame data exists in the buffers corresponding to other decoding channels in the target decoding channel group, the execution unit 320 obtains first data change information triggered by the decoding module storing the frame data into the buffer corresponding to the target decoding channel.
[0130] In some embodiments, after executing the detection of whether the structure array has a second sub-array associated with the identification information of the target decoding channel, the execution unit 320 is further configured to:
[0131] If the structure array does not contain the second subarray associated with the identification information of the target decoding channel, add the second subarray associated with the identification information of the target decoding channel to the first subarray associated with the identification information of the target decoding channel group; set the value of the third data member included in the second subarray associated with the identification information of the target decoding channel to the initial value; and increment the value of the second data member included in the identification information of the target decoding channel group.
[0132] In some embodiments, the execution unit 320 queries the structure array through a query instruction whether there is a second sub-array associated with the identification information of the target decoding channel. If the second sub-array does not exist, it means that before the execution unit 320 updates the structure array according to the first data change information, there is no frame data in the buffer area corresponding to the target decoding channel. The execution unit 320 adds the second sub-array associated with the identification information of the target decoding channel to the first sub-array corresponding to the identification information of the target decoding channel group through an add instruction. And the value of the third data member included in the second sub-array is set to an initial value (the initial value can be set to 1), indicating that there is frame data in the buffer area corresponding to the current target decoding channel, and the number of frame data is 1.
[0133] In addition, since the second subarray associated with the identification information of the new target decoding channel is added to the first subarray associated with the identification information of the target decoding channel group, the value of the second data member included in the first subarray is increased by 1. This indicates that a new target decoding channel with frame data is added to the target decoding channel group.
[0134] a12: When no frame data exists in the buffers corresponding to the decoding channels included in the target decoding channel group, the execution unit 320 obtains the first data change information triggered by the decoding module storing the frame data into the buffer corresponding to the target decoding channel.
[0135] In some embodiments, after executing the detection of whether there is a first sub-array associated with the identification information of the target decoding channel group in the structure array, the execution unit 320 is further configured to:
[0136] If the first subarray associated with the identification information of the target decoding channel group does not exist in the structure array, add the first subarray associated with the identification information of the target decoding channel group to the structure array; add the second subarray associated with the identification information of the target decoding channel to the first subarray associated with the identification information of the target decoding channel group; set the value of the third data member included in the second subarray associated with the identification information of the target decoding channel to the initial value; set the value of the second data member included in the first subarray associated with the identification information of the target decoding channel group to the initial value; and increment the value of the first data member.
[0137] In some embodiments, the execution unit 320 queries the structure array through a query instruction whether there is a first sub-array associated with the identification information of the target decoding channel group. If the first sub-array does not exist, it means that before the execution unit 320 updates the structure array according to the first data change information, there is no frame data in the buffer area corresponding to all target decoding channels included in the target decoding channel group. The execution unit 320 adds the first sub-array associated with the identification information of the target decoding channel group to the structure array through an add instruction, and then adds the second sub-array associated with the identification information of the target decoding channel included in the first sub-array associated with the identification information of the target decoding channel group through an add instruction.
[0138] The execution unit 320 increments the value of the first data member, sets the second data member included in the first subarray associated with the identification information of the target decoding channel group to the initial value, and sets the value of the third data member included in the second subarray associated with the identification information of the target decoding channel to the initial value.
[0139] The following describes the execution logic of the execution unit 320 updating the structure array according to the first data change information including the above-mentioned various situations.
[0140] It can be known that the first data change information may include identification information of multiple target decoding channel groups, each of which includes multiple target decoding channels. The execution unit 320 may process in sequence. The following is an example in which the first data change information includes identification information of three target decoding channel groups, each of which includes identification information of three target decoding channels.
[0141] like Figure 6 As shown, the execution logic flow chart of the execution unit 320 updating the structure array according to the first data change information is introduced, including:
[0142] S601. Initialize the structure array.
[0143] In some embodiments, after the data management module 300 is started, the execution unit 320 initializes the structure array. The value of the first data member included in the initialized structure array is 0, and the first sub-array does not exist in the structure array.
[0144] S602 , traverse the current target decoding channel of the current target decoding channel group.
[0145] In some embodiments, the first data change information includes identification information of target decoding channel group 10 , target decoding channel group 20 , and target decoding channel group 30 .
[0146] and identification information of target decoding channel 11, target decoding channel 12, and target decoding channel 13 included in target decoding channel group 10;
[0147] The identification information of the target decoding channel 21, the target decoding channel 22, and the target decoding channel 23 included in the target decoding channel group 20;
[0148] The target decoding channel group 30 includes identification information of a target decoding channel 31 , a target decoding channel 32 , and a target decoding channel 33 .
[0149] Taking the current target decoding channel group as target decoding channel group 10 and the current target decoding channel as target decoding channel 11 as an example, the execution unit 320 traverses the target decoding channel 11, target decoding channel 12, and target decoding channel 13 included in the target decoding channel group 10 in sequence, and then traverses the target decoding channel 21, target decoding channel 22, and target decoding channel 23 included in the target decoding channel 20, and so on.
[0150] S603, determining whether the structure array contains a first sub-array associated with the identification information of the current target decoding channel group, if so, executing S604, if not, executing S610.
[0151] In the above embodiment, it has been introduced that the execution unit 320 can use the conditional instruction to determine whether there is a first sub-array associated with the current target decoding channel group in the structure array. This will not be described in detail here.
[0152] S604, determining whether the structure array contains a second sub-array associated with the identification information of the current target decoding channel, if so, executing S605, if not, executing S620.
[0153] In the above embodiment, it has been introduced that the execution unit 320 can use the conditional instruction to determine whether there is a first sub-array associated with the current target decoding channel in the structure array, which will not be described in detail here.
[0154] S605 . Add 1 to the value of the third data member included in the second subarray associated with the identification information of the current target decoding channel.
[0155] S606 , determining whether there is an untraversed target decoding channel in the current target decoding channel group, if yes, executing S607 , if not, executing S608 .
[0156] In some embodiments, the execution unit 320 can determine the number of current target decoding channels included in the current target decoding channel group based on the first data change information, and add 1 to the judgment value each time the current target decoding channels included in the current target decoding channel group are traversed. When the judgment value is equal to the number of current target decoding channels included in the current target decoding channel group, it indicates that there are no untraversed target decoding channels in the current target decoding channel group.
[0157] For example, the current target decoding channel group is target decoding channel group 10. When the execution unit 320 traverses the target decoding channel group 10 for the first time, it traverses the target decoding channel 11, the judgment value is 1, the number of target decoding channels is 3, and the execution unit 320 executes S607.
[0158] When the execution unit 320 traverses the target decoding channel group 10 for the second time, it traverses the target decoding channel 12, the judgment value is 2, the number of target decoding channels is 3, and the execution unit 320 executes S607.
[0159] When the execution unit 320 traverses the target decoding channel group 10 for the third time, it traverses the target decoding channel 13, the judgment value is 3, the number of target decoding channels is 3, and the execution unit 320 executes S608.
[0160] S607 , obtaining an untraversed target decoding channel in the current target decoding channel group as a new current target decoding channel, and executing S605 .
[0161] In some embodiments, if the current target decoding channel group is the target decoding channel group 10 and the current target decoding channel is the target decoding channel 11 , then the new current target decoding channel is the target decoding channel 12 .
[0162] S608 , obtaining an untraversed target decoding channel group as the current target decoding channel group, and executing S602 .
[0163] In some embodiments, if the current target decoding channel group is the target decoding channel group 10 , then the new current target decoding channel group is the target decoding channel group 20 , and the new target decoding channel is the target decoding channel 21 .
[0164] S610, add a first subarray associated with the identification information of the current target decoding channel group to the structure array, add a second subarray associated with the identification information of the current target decoding channel, add 1 to the value of the first data member, set the value of the second data member included in the first subarray to 1, and set the value of the third data member included in the second subarray to 1; return to execute S606.
[0165] S620. Add the second subarray associated with the identification information of the target decoding channel to the first subarray associated with the identification information of the target decoding channel; set the value of the second data member included in the first subarray to 1, and add 1 to the value of the third data member included in the second subarray; return to execute S606.
[0166] With respect to the above-mentioned situation a2, in some embodiments, the execution unit 320 performs a second update operation on the structure array according to the second data change information, and is specifically configured as follows: in the structure array, the value of the third data member included in the second sub-array associated with the identification information of the target decoding channel is decremented; if the value of the third data member included in the second sub-array associated with the identification information of the target decoding channel is the first value, the value of the second data member included in the first sub-array associated with the identification information of the target decoding channel group is decremented; and the second sub-array associated with the identification information of the target decoding channel is deleted.
[0167] In some embodiments, the execution unit 320 reduces the value of the third data member included in the second subarray associated with the identification information of the target decoding channel by 1, indicating that one frame of frame data in the buffer area corresponding to the target decoding channel group is taken out.
[0168] After the execution unit 320 executes the update of the structure array according to the second data change information, it determines whether the value of the third data member included in the second sub-array associated with the identification information of the target decoding channel is 0 (first value) through the conditional instruction. If it is the first value, it indicates that there is no frame data in the buffer area corresponding to the target decoding channel. The execution unit 320 deletes the second sub-array associated with the identification information of the target decoding channel, and reduces the value of the second data member included in the first sub-array associated with the target decoding channel group by 1, indicating that one target decoding channel with frame data in the target decoding channel group is reduced.
[0169] In the above embodiment, after the execution unit 320 updates the structure array according to the second data change information, when there is no frame data in the buffer area corresponding to the target decoding channel in the target decoding channel group, the value of the second data member included in the second data decoding channel group is decremented. Then, after the value of the second data member is decremented, the following situation may also occur:
[0170] In some embodiments, after the execution unit 320 performs decrement processing on the value of the second data member included in the first sub-array associated with the identification information of the target decoding channel group, it is also configured to: if the value of the second data member associated with the identification information of the target decoding channel group is the first value, decrement the value of the first data member; and delete the first sub-array associated with the identification information of the target decoding channel group.
[0171] In some embodiments, the execution unit 320 subtracts 1 from the value of the second data member included in the first sub-array associated with the identification information of the target decoding channel group, and determines through a conditional instruction whether the value of the associated second data member is 0. If it is 0, it indicates that there is no frame data in the cache area corresponding to the target decoding channels included in the target decoding channel group. The execution unit 320 deletes the first sub-array associated with the target decoding channel group in the structure array, and subtracts 1 from the value of the first data member, indicating that the number of decoding channel groups with frame data is reduced by one.
[0172] It can be known that the second data change information may include identification information of multiple target decoding channels, and each target decoding channel group includes identification information of multiple target decoding channels. The execution unit 320 may process in sequence. The following is an example in which the second data change information includes identification information of three target decoding channel groups, and each target decoding channel group includes identification information of three target decoding channels.
[0173] like Figure 7 As shown, the execution logic flow chart of the execution unit 320 updating the structure array according to the second data change information is introduced, including:
[0174] S701 , traverse the current target decoding channel of the current target decoding channel group.
[0175] Taking the current target decoding channel group as target decoding channel group 10 and the current target decoding channel as target decoding channel 11 as an example, the execution unit 320 traverses the target decoding channel 11, target decoding channel 12, and target decoding channel 13 included in the target decoding channel group 10 in sequence, and then traverses the target decoding channel 21, target decoding channel 22, and target decoding channel 23 included in the target decoding channel 20, and so on.
[0176] S702: Subtract 1 from the value of the third data member included in the second sub-array associated with the current target decoding channel in the structure array.
[0177] S703, determine whether the value of the third data member is 0, if so, execute S710, if not, execute S704.
[0178] In some embodiments, the execution unit 320 can determine whether the value of the third data member is 0 through a conditional instruction. For example, a comparison object with a value of 0 is set, and the relationship between the value of the third data member and the value of the comparison object is compared. If the value of the third data member is the same as the value of the comparison object, the value of the third data member is determined to be 0, and the execution unit 320 executes S710. If the value of the third data member is different from the value of the comparison object, the value of the third data member is determined to be not 0, and the execution unit 320 executes S704.
[0179] S704 , determining whether there is an untraversed target decoding channel in the current target decoding channel group, if yes, executing S705 , if not, executing S706 .
[0180] In some embodiments, the execution unit 320 can determine the number of current target decoding channels included in the current target decoding channel group based on the second data change information, and add 1 to the judgment value each time the current target decoding channels included in the current target decoding channel group are traversed twice. When the judgment value is equal to the number of current target decoding channels included in the current target decoding channel group, it indicates that there are no untraversed target decoding channels in the current target decoding channel group.
[0181] For example, the current target decoding channel group is target decoding channel group 10. When the execution unit 320 traverses the target decoding channel group 10 for the second time, it traverses the target decoding channel 11, the judgment value is 1, the number of target decoding channels is 3, and the execution unit 320 executes S607.
[0182] When the execution unit 320 traverses the target decoding channel group 10 for the second time, it traverses the target decoding channel 12, the judgment value is 2, the number of target decoding channels is 3, and the execution unit 320 executes S705.
[0183] When the execution unit 320 traverses the target decoding channel group 10 for the third time, it traverses the target decoding channel 13, the judgment value is 3, the number of target decoding channels is 3, and the execution unit 320 executes S706.
[0184] S705 . Obtain an untraversed target decoding channel in the current target decoding channel group as a new current target decoding channel, and execute S702 .
[0185] In some embodiments, the execution unit 320 may obtain the untraversed target decoding channels according to the target decoding channel groups and the arrangement order of the target decoding channels obtained in S701 above.
[0186] For example, if the current target decoding channel group is target decoding channel group 10 and the current target decoding channel is target decoding channel 11, then the new current target decoding channel is target decoding channel 12.
[0187] S706 , obtaining an untraversed target decoding channel group as the current target decoding channel group, and executing S701 .
[0188] In some embodiments, if the current target decoding channel group is target decoding channel group 10, then the new current target decoding channel group is target decoding channel group 20, and the new current target decoding channel is target decoding channel 21.
[0189] S710: Delete the second sub-array associated with the current target decoding channel in the structure array, and reduce the value of the second data member included in the first sub-array associated with the target decoding channel group by 1.
[0190] S711. Determine whether the value of the second data member is 0. If so, execute S720; if not, execute S704.
[0191] In some embodiments, the execution unit 320 can determine whether the value of the second data member is 0 through a conditional instruction. For example, a comparison object with a value of 0 is set, and the relationship between the value of the second data member and the value of the comparison object is compared. If the value of the second data member is the same as the value of the comparison object, the value of the second data member is determined to be 0, and the execution unit 320 executes S710. If the value of the second data member is different from the value of the comparison object, the value of the second data member is determined to be not 0, and the execution unit 320 executes S704.
[0192] S720, delete the first subarray associated with the target decoding channel group in the structure array, and reduce the value of the first data member by 1; return to execute S706.
[0193] In the above step S2, the execution unit 320 can update the structure array in real time according to the data change information. Since the data change information is triggered when the decoding module executes the frame data writing operation, or the frame output module executes the frame data retrieval operation, this event-triggered mechanism does not require the execution unit 320 to actively query the decoding module and the frame output module. Only when the data change actually occurs, the execution unit 320 will execute the operation of updating the structure array in real time according to the data change information, saving a certain amount of system resource overhead.
[0194] Step S3, obtaining a data query instruction sent by the frame output module; generating a query result according to the frame data information included in the structure array, and sending the query result to the frame output module.
[0195] The execution unit 320 executes the frame data information recorded according to the structure array and sends the query result to the frame output module. It is specifically configured to: detect whether the value of the first data member is greater than the first value; if the value of the first data member is greater than the first value, generate a first query result; if the value of the first data member is less than or equal to the first value, generate a second query result.
[0196] Among them, the query results include a first query result and a second query result. The first query result includes identification information of the target decoding channel group and identification information of the target decoding channel; the second query result includes blank information, and the blank information is used to represent that there is no frame data in the cache area corresponding to all current decoding channels.
[0197] In some embodiments, the data query instruction includes obtaining a preset number of frame data from the buffer areas corresponding to all target decoding channels. These frame data can be sent to a display for display. They can also be sent to a memory for storage. The preset number can be 1 or other values.
[0198] The present application also provides a data management method. Figure 8 An example diagram of the data management method is shown. The method is applied to a data management module 300. The data management module 300 includes a storage unit 310 and an execution unit 320. The storage unit 310 is used to store a structure array. The execution unit 320 establishes a communication connection with a decoding module and a frame output module. The decoding module includes a plurality of decoding channel groups, each decoding channel group includes a plurality of decoding channels. The method includes:
[0199] S801, after a data change event of frame data writing or frame data reading occurs in a buffer area corresponding to a decoding channel, acquiring data change information associated with the data change event;
[0200] S802, updating the frame data information included in the structure array according to the data change information; the frame data information is used to indicate the identification information of the target decoding channel group in which the frame data exists in the buffer area, and the identification information of the target decoding channel included in the target decoding channel group;
[0201] S803, obtaining a data query instruction sent by the frame output module; generating a query result according to the frame data information included in the structure array, and sending the query result to the frame output module.
[0202] It should be noted that: the data management module 300 and the data management method embodiment provided in the above embodiment belong to the same concept, and the specific implementation process is detailed in the system embodiment, which will not be repeated here.
[0203] The embodiment of the present application also provides a video security system, which includes: a front-end device 10, a transmission device 20 and a back-end device 30; the back-end device 30 includes a decoding module, a data management module 300, and a frame output module;
[0204] The front-end device 10 is configured to collect original video data and encode the original video data to obtain video encoding data;
[0205] The transmission device 20 is configured to transmit the video encoding data to the decoding module;
[0206] The decoding module is configured to use the target decoding channel to decode the video encoding data to obtain frame data; and write the frame data into a buffer area corresponding to the target decoding channel;
[0207] The data management module 300 is configured to update the frame data information included in the structure array according to the data change information; the frame data information is used to indicate the identification information of the target decoding channel group in which the frame data exists in the buffer area, and the identification information of the target decoding channel included in the target decoding channel group;
[0208] A frame output module, configured to send a data query instruction to the data management module 300;
[0209] The data management module 300 is further configured to obtain a data query instruction sent by the frame output module; generate a query result according to the frame data information included in the structure array, and send the query result to the frame output module;
[0210] The frame output module is also configured to obtain frame data from a buffer area corresponding to a target decoding channel according to a query result.
[0211] The present application also provides an electronic device, comprising: a processor, and a memory communicatively connected to the processor; wherein the memory stores instructions executable by the processor so that the processor performs the steps of the method as described in any one of the first aspects.
[0212] In some embodiments, the processor may include one or more processing cores, such as a 4-core processor, a 4-core processor, and the like. The processor may be implemented in at least one hardware form of DSP (Digital Signal Processing), FPGA (Field-Programmable Gate Array), and PLA (Programmable Logic Array). The processor may also include a main processor and a coprocessor. The main processor is a processor for processing data in an awake state, also known as a CPU (Central Processing Unit); the coprocessor is a low-power processor for processing data in a standby state. In some embodiments, the processor may be integrated with a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content to be displayed on the display screen. In some embodiments, the processor may also include an AI (Artificial Intelligence) processor, which is used to process computing operations related to machine learning.
[0213] The memory may include one or more computer-readable storage media, which may be non-transitory. The memory may also include high-speed random access memory, and non-volatile memory, such as one or more disk storage devices, flash memory storage devices. In some embodiments, the non-transitory computer-readable storage medium in the memory is used to store at least one program code, which is used to be executed by the processor to implement a process executed by the terminal in a data management method provided in a method embodiment of the present application.
[0214] The embodiment of the present application also provides a computer-readable storage medium, the computer-readable storage medium includes a stored computer program, wherein when the computer program is running, the device where the computer-readable storage medium is located is controlled to execute a data management method as described above. Optionally, the computer-readable storage medium can be a read-only memory (ROM), a random access memory (RAM), a compact disc (CD-ROM), a magnetic tape, a floppy disk, an optical data storage device, etc.
[0215] Similar parts between the embodiments provided in this application can be referenced to each other. The specific implementation methods provided above are only a few examples under the general concept of this application and do not constitute a limitation on the protection scope of this application. For those skilled in the art, any other implementation methods expanded based on the scheme of this application without creative work belong to the protection scope of this application.
Claims
1. A data management module, characterized in that: The data management module includes a storage unit and an execution unit, the storage unit is used to store a structure array, the data management module establishes a communication connection with a decoding module and a frame output module, the decoding module includes a plurality of decoding channel groups, and each of the decoding channel groups includes a plurality of decoding channels; The execution unit is configured to: After a data change event of frame data being written or frame data being read occurs in a buffer area corresponding to the decoding channel, data change information associated with the data change event is acquired; The frame data information included in the structure array is updated according to the data change information; the frame data information is used to indicate the identification information of the target decoding channel group in which the frame data exists in the buffer area, and the identification information of the target decoding channel included in the target decoding channel group; Acquire a data query instruction sent by the frame output module; generate a query result according to the frame data information included in the structure array, and send the query result to the frame output module.
2. The data management module according to claim 1, characterized in that: The data change information associated with the data change event includes first data change information associated with the data change event of writing the frame data, or second data change information associated with the data change event of reading the frame number; the frame data information includes a first subarray associated with the identification information of the target decoding channel group, and a second subarray associated with the identification information of the target decoding channel; The execution unit executes updating of the frame data information included in the structure array according to the data change information, and is specifically configured as follows: According to the first data change information, a first update operation is performed on the frame data information included in the structure array; the first update operation at least includes adding a first sub-array, adding a second sub-array, incrementing the value of a first data member representing the number of target decoding channel groups, incrementing the value of a second data member representing the number of target decoding channels, and incrementing the value of a third data member representing the number of frame data; According to the second data change information, a second update operation is performed on the frame data information included in the structure array; the second update operation includes at least one of deleting the first sub-array, deleting the second sub-array, decrementing the value of the first data member, decrementing the value of the second data member, and decrementing the value of the third data member.
3. The data management module according to claim 2, characterized in that: The execution unit performs a first update operation on the structure array according to the first data change information, and is specifically configured as follows: Detecting whether there is a first subarray associated with the identification information of the target decoding channel group in the structure array; If the structure array contains a first subarray associated with the identification information of the target decoding channel group, detecting whether the structure array contains a second subarray associated with the identification information of the target decoding channel; If the structure array has a second subarray associated with the identification information of the target decoding channel, the value of the third data member included in the second subarray associated with the identification information of the target decoding channel is incremented.
4. The data management module according to claim 3, characterized in that: After the execution unit detects whether the structure array has a second sub-array associated with the identification information of the target decoding channel, the execution unit is further configured to: If the structure array does not contain the second sub-array associated with the identification information of the target decoding channel, add the second sub-array associated with the identification information of the target decoding channel to the first sub-array associated with the identification information of the target decoding channel group; Setting the value of the third data member included in the second subarray associated with the identification information of the target decoding channel to an initial value; The value of the second data member included in the identification information of the target decoding channel group is incremented.
5. The data management module according to claim 4, characterized in that: After the execution unit detects whether there is a first subarray associated with the identification information of the target decoding channel group in the structure array, the execution unit is further configured to: If the first subarray associated with the identification information of the target decoding channel group does not exist in the structure array, adding the first subarray associated with the identification information of the target decoding channel group to the structure array; Adding a second subarray associated with the identification information of the target decoding channel to the first subarray associated with the identification information of the target decoding channel group; Setting the value of the third data member included in the second subarray associated with the identification information of the target decoding channel to an initial value; Setting the value of the second data member included in the first subarray associated with the identification information of the target decoding channel group to an initial value; The value of the first data member is incremented.
6. The data management module according to any one of claims 2 to 4, characterized in that: The execution unit performs a second update operation on the structure array according to the second data change information, and is specifically configured as follows: In the structure array, the value of the third data member included in the second subarray associated with the identification information of the target decoding channel is decremented; If the value of the third data member included in the second sub-array associated with the identification information of the target decoding channel is the first value, decrementing the value of the second data member included in the first sub-array associated with the identification information of the target decoding channel group; The second subarray associated with the identification information of the target decoding channel is deleted.
7. The data management module according to claim 6, characterized in that: After the execution unit performs decrement processing on the value of the second data member included in the first subarray associated with the identification information of the target decoding channel group, the execution unit is further configured to: If the value of the second data member associated with the identification information of the target decoding channel group is the first value, decrementing the value of the first data member; The first subarray associated with the identification information of the target decoding channel group is deleted.
8. The data management module according to claim 2, characterized in that: The query result includes a first query result and a second query result, wherein the first query result includes identification information of the target decoding channel group and identification information of the target decoding channel; the second query result includes blank information, wherein the blank information is used to indicate that the frame data does not exist in the buffer area corresponding to all the current decoding channels; The execution unit generates the query result according to the frame data information, and is specifically configured to: Detecting whether the value of the first data member is greater than the first value; If the value of the first data member is greater than the first value, generating a first query result; If the value of the first data member is less than or equal to the first value, a second query result is generated.
9. A data management method, characterized in that: The method is applied to a data management module, the data management module includes a storage unit and an execution unit, the storage unit is used to store a structure array, the execution unit establishes a communication connection with a decoding module and a frame output module, the decoding module includes a plurality of decoding channel groups, each of the decoding channel groups includes a plurality of decoding channels; The method comprises: After a data change event of frame data being written or frame data being read occurs in a buffer area corresponding to the decoding channel, data change information associated with the data change event is acquired; The frame data information included in the structure array is updated according to the data change information; the frame data information is used to indicate the identification information of the target decoding channel group in which the frame data exists in the buffer area, and the identification information of the target decoding channel included in the target decoding channel group; Acquire a data query instruction sent by the frame output module; generate a query result according to the frame data information included in the structure array, and send the query result to the frame output module.
10. A video security system, comprising: Front-end equipment, transmission equipment and back-end equipment; the back-end equipment includes a decoding module, a data management module and a frame output module; The front-end device is configured to collect original video data and encode the original video data to obtain video encoding data; The transmission device is configured to transmit the video encoding data to the decoding module; The decoding module is configured to use a target decoding channel to decode the video encoding data to obtain frame data; and write the frame data into a buffer area corresponding to the target decoding channel; The data management module is configured to update the frame data information included in the structure array according to the data change information; the frame data information is used to indicate the identification information of the target decoding channel group in which the frame data exists in the buffer area, and the identification information of the target decoding channel included in the target decoding channel group; The frame output module is configured to send a data query instruction to the data management module; The data management module is further configured to obtain a data query instruction sent by the frame output module; generate a query result according to the frame data information included in the structure array, and send the query result to the frame output module; The frame output module is further configured to obtain the frame data from a buffer area corresponding to the target decoding channel according to the query result.
Citation Information
Patent Citations
Cache data management method and device
CN107291779A
Cache data management method and device, storage medium and electronic equipment
CN110737680A
Cache data processing method and device, computer equipment and storage medium
CN115757495A
Metadata access method and device, equipment and storage medium
CN116821058A
Data transmission method and device
CN118829978A