Edge computing device and video data interaction method and apparatus, and storage medium
By traversing the buffer in the edge computing device through the central processing unit, and optimizing the distribution of video data based on the number of transmissions and processing status, the efficiency problem of distribution of edge computing devices under concurrent requests is solved, and efficient video data transmission is achieved.
Patent Information
- Application Number
- CN202411280061.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-12
- Publication Date
- 2025-11-28
- Estimated Expiration
- 2044-09-12
AI Technical Summary
Edge computing devices are unable to efficiently distribute video data when they receive multiple concurrent video data requests.
The central processing unit (CPU) traverses the preset buffer and determines whether to send a data distribution instruction to the network processor based on the number of video data transmissions and the processing status, thereby reducing unnecessary data transmission and achieving efficient distribution of video data.
It effectively reduces the data transmission bandwidth between the central processing unit and the network processor, improves the efficiency of video data distribution, and supports efficient processing of concurrent real-time data requests.
Smart Images

Figure CN119255007B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of edge computing, and particularly relates to an edge computing device and a video data interaction method and device and a storage medium. BACKGROUND
[0002] The edge computing device refers to a computing device deployed at the edge of a network, used for processing data and computing tasks close to a data source or a user end.
[0003] The edge computing device generally includes a central processing unit, a graphics processing unit and other computing chips, used for processing different types of data and task edge computing devices. At present, the edge computing device is often used to realize the processing of video data, involving the acquisition, storage and distribution of video data, to provide intelligent home services, intelligent traffic services and other services.
[0004] In the above process, when multiple concurrent video data requests are received, there is a defect that the video data cannot be efficiently distributed. SUMMARY
[0005] The present application provides an edge computing device and a video data interaction method and device and a storage medium, to efficiently distribute video data when multiple concurrent video data requests are received.
[0006] In a first aspect, the present application provides a video data interaction method applied to a central processing unit of an edge computing device, the method comprising:
[0007] When receiving multiple real-time data requests of a service, acquiring first request information of the real-time data request; the first request information is used to indicate the requested target video data, and the service is used to implement a preset function based on the target video data;
[0008] For any real-time data request of a service, traversing a preset buffer according to the first request information; the preset buffer is used to cache multiple valid video data and first identifiers corresponding to the valid video data, and the first identifier is used to identify the number of times of transmission of the valid video data;
[0009] When the target video data exists in the preset buffer, determining whether to issue a data distribution instruction carrying the target video data to a network processor according to the first identifier of the target video data; the network processor is used to cache the target video data and forward the target video data to the service.
[0010] In a possible design, the determination of whether to issue the data distribution instruction carrying the target video data to the network processor according to the first identifier of the target video data comprises:
[0011] when the number of transmission times indicated by the first identifier is not zero, issuing a data distribution instruction without the target video data to the network processor;
[0012] when the number of transmission times indicated by the first identifier is zero, issuing a data distribution instruction with the target video data to the network processor.
[0013] In a possible design, the first request information is further used to indicate a target processing manner for the target video data; and the method further includes:
[0014] when the number of transmission times indicated by the first identifier is not zero, obtaining a second identifier of the target video data; the second identifier is used to indicate whether the target video data has been processed according to the target processing manner;
[0015] if the second identifier indicates that the target video data has been processed according to the target processing manner, issuing a data distribution instruction without target requirement data to the network processor, so that the network processor distributes cached target requirement data to the service, the target requirement data being obtained after processing the target video data according to the target processing manner;
[0016] if the second identifier indicates that the target video data has not been processed according to the target processing manner, processing the target video data according to the target processing manner to obtain the target requirement data, and issuing a data distribution instruction with the target requirement data to the network processor.
[0017] In a possible design, the first request information is further used to indicate a target processing manner for the target video data; and the method further includes:
[0018] when the number of transmission times indicated by the first identifier is zero, processing the target video data according to the target processing manner to obtain target requirement data of the service;
[0019] issuing a data distribution instruction with the target requirement data to the network processor.
[0020] In a possible design, the target processing manner includes frame extraction processing.
[0021] In a possible design, the method further includes:
[0022] when video data of different sources is received, performing transcoding processing on the video data to obtain video data of a uniform format, and storing the video data in a data buffer;
[0023] For video data in the data buffer, the video data is sent to the graphics processor, and valid video data returned by the graphics processor is received; the valid video data is obtained by the graphics processor by deleting frames from the video data according to preset rules.
[0024] The valid video data and the start time of the valid video data are stored in the preset buffer.
[0025] In one possible design, the method further includes:
[0026] The valid video data in the preset buffer is re-encoded to obtain cached data, and the cached data and the start time are stored in the video library.
[0027] In one possible design, the method further includes:
[0028] Upon receiving a cache data request from any service, obtain second request information for the cache data request; the second request information is used to indicate the requested cache data and the time interval of the requested cache data, the time interval including the start time of the request.
[0029] The video library is traversed according to the second request information to determine the target cache data; the target cache data includes cache data whose start time is the same as or closest to the required start time;
[0030] The target cached data is distributed to the service via the network processor.
[0031] Secondly, this application provides a video data interaction device.
[0032] The apparatus for performing a method implemented by a central processing unit of an edge computing device includes:
[0033] The acquisition module is used to acquire first request information of the real-time data request when receiving real-time data requests from multiple services; the first request information is used to indicate the target video data requested, and the service is used to implement a preset function based on the target video data;
[0034] The traversal module is used to traverse a preset buffer for any service based on the first request information; the preset buffer is used to cache multiple valid video data and a first identifier corresponding to the valid video data, the first identifier being used to identify the number of times the valid video data has been transmitted.
[0035] The determining module is configured to determine whether to send a data distribution instruction carrying the target video data to a network processor according to the first identifier of the target video data when the target video data exists in the preset buffer; the network processor is configured to cache the target video data and forward the target video data to the service.
[0036] In a third aspect, an embodiment of the present application provides a central processing unit, which is configured to implement the method in any of the first aspect.
[0037] In a fourth aspect, an embodiment of the present application provides an edge computing device, which includes a central processing unit, a network processing unit, a graphics processing unit, and a memory connected with the central processing unit; the memory stores computer execution instructions; the central processing unit executes the computer execution instructions stored in the memory, so that the central processing unit executes the method in the first aspect and various possible designs of the first aspect.
[0038] In a fifth aspect, an embodiment of the present application provides a computer readable storage medium, which stores computer execution instructions; when a central processing unit executes the computer execution instructions, a video data interaction method in the first aspect and various possible designs of the first aspect is implemented.
[0039] In a sixth aspect, an embodiment of the present application provides a computer program product, which includes a computer program; when a central processing unit executes the computer program, a video data interaction method in the first aspect and various possible designs of the first aspect is implemented.
[0040] The edge computing device and the video data interaction method, device and storage medium provided by the application, wherein the video data interaction method of the application is applied to a central processor of an edge computing device. Specifically, in the application, when the central processor receives real-time data requests of multiple services, the central processor obtains first request information of each real-time data request. Further, for each service, the central processor traverses a preset buffer for storing valid video data and corresponding first identifiers according to the first request information to determine whether target video data required by the service exists in the preset buffer. Finally, when the target video data exists in the preset buffer, according to the first identifier corresponding to the target video data stored in the preset buffer, it is determined whether to issue a data distribution instruction carrying the target video data to a network processor, so that the network processor distributes the cached target video data to the corresponding service, or forwards it to the corresponding service through the network processor. Through the method of the application, when at least two services request the same target video data, for the real-time data request processed later, the central processor does not need to take out the target video data from the preset buffer and send it to the network processor, but only needs to issue a data distribution instruction not carrying the target video data to the network processor, so that the network processor distributes the cached target video data to the corresponding service, thereby effectively reducing the occupation of bandwidth and facilitating efficient distribution of video data. BRIEF DESCRIPTION OF DRAWINGS
[0041] The accompanying drawings, which are incorporated into and form part of the specification, illustrate embodiments consistent with the present application and, together with the specification, serve to explain the principles of the application.
[0042] Figure 1 An application scenario diagram for the video data interaction method of the embodiments of the application;
[0043] Figure 2 A flow of the video data interaction method provided by the embodiments of the application Figure 1 ;
[0044] Figure 3 A flow of the video data interaction method provided by the embodiments of the application Figure 2 ;
[0045] Figure 4 A flow of the video data interaction method provided by the embodiments of the application Figure 3 ;
[0046] Figure 5 A process diagram of the video data interaction method provided by the embodiments of the application;
[0047] Figure 6 A structure diagram of the video data interaction device provided by the embodiments of the application;
[0048] Figure 7 A structural schematic diagram of an edge computing device provided in an embodiment of the present application is shown.
[0049] The specific embodiments of the present application have been shown in the above-described drawings, and will be described in more detail hereinafter. These drawings and the written description are not intended to restrict the scope of the present application concept in any way, but to illustrate the present application concept to those skilled in the art by referring to specific embodiments. DETAILED DESCRIPTION
[0050] The exemplary embodiments will be described in detail herein below with reference to the drawings. In the following description, the same numbers refer to the same or similar elements unless otherwise represented. The embodiments described in the following exemplary embodiments do not represent all the embodiments consistent with the present application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of the present application as detailed in the appended claims.
[0051] In the technical solution of the present application, the collection, storage, use, processing, transmission, provision and disclosure of information such as financial data or user data comply with relevant laws and regulations and do not violate public order and good customs.
[0052] It should be noted that in the embodiments of the present application, some existing industry solutions such as software, components, models, etc. may be mentioned, which should be considered as exemplary, and the purpose is only to illustrate the feasibility of the implementation of the technical solution of the present application, but it does not mean that the applicant has or will necessarily use the solution.
[0053] The Internet of Things refers to connecting various physical devices through the Internet, so that they can communicate and cooperate with each other. These devices can include sensors, smart home devices, industrial machines, vehicles, etc. The goal of the Internet of Things is to achieve intelligent management and control of devices through data collection and analysis, thereby improving efficiency, reducing cost and improving user experience.
[0054] With the development of Internet of Things technology, edge computing is increasingly widely used in smart devices. The core of edge computing is to move data processing tasks from a central server to edge computing devices close to data sources, to reduce data transmission delay and improve data processing efficiency and security. An edge computing device generally includes a central processor, a network processor, and multiple computing chips such as a chip for providing at least one specific service. Specifically, the service sends a data request to the central processor to obtain video data accessed by the edge computing device. The central processor responds to the data request and forwards the video data accessed by the edge computing device to the corresponding service through the network processor upon receiving the data request. It can be understood that the service can be a smart home service, a smart traffic service, a bank intelligent monitoring service, etc.
[0055] For example, the edge computing device sends the video data uploaded by the accessed bank internal monitoring device into the passenger flow prediction service in response to a data request of the passenger flow prediction service, for processing by the passenger flow prediction service for predicting the passenger flow in a time period. The processing can include operations such as deleting duplicate frames and extracting key frames. It can be understood that the passenger flow prediction service specifically includes a passenger flow prediction model that, after training, can predict the passenger flow in a time period based on the obtained video data. In actual application, multiple concurrent data requests of services are received, and at this time, the above edge computing device is used to implement the distribution and processing of video data. For any data request, the central processor of the edge computing device forwards the corresponding video data to the corresponding service through the network processor, and there is a defect that the video data cannot be efficiently distributed.
[0056] Therefore, the present application provides an edge computing device and a video data interaction method, device and storage medium to solve the above problems. Specifically, the video data interaction method in the present application is applied to the central processor of the edge computing device. For multiple concurrent real-time data requests, the central processor determines whether to send a data distribution instruction carrying target video data to the network processor when processing the real-time data request of each service based on whether the target video data has been requested. This reduces the data transmission bandwidth between the central processor and the network processor, thereby facilitating the efficient distribution of video data and achieving efficient processing of concurrent real-time data requests.
[0057] It can be understood that the method of the present application is applicable to any Internet of Things scene that uses video data to realize intelligent decision-making and other functions. Figure 1 For the application scene of the video data interaction method of the embodiments of the present application, as shown in Figure 1 The edge computing device accesses the monitoring devices of each bank branch to obtain the video data of the monitoring devices of each bank branch. The edge computing device provides services such as an abnormal behavior monitoring service, a passenger flow prediction service, and an employee behavior monitoring service. In addition, the edge computing device further includes a central processor, a network processor, and a preset buffer, wherein the preset buffer is used to cache real-time video data accessed by the edge computing device.
[0058] Specifically, the foregoing service sends a real-time data request to the central processor, for obtaining corresponding target video data, for abnormal behavior monitoring, passenger flow prediction, employee behavior monitoring, etc. Based on the method provided in the embodiments of the present application, for a real-time data request of any one service in the concurrent requests, the central processor traverses the preset buffer according to the first request information corresponding to the target video data to determine whether the preset buffer contains the target video data required by the real-time data request. Further, when the target video data exists, the corresponding transmission times are determined according to the corresponding first identifier. According to the transmission times, it is determined whether to send a data distribution instruction carrying the target video data to the network processor, so as to forward the target video data through the network processor, or make the network processor send the cached target video data to the corresponding service.
[0059] Through the method provided in the embodiments of the present application, for the target video data with the transmission times being non-zero, the central processor can send a data distribution instruction not carrying the target video data to the network processor, so as to reduce the data transmission bandwidth between the central processor and the network processor, thereby facilitating the efficient distribution of video data and realizing efficient processing of concurrent real-time data requests.
[0060] The technical solutions of the present application and how the technical solutions of the present application solve the above technical problems will be described in detail below with specific embodiments. The following specific embodiments can be combined with each other, and the same or similar concepts or processes can not be described again in some embodiments. The embodiments of the present application will be described below with reference to the accompanying drawings.
[0061] The embodiments of the present application provide a video data interaction method applied to an edge computing device and executed by a central processor of the edge computing device. Figure 2 The flow of the video data interaction method provided in the embodiments of the present application Figure 1 As shown in FIG. 1, the video data interaction method includes the following steps. Figure 2
[0062] S201, when receiving real-time data requests of a plurality of services, obtaining first request information of the real-time data requests.
[0063] The first request information is used to indicate the requested target video data, and the service is used to realize a preset function based on the target video data.
[0064] It can be understood that in the embodiments, the edge computing device provides a plurality of services for realizing corresponding preset functions based on video data. For example, for a bank, the preset functions can be passenger flow prediction, abnormal behavior analysis, etc. Specifically, the preset functions can be realized by corresponding algorithms or models after processing the video data.
[0065] In the embodiment, when the service needs to analyze the real-time video data to realize the corresponding function, the central processor sends a real-time data request to obtain the target video data required by the service.
[0066] In the embodiment, when the central processor receives the real-time data request, the central processor obtains the first request information corresponding to the real-time data request to determine the target video data required by the corresponding service.
[0067] It can be understood that for the edge computing device providing multiple services, the central processor can receive multiple real-time data requests at the same time.
[0068] S202, for any real-time data request of a service, the preset buffer is traversed according to the first request information.
[0069] The preset buffer is used to cache a plurality of effective video data and the first identifier corresponding to the effective video data, and the first identifier is used to identify the number of times of transmission of the effective video data.
[0070] S203, when the target video data exists in the preset buffer, whether to issue a data distribution instruction carrying the target video data to the network processor is determined according to the first identifier of the target video data.
[0071] The network processor is used to cache the target video data and forward the target video data to the service.
[0072] In the embodiment, for any real-time data request of a service, the central processor traverses the preset buffer according to the first request information corresponding to the real-time data request to determine whether the target video data required by the current service exists in the preset buffer.
[0073] Specifically, in the embodiment, the central processor caches the accessed real-time video data in the preset buffer. More specifically, in the embodiment, the specific cached in the preset buffer is the effective video data obtained by processing the real-time video data, and the first identifier corresponding to the effective video data.
[0074] In the embodiment, the effective video data is obtained by deleting part of the video frames of the real-time video data. Specifically, the part of the video frames can be repeated frames in the real-time video data, or still frames or blurred frames in the real-time video data, which is not limited in the embodiment.
[0075] Optionally, in actual application, the real-time video data received by the central processor can also be directly cached as effective video data in the preset buffer without deleting part of the video frames, which is not limited in the embodiment. At this time, the preset buffer is specifically used to cache a plurality of real-time video data and the first identifier corresponding thereto.
[0076] It can be understood that when the central processor processes the concurrent real-time data requests, there can be real-time data requests for requesting the same target video data, and therefore, in the embodiment, for each valid video data in the preset buffer, a flag bit is allocated for storing the first identification corresponding to the valid video data, for identifying the number of times of transmission of the valid video data. It should be understood that the number of times of transmission specifically represents the number of times that the valid video data has been transmitted to the network processor by the central processor in response to any real-time data request of a service.
[0077] On this basis, when the central processor finds the target video data required by the corresponding service in the preset buffer, the central processor further determines whether the target video data has been requested by other services and the real-time data request of the service has been processed according to the first identification of the target video data, to determine whether to issue the data distribution instruction carrying the target video data to the network processor.
[0078] It can be understood that when the target video data has not been requested, the central processor issues the data distribution instruction carrying the target video data to the network processor, so as to forward the target video data to the corresponding service through the network processor. When the network processor receives the data distribution instruction, the network processor distributes the received target video data to the corresponding service and caches the target video data.
[0079] When the number of times of transmission of the target video data is not zero, i.e., the target video data has been requested and the real-time data request of the corresponding service has been processed, the central processor issues the data distribution instruction not carrying the target video data to the network processor, and the data distribution instruction is used to make the network processor distribute the cached target video data to the corresponding service.
[0080] In the method of the embodiment, for the concurrent real-time data requests of multiple services, the central processor acquires the first request information corresponding to the real-time data requests, to determine the target video data required by each service. Further, for the real-time data request of any service, the preset buffer is traversed based on the first request information corresponding to the real-time data request, to determine whether the corresponding target video data exists in the preset buffer. When the corresponding target video data exists in the preset buffer, it is determined whether to send the data distribution instruction carrying the target video data to the network processor based on whether the target video data has been requested.
[0081] Through the method of the embodiment, when the target video data requested by any task request has been requested, the central processor does not need to repeatedly transmit the target cache data to the network processor, but directly makes the network processor distribute the target video data cached by the network processor to the corresponding service, thereby reducing the number of data transmissions between the central processor and the network processor, on the one hand, effectively saving the data storage space, on the other hand, effectively reducing the data transmission bandwidth, and further facilitating the efficient distribution of video data.
[0082] In a possible design, Figure 3 The flow of the video data interaction method provided in the embodiment of the application Figure 2 The embodiment further details the manner of determining whether to issue the data distribution instruction carrying the target video data to the network processor on the basis of the foregoing embodiment. As shown in Figure 3 The method of the embodiment includes the following steps:
[0083] S301, when receiving real-time data requests of a plurality of services, obtaining first request information of the real-time data requests.
[0084] The first request information is used to indicate the requested target video data and a target processing manner of the target video data, and the service is used to implement a preset function based on the target video data.
[0085] Specifically, for the service, the real-time data request, and the first request information, refer to the limitation on S201 in the foregoing embodiment, which is not described herein again.
[0086] It can be understood that when the services for implementing different preset functions perform corresponding analysis based on the obtained real-time video data, sometimes the real-time video data needs to be processed, and the analysis is performed based on the processed video data. For example, for the service for providing abnormal behavior monitoring, after obtaining the required real-time video data, in order to improve the processing speed of the algorithm or model, the key frames containing the monitored object in the real-time video data need to be extracted first, and the key frames are sent into the algorithm or model to obtain the monitoring analysis result.
[0087] Therefore, in the embodiment, the first request information further includes the target processing manner, and the target processing manner can include frame extraction processing. In actual application, the target processing manner can further include a deblurring processing manner on the real-time video data, which is not limited in the embodiment.
[0088] S302, for any service, traversing a preset buffer according to the first request information.
[0089] The preset buffer is used for buffering a plurality of valid video data and a first identifier corresponding to the valid video data, and the first identifier is used for identifying a transmission times of the valid video data.
[0090] In the embodiment, the valid video data buffered in the preset buffer is obtained by deleting repeated frames from the real-time video data.
[0091] S303, if the target video data exists in the preset buffer, it is determined whether the transmission times indicated by the first identifier is not zero. If yes, S304 is executed, otherwise, S307 is executed.
[0092] S304, a second identifier of the target video data is obtained.
[0093] The second identifier is used for indicating whether the target video data has been processed according to the target processing mode.
[0094] S305, if the second identifier indicates that the target video data has been processed according to the target processing mode, a data distribution instruction without carrying target demand data is issued to the network processor, so that the network processor distributes the buffered target demand data to the service.
[0095] The target demand data is obtained by processing the target video data according to the target processing mode.
[0096] S306, if the second identifier indicates that the target video data has not been processed according to the target processing mode, the target video data is processed according to the target processing mode to obtain the target demand data, and a data distribution instruction carrying the target demand data is issued to the network processor.
[0097] S307, the target video data is processed according to the target processing mode to obtain the target demand data of the service.
[0098] S308, a data distribution instruction carrying the target demand data is issued to the network processor.
[0099] It can be understood that the services corresponding to a plurality of concurrent real-time data requests sometimes need data obtained by processing the same target video data according to the same target processing mode, therefore, in the embodiment, the central processor sets a second flag bit for each valid video data in the preset buffer, which is used for storing the second identifier to identify whether the corresponding valid video data has been processed according to the target processing mode.
[0100] On this basis, for a real-time data request of any service, the central processor first determines the number of times of transmission of the corresponding target video data according to the first identifier corresponding to the real-time data request, to determine whether the target video data has been requested and transmitted by the central processor, and further, when the first identifier indicates that the number of times of transmission of the target video data is not zero, the second identifier of the target video data is obtained.
[0101] Specifically, when the second identifier is used to indicate that the target video data has been processed according to the target processing mode, the central processor issues a data distribution instruction without carrying target demand data to the network processor, so that the network processor distributes the cached target demand data to the corresponding service.
[0102] It can be understood that the target demand data cached in the network processor is obtained after the central processor processes the target video data according to the target processing mode, and is sent to the network processor when a request consistent with the target processing mode is first received.
[0103] Correspondingly, when the second identifier is used to indicate that the target video data has not been processed according to the target processing mode, the central processor processes the target video data according to the target processing mode to obtain target demand data, and issues a data distribution instruction carrying the target demand data to the network processor, so that the network processor forwards the target demand data to the corresponding service.
[0104] It can be understood that for the valid video data in the preset buffer, the corresponding first identifier used to indicate the number of times of transmission by the central processor after processing the valid video data in any target processing mode is not zero.
[0105] Optionally, in actual application, the first identifier can also be used to indicate the number of times of transmission of the valid video data and the corresponding target processing mode at the same time. Based on this, for a real-time data request of any service, the central processor determines whether it needs to issue a data distribution instruction carrying target demand data processed by the target processing mode to the network processor according to the first identifier of the target video data, which is not limited in the embodiment.
[0106] Specifically, if the first identifier indicates that the central processor has transmitted the target video data processed by the target processing mode, the central processor issues a data distribution instruction without carrying the target demand data to the network processor. Otherwise, a data distribution instruction carrying the target demand video data obtained after processing is issued to the network processor.
[0107] For example, if the edge computing device provides both the abnormal behavior monitoring service and the employee behavior monitoring service for monitoring the behavior of the employee, both the abnormal behavior monitoring service and the employee behavior monitoring service need to be based on the video data after extracting the key frame containing the corresponding employee, i.e., the target processing manner of the real-time video data of the abnormal behavior monitoring service and the employee behavior monitoring service is consistent.
[0108] Therefore, when the central processor receives the real-time data request of the above two services at the same time, when processing the real-time data request of the corresponding abnormal behavior monitoring service, the central processor first determines the target video data of the service based on the corresponding first request information. Further, when the target video data exists in the preset buffer, it is determined whether the first identifier indicates that the transmission times of the target video data is not zero. It can be understood that if the transmission times of the target video data is not zero, it means that the target video data has been requested by the employee behavior monitoring service or other services and the corresponding real-time data request has been processed.
[0109] If the first identifier indicates that the transmission times of the target video data is not zero, the corresponding second identifier is further obtained. If the second identifier indicates that the target video data has been processed according to the target processing manner, the network processor is instructed to distribute the processed target demand data without the target demand data, so that the network processor distributes the target demand data to the abnormal behavior monitoring service. It can be understood that at this time, it means that the central processor has processed the real-time data request of the employee behavior monitoring service or other services with the same target processing manner as the target video data.
[0110] If the second identifier indicates that the target video data has not been processed according to the target processing manner, the network processor is instructed to distribute the processed target demand data, so that the network processor distributes the target demand data to the abnormal behavior monitoring service. It can be understood that when processing the real-time data request of the employee behavior monitoring service, the central processor instructs the network processor to distribute the target demand data without the target demand data, so that the network processor distributes the cached target demand data to the employee behavior monitoring service.
[0111] If the first identifier indicates that the transmission times of the target video data is zero, it means that the central processor has not processed other services with the same target video data. At this time, the central processor processes the target video data according to the target processing manner to obtain the target demand data, and instructs the network processor to distribute the target demand data, so that the network processor distributes the target demand data to the abnormal behavior monitoring service. It can be understood that when processing the real-time data request of the employee behavior monitoring service, the central processor instructs the network processor to distribute the target demand data without the target demand data, so that the network processor distributes the cached target demand data to the employee behavior monitoring service.
[0112] In the method of the embodiment, for each real-time data request, the central processor determines whether the data distribution instruction carrying the target required data needs to be issued to the network processor according to the first identifier and the second identifier when the target video data required by the central processor exists in the preset buffer, so that the network processor distributes the target required data to the corresponding service.
[0113] By the method provided in the embodiment, the central processor does not need to repeatedly transmit the corresponding target required data to the network processor for the service with the same target required data, thereby facilitating efficient distribution of video data. In addition, the central processor sends the data distribution instruction carrying the target required data to the network processor, avoiding processing of the target video data by the corresponding service, thereby facilitating improvement of the performance of the corresponding service.
[0114] Figure 4 Flow of the video data interaction method provided in the embodiment Figure 3 The embodiment further details the processing manner of the accessed video data and the processing manner of the cache data request on the basis of the foregoing embodiment. Specifically, as shown in Figure 4 The method comprises the following steps:
[0115] S401, when receiving video data of different sources, performing transcoding processing on the video data to obtain video data of a unified format, and storing the video data in a data buffer.
[0116] In the embodiment, different sources specifically refer to different cameras. The central processor can receive video data of different cameras and can perform transcoding processing on the received video data to obtain video data of a unified format. Specifically, the final format of the video data is not limited in the embodiment, as long as the video data is unified into one format.
[0117] In the embodiment, the central processor comprises a video data access module, which completes adaptation and integration of different camera SDKs to form a device access component, thereby being capable of receiving video data of different sources. The video data access module unifies the received video data into a preset format to store the video data in the data buffer through a unified data interface.
[0118] S402, for the video data of the data buffer, sending the video data to a graphics processor and receiving valid video data returned by the graphics processor.
[0119] The valid video data is obtained by performing frame deletion processing on the video data by the graphics processor according to a preset rule.
[0120] S403, storing the valid video data and the start time of the valid video data in a preset buffer.
[0121] S404, the effective video data in the preset buffer is twice coded to obtain cache data, and the cache data and the start time are stored in the video library.
[0122] Specifically, in the embodiment, the central processor further includes a video storage module, the video storage module is used to take out the video data from the data buffer and send the video data to the graphic processor. The video storage module is also used to receive the effective video data returned by the graphic processor and store the effective video data and the start time of the effective video data in the preset buffer.
[0123] Specifically, when the graphic processor receives the video data, it deletes the repeated frames in the video according to the specified reference image to obtain the effective video data corresponding to the video data. It can be understood that when the first frame and the second frame of the video data only differ in time, the image of the first frame is taken as the specified reference image, and the data consistent with the specified reference image outside the first frame is deleted to obtain the effective video data. It can be understood that for any video data, there may be the n-th frame and the n+1-th frame only different in time, at this time the image of the n-th frame is taken as the specified reference image, and the data consistent with the specified reference image outside the n-th frame is deleted to obtain the effective video data.
[0124] Further, for any video data, the video storage module deletes the repeated frames to obtain the effective video data, and takes the start time of the first frame in the effective video data as the start time of the effective video data. The video storage module stores the effective video data and the start time of the effective video data in the preset buffer.
[0125] For the effective video data in the preset buffer, the central processor obtains the corresponding target video data from the preset buffer when receiving a real-time data request. In the embodiment, the video storage module obtains cache data by twice coding the effective video data in the preset buffer, and stores the cache data and the start time of the cache data in the video library.
[0126] S405, when receiving a cache data request of any service, the second request information of the cache data request is obtained.
[0127] The second request information is used to indicate the required cache data and the time interval of the required cache data, and the time interval includes the required start time.
[0128] S406, according to the second request information, the video library is traversed to determine the target cache data.
[0129] The target cache data includes cache data with the same or closest start time as the required start time.
[0130] S407, distributing the target cache data to the service by the network processor.
[0131] In the embodiment, the central processor further comprises a video data processing and distributing module, which is configured to process the real-time number request in the foregoing embodiment, and is further configured to process the cache data request. Specifically, when receiving the cache data request of any service, the video processing and distributing module acquires the second request information of the cache data request to determine the required cache data and the corresponding time interval of the service. The limitation of the corresponding service can refer to the limitation in the foregoing embodiment, which will not be described here.
[0132] In the embodiment, the video processing and distributing module traverses the video library according to the second request information to determine the target cache data. Specifically, the video processing and distributing module determines the target cache data according to the cache data in the video library which has the same or the closest start time as the required cache data.
[0133] Further, the video processing and distributing module distributes the obtained target cache data to the corresponding service. Specifically, the video processing and distributing module issues a data distribution instruction carrying the target cache data to the network processor, so that the network processor distributes the target cache data to the corresponding service.
[0134] It can be understood that there can be at least two services with the same target cache data, which initiate the cache data request at the same time or within a preset time interval, and at this time, the network processor still caches the corresponding target cache data. The video processing and distributing module makes the network processor distribute the cached target cache data to the corresponding service without transmitting the target cache data to the network processor again, so that the central processor can effectively reduce the data transmission bandwidth when receiving the concurrent cache data request.
[0135] Optionally, the second request information can also include a target processing mode. The video processing and distributing module processes the target cache data according to the target processing mode to obtain target data, and issues a data distribution instruction carrying the target data to the network processor to avoid the corresponding service from performing data processing by itself.
[0136] Figure 5 The process schematic diagram of the video data interaction method provided by the embodiment of the application is shown in FIG. 1. Figure 5 As shown in FIG. 1, the central processor accesses video data of different sources, transcodes the video data of different sources into video data with unified format, and stores the video data in a data buffer.
[0137] Further, the central processor transmits the video data of the data buffer to the graphic processor, and the graphic processor feeds back valid video data to the central processor after frame deletion operation.
[0138] As shown in Figure 5 , the central processor acquires the valid video data of the preset buffer for corresponding processing in response to the real-time data request of any service x or service y. The central processor acquires the cached data in the video library for corresponding processing in response to the cached data request of any service z.
[0139] Figure 6 A structural schematic diagram of a video data interaction device provided by an embodiment of the present application is shown in Figure 6 . The video data interaction device comprises an acquisition module 61, a traversal module 62 and a determination module 63.
[0140] The acquisition module 61 is configured to acquire first request information of a real-time data request when receiving the real-time data request of a plurality of services. The first request information is used to indicate target video data requested, and the services are used to realize preset functions based on the target video data.
[0141] The traversal module 62 is configured to traverse a preset buffer according to the first request information for any service. The preset buffer is used to cache a plurality of valid video data and first identifiers corresponding to the valid video data. The first identifiers are used to indicate the number of times of transmission of the valid video data.
[0142] The determination module 63 is configured to determine whether to issue a data distribution instruction carrying target video data to a network processor according to the first identifier of the target video data when the target video data exists in the preset buffer. The network processor is used to cache the target video data and forward the target video data to the services.
[0143] In some embodiments, the determination module 63 is specifically configured to:
[0144] issue a data distribution instruction not carrying the target video data to the network processor when the number of times of transmission indicated by the first identifier is not zero;
[0145] issue a data distribution instruction carrying the target video data to the network processor when the number of times of transmission indicated by the first identifier is zero.
[0146] In some embodiments, the determination module 63 is further configured to:
[0147] The first request information is further used for indicating a target processing manner for the target video data; when the number of transmission indicated by the first identifier is not zero, a second identifier of the target video data is acquired; the second identifier is used for indicating whether the target video data has been processed according to the target processing manner;
[0148] If the second identifier indicates that the target video data has been processed according to the target processing manner, a data distribution instruction without carrying target demand data is issued to the network processor, so that the network processor distributes the cached target demand data to the service, the target demand data being obtained after the target video data is processed according to the target processing manner;
[0149] If the second identifier indicates that the target video data has not been processed according to the target processing manner, the target video data is processed according to the target processing manner to obtain the target demand data, and a data distribution instruction carrying the target demand data is issued to the network processor.
[0150] In some embodiments, the determining module 63 is further used for:
[0151] The first request information is further used for indicating a target processing manner for the target video data; when the number of transmission indicated by the first identifier is zero, the target video data is processed according to the target processing manner to obtain target demand data of the service;
[0152] The data distribution instruction carrying the target demand data is issued to the network processor.
[0153] In some embodiments, the target processing manner includes frame extraction processing.
[0154] In some embodiments, the apparatus further includes a storage module (not shown in the figure), which is specifically used for:
[0155] When receiving video data of different sources, the video data is transcoded to obtain video data of a unified format, and the video data is stored in a data buffer;
[0156] For the video data in the data buffer, the video data is sent to a graphics processor, and valid video data returned by the graphics processor is received; the valid video data is obtained by deleting frames of the video data according to a preset rule by the graphics processor;
[0157] The valid video data and a start time of the valid video data are stored in a preset buffer.
[0158] In some embodiments, the storage module is further used for:
[0159] The valid video data in the preset buffer is twice encoded to obtain cached data, and the cached data and the start time are stored in a video library.
[0160] In some embodiments, the apparatus further comprises a processing module (not shown in the figure), which is specifically configured to:
[0161] Upon receiving a cache data request of any service, obtaining second request information of the cache data request; the second request information is used to indicate requested required cache data and a time interval of the required cache data, and the time interval comprises a required start time;
[0162] According to the second request information, traversing the video library to determine target cache data; the target cache data comprises cache data with a same or closest start time to the required start time;
[0163] Distributing the target cache data to the service through the network processor.
[0164] The video data interaction apparatus provided by the embodiments of the present application can be used to execute the technical solutions of the video data interaction method in the above embodiments, and has similar implementation principles and technical effects, which will not be described here in detail.
[0165] It should be noted that the division of each module of the above apparatus is only a logical functional division, and all or part of the modules can be integrated into one physical entity, or can be physically separated. These modules can all be implemented in the form of software called by a processing element; or all be implemented in the form of hardware; or part of the modules are implemented in the form of software called by a processing element, and part of the modules are implemented in the form of hardware. For example, the determining module 63 can be a separately established processing element, or can be integrated into a chip of the above apparatus, and in addition, the determining module 63 can be stored in the form of program code in the memory of the above apparatus, and the functions of the determining module 63 are called and executed by a processing element of the above apparatus. The implementation of other modules is similar. In addition, all or part of the modules can be integrated together, or can be independently implemented. The processing element herein can be an integrated circuit with signal processing capability. In the implementation process, each step of the above method or each module can be completed by the integrated logic circuit of hardware or the instruction in the form of software in the processing element.
[0166] The embodiments of the present application provide a central processing unit, which is used to implement the video data interaction method of the method embodiments.
[0167] The embodiments of the present application provide an edge computing device, which comprises a central processing unit, a network processor, a graphics processing unit, and a memory in communication connection with the central processing unit; the memory stores computer execution instructions; the central processing unit executes the computer execution instructions stored in the memory, so that the central processing unit executes the video data interaction method in the above method embodiments.
[0168] Figure 7A structural schematic diagram of an edge computing device is provided in the embodiments of the present application. As shown in the figure Figure 7 The edge computing device can include a transceiver 71, a processor 72, and a memory 73.
[0169] In the embodiments, the processor 72 can be a general processor, including a central processing unit (CPU), a network processor (NP), etc. The central processing unit 7 executes computer execution instructions stored in the memory 73, so that the processor 72 implements the solutions in the above embodiments. The processor 72 can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic device, a discrete gate or transistor logic device, a discrete hardware component.
[0170] The memory 73 is connected with the processor 72 through a system bus and completes mutual communication. The memory 73 is used for storing computer program instructions.
[0171] The transceiver 71 can be used to obtain a to-be-run task and configuration information of the to-be-run task.
[0172] The system bus can be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus, etc. The system bus can be divided into an address bus, a data bus, a control bus, etc. For the convenience of representation, only one thick line is shown in the figure, but it does not mean that there is only one bus or only one type of bus. The transceiver is used to realize the communication between the database access device and other computers (such as clients, read-write libraries and read-only libraries). The memory can include random access memory (RAM) and can also include non-volatile memory.
[0173] The embodiments of the present application also provide a chip for running instructions, which is used to execute the technical solutions of the video data interaction method in the above embodiments.
[0174] The embodiments of the present application also provide a computer readable storage medium, which stores computer instructions. When the computer instructions are run on a computer, the computer executes the technical solutions of the video data interaction method in the above embodiments.
[0175] The embodiment of the present application further provides a computer program product, which comprises a computer program stored in a computer readable storage medium, at least one processor can read the computer program from the computer readable storage medium, and the at least one processor executes the computer program to realize the technical scheme of the video data interaction method in the above embodiment.
[0176] In several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other manners. For example, the above described device embodiments are merely illustrative, and for example, the division of the modules is merely logical function division, and there can be another division manner in actual implementation, for example, a plurality of modules can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the displayed or discussed coupling or direct coupling or communication connection between the modules can be indirect coupling or communication connection through some interfaces, devices or modules, and can be electrical, mechanical or other forms.
[0177] The modules illustrated as separated components can or can not be physically separated, and the components illustrated as modules can or can not be physical units, that is, can be located in one place, or can be distributed on a plurality of network units. Part or all of the modules can be selected according to actual needs to implement the embodiment scheme.
[0178] In addition, each function module in each embodiment of the present application can be integrated in one processing unit, or each module can be physically present alone, or two or more modules can be integrated in one unit. The unit formed by the above modules can be realized in the form of hardware, or in the form of hardware plus software function unit.
[0179] The integrated module realized in the form of software function module can be stored in a computer readable storage medium. The software function module stored in the storage medium comprises a plurality of instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) or a processor to execute part of steps of the method of each embodiment of the present application.
[0180] It should be understood that the above memory can contain a high-speed RAM memory, and can also include a non-volatile storage NVM, for example, at least one disk memory, and can also be a U disk, a mobile hard disk, a read-only memory, a disk or an optical disk, etc.
[0181] The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. The bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, the bus in the drawings of the present application does not limit to only one bus or one type of bus.
[0182] The storage medium described above can be realized by any type of volatile or nonvolatile storage devices or a combination thereof, such as a static random access memory (SRAM), an electrically erasable programmable read-only memory (EEPROM), an erasable programmable read-only memory (EPROM), a programmable read-only memory (PROM), a read-only memory (ROM), a magnetic storage, a flash memory, a magnetic disk or an optical disk. The storage medium can be any available medium that can be accessed by a general or special purpose computer.
[0183] An exemplary storage medium is coupled to the processor so that the processor can read information from, and write information to, the storage medium. Of course, the storage medium can be part of the processor. The processor and the storage medium can be located in an application specific integrated circuits (ASIC). Of course, the processor and the storage medium can exist as discrete components in an electronic control unit or a host device.
[0184] Those of ordinary skill in the art can understand that all or part of the steps of the above-mentioned method embodiments can be completed by relevant hardware instructed by programs. The foregoing programs can be stored in a computer readable storage medium. When the programs are executed, the steps of the above-mentioned method embodiments are executed; and the foregoing storage medium includes various storage media that can store program codes, such as ROM, RAM, magnetic disks or optical disks.
[0185] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, and not to limit them; although the present application has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that they can still modify the technical solutions recorded in the foregoing embodiments, or make equivalent replacements for part or all of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the scope of the technical solutions of the embodiments of the present application.
Claims
1. A method for video data interaction, the method comprising: A central processing unit applied to an edge computing device, the method comprising: Upon receiving a real-time data request of a plurality of services, obtaining first request information of the real-time data request; the first request information is used to indicate target video data requested, and the service is used to implement a preset function based on the target video data; For a real-time data request of any service, traversing a preset buffer according to the first request information; the preset buffer is used to cache a plurality of effective video data and first identifiers corresponding to the effective video data, and the first identifier is used to identify a transmission number of the effective video data; When the target video data exists in the preset buffer, determining whether to issue a data distribution instruction carrying the target video data to a network processor according to the first identifier of the target video data; the network processor is used to cache the target video data and forward the target video data to the service; Wherein, when the transmission number indicated by the first identifier is not zero, the data distribution instruction not carrying the target video data is issued to the network processor; When the transmission number indicated by the first identifier is zero, the data distribution instruction carrying the target video data is issued to the network processor.
2. The method of claim 1, wherein, The first request information is also used to indicate a target processing mode of the target video data; the method further comprises: When the transmission number indicated by the first identifier is not zero, obtaining a second identifier of the target video data; the second identifier is used to indicate whether the target video data has been processed according to the target processing mode; If the second identifier indicates that the target video data has been processed according to the target processing mode, a data distribution instruction not carrying target demand data is issued to the network processor, so that the network processor distributes cached target demand data to the service, and the target demand data is obtained by processing the target video data according to the target processing mode; If the second identifier indicates that the target video data has not been processed according to the target processing mode, the target video data is processed according to the target processing mode to obtain the target demand data, and a data distribution instruction carrying the target demand data is issued to the network processor.
3. The method of claim 1, wherein, The first request information is also used to indicate a target processing mode of the target video data; the method further comprises: When the transmission number indicated by the first identifier is zero, the target video data is processed according to the target processing mode to obtain target demand data of the service; The data distribution instruction carrying the target demand data is issued to the network processor.
4. The method according to claim 2 or 3, characterized in that, The target processing mode includes frame extraction processing.
5. The method according to any one of claims 1 to 3, characterized in that, The method further comprises: Upon receiving video data of different sources, performing transcoding processing on the video data to obtain video data of a unified format, and storing the video data in a data buffer; For the video data of the data buffer, the video data is sent to a graphics processor, and valid video data returned by the graphics processor is received; the valid video data is obtained by performing frame deletion processing on the video data according to a preset rule by the graphics processor; The valid video data and a start time of the valid video data are stored in the preset buffer.
6. The method of claim 5, wherein, The method further comprises: The valid video data in the preset buffer is secondarily encoded to obtain cache data, and the cache data and the start time are stored in a video library.
7. The method of claim 6, wherein, The method further comprises: When receiving a cache data request of any service, second request information of the cache data request is obtained; the second request information is used to indicate required cache data and a time interval of the required cache data, and the time interval includes a required start time; According to the second request information, target cache data is determined by traversing the video library; the target cache data includes cache data with the same or closest start time as the required start time; The target cache data is distributed to the service by the network processor.
8. A video data interaction device, characterized in that, A method implemented by a central processor of an edge computing device, the apparatus comprising: A obtaining module, configured to, when receiving real-time data requests of a plurality of services, obtain first request information of the real-time data requests; the first request information is used to indicate target video data requested by the services, and the services are used to implement a preset function based on the target video data; A traversing module, configured to, for any service, traverse a preset buffer according to the first request information; the preset buffer is used to cache a plurality of valid video data and first identifiers corresponding to the valid video data, and the first identifiers are used to identify transmission times of the valid video data; A determining module, configured to, when the target video data exists in the preset buffer, determine whether to issue a data distribution instruction carrying the target video data to a network processor according to a first identifier of the target video data; the network processor is used to cache the target video data and forward the target video data to the services; When the transmission times indicated by the first identifiers are not zero, the data distribution instruction not carrying the target video data is issued to the network processor; When the transmission times indicated by the first identifiers are zero, the data distribution instruction carrying the target video data is issued to the network processor.
9. A central processing unit, characterized by The central processor comprises a processing module, and the processing module is configured to: When receiving real-time data requests of a plurality of services, obtain first request information of the real-time data requests; the first request information is used to indicate target video data requested by the services, and the services are used to implement a preset function based on the target video data; For any service, traverse a preset buffer according to the first request information; the preset buffer is used to cache a plurality of valid video data and first identifiers corresponding to the valid video data, and the first identifiers are used to identify transmission times of the valid video data; when the target video data exists in the preset buffer, determining whether to issue a data distribution instruction carrying the target video data to a network processor according to a first identifier of the target video data; the network processor is configured to cache the target video data and forward the target video data to the service; when the first identifier indicates that the number of transmissions is not zero, issuing a data distribution instruction not carrying the target video data to the network processor; when the first identifier indicates that the number of transmissions is zero, issuing a data distribution instruction carrying the target video data to the network processor.
10. An edge computing device, comprising: comprising: a central processing unit, a network processing unit, a graphics processing unit, and a memory in communication connection with the central processing unit; the memory stores computer execution instructions; the central processing unit executes the computer execution instructions stored in the memory to implement the method according to any one of claims 1-7.
11. A computer readable storage medium, characterized in that, The computer readable storage medium stores computer execution instructions, and the computer execution instructions are executed by the central processing unit to implement the method according to any one of claims 1-7.
12. A computer program product, characterised in that, comprising a computer program, which, when executed by a central processing unit, implements the method according to any one of claims 1-7.
Citation Information
Patent Citations
Service calling method, device and system and computer readable storage medium
CN116208677A
Video processing device, control method and effect switcher
JP2015084468A