Method, device and equipment for recording and playing recorded video

By starting the recording service on the edge gateway node and uploading the video files to the central cloud storage server, the problem of NVR equipment data security and central storage bandwidth bottlenecks is solved, and video recording and playback is safe, efficient and real-time.

CN120224012APending Publication Date: 2025-06-27EMERSON NETWORK POWER CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311837006.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-12-27
Publication Date
2025-06-27

AI Technical Summary

Technical Problem

Existing NVR devices have data security problems, and central storage solutions have bandwidth bottlenecks and network security problems.

Method used

Start the recording service on the edge gateway node, and video recording and playback are performed through the central cloud storage server. It supports cross-regional recording and playback. The video files recorded by the camera are uploaded to the central cloud storage server, and support real-time cutting and encryption upload.

Benefits of technology

It realizes the security and efficiency of video recording and playback, avoids NVR equipment management difficulties and central storage bandwidth bottlenecks, and ensures the security of real-time upload and transmission of video data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120224012A_ABST
    Figure CN120224012A_ABST
Patent Text Reader

Abstract

The invention discloses a recording and playing method, device and equipment for a recorded video, and the method comprises the steps: receiving a recording request sent by a server which is a central cloud storage server or a video playing server; generating a recording task according to the recording request, and determining a recording service for executing the recording task; and starting a corresponding number of cameras through the recording service to execute the recording task, and uploading an obtained recorded video file to a central cloud storage server. Therefore, the problem of data security of the existing NVR equipment and the problem of bandwidth bottleneck of central storage are solved.
Need to check novelty before this filing date? Find Prior Art

Description

Background Art

[0002] For historical video storage, the traditional solution is to add NVR (Network Video Recorder) devices near the cameras for recording. The cameras store the captured videos in the NVR devices; or large storage devices are centrally placed, and the network environment between the storage devices and the cameras is fully connected throughout the network. The cameras transmit the captured videos to the storage devices through the network for storage.

[0003] For the NVR devices placed near the cameras, there are difficulties in management. There are even cases where someone on-site deliberately turns them off, damages them, or tampers with them, resulting in serious problems with the integrity and reliability of historical videos; centralized viewing cannot be provided, and one needs to go to the NVR devices to view.

[0004] For the solution of placing large storage devices in the center, theoretically, there is a problem of bandwidth bottleneck, and the cameras need to be exposed to the central network environment, resulting in camera network security problems. Summary of the Invention

[0005] The purpose of this application is to provide a method, device, and equipment for recording and playing videos, which are used to solve the problems of data security existing in existing NVR devices and bandwidth bottleneck existing in central storage.

[0006] In a first aspect, an embodiment of this application provides a video recording method applied to an edge network gateway node. The method includes:

[0007] Receiving a recording request sent by a server, where the server is a central cloud storage server or a video playback server;

[0008] Generating a recording task according to the recording request and determining a recording service for executing the recording task;

[0009] Starting a corresponding number of cameras through the recording service to execute the recording task, and uploading the obtained recorded video files to the central cloud storage server.

[0010] In the embodiment of this application, video recording is performed through the recording service started on the edge network gateway node. The edge network gateway node and the recording service can be deployed according to requirements, realizing the support for historical video recording of cameras across regions without strictly requiring the network structure to be a peer-to-peer network; the recorded video files captured by the cameras are uploaded to the central cloud storage server, supporting the playback of historical videos, and all services support cloud deployment; horizontal expansion can be supported, enabling the access of a large number of video devices.

[0011] In some possible embodiments, the recording task includes a first recording task and / or a second recording task; generating a recording task according to the recording request includes at least one of the following steps:

[0012] When the recording request is a non-real-time recording request carrying a recording plan, generating the first recording task according to the recording plan; the first recording task is used to complete the required recording data at the required recording time;

[0013] When the recording request is a real-time recording request, generating the second recording task; the second recording task includes the identifier of the target camera; the second recording task is used to start the target camera to record data and end the second recording task when a recording end request is received.

[0014] The embodiments of the present application support non-real-time video recording with a recording plan customized by a central cloud storage server, and also support real-time video recording initiated by a client according to personalized needs. The recording method is flexible and can meet the recording needs of the client and relevant management personnel.

[0015] In some possible embodiments, determining the recording service for executing the recording task includes:

[0016] Obtaining the resource occupancy information of the running recording service, where the resource occupancy information includes at least one of CPU usage rate, memory usage rate, or the number of cameras currently starting video recording;

[0017] Determining the remaining resources of the running recording service according to the resource occupancy information;

[0018] Determining the priority of the running recording service according to the remaining resources, and allocating the recording task to at least one recording service according to the priority.

[0019] The embodiments of the present application allocate recording tasks according to the priority based on the remaining resources of the running recording service on the edge network node, which can balance the resources occupied by different running recording services, prevent the situation where some recording services are resource-intensive while some recording services have more remaining resources, and achieve video recording with higher efficiency.

[0020] In some possible embodiments, the method further includes:

[0021] When all the remaining resources of the running recording service are occupied and there are unallocated recording tasks, if it is determined that there is an unstarted recording service according to the pre-configured number of recording services and the number of running recording services, starting a new recording service;

[0022] Allocating the unallocated recording tasks to the new recording service.

[0023] In the embodiment of the present application, when the recording task still cannot be completed after all the running recording services are utilized, a strategy of starting a new recording service can be adopted to avoid the situation of starting too many recording services while there are still a lot of remaining resources, resulting in waste of resources.

[0024] In some possible embodiments, uploading the obtained recorded video file to the central cloud storage server includes:

[0025] Real-time cutting the obtained recorded video file into sub-files with a set file size;

[0026] Encrypting the sub-files and uploading them to the central cloud storage server.

[0027] The embodiment of the present application can ensure the real-time upload of the recorded video file data and the security of data transmission.

[0028] In some possible embodiments, the method further includes:

[0029] Sending a registration request to the central cloud storage server, so that after the central cloud storage server authenticates the registration request, it synchronizes the edge gateway node information to the video playback server;

[0030] Sending the configured recording service information to the video playback server, so that the video playback server sends the recording service information to the client in response to a request from the client.

[0031] The embodiment of the present application supports connecting cameras in the same local area network to the edge gateway node, and then the edge gateway node registers with the central cloud storage server. During implementation, the edge gateway node can be flexibly deployed according to requirements; synchronizing the edge gateway node information and the recording service information to the video playback server, and supporting the client to initiate a personalized video playback request.

[0032] In a second aspect, the embodiment of the present application provides a method for playing a recorded video, which is applied to a central cloud storage server. The method includes:

[0033] Receiving a video playback request sent by the video playback server; the video playback request is used to request playing a target recorded video file; the target recorded video file is uploaded after the central cloud storage server requests the edge gateway node to start a recording service to complete a recording task;

[0034] Sending a link of the target recorded video file to the video playback server, so that the video playback server sends the link to the client, and the client plays the target recorded video file according to the link.

[0035] In the embodiment of the present application, the central cloud storage server is connected to the edge network gateway node and the video playback server at the same time, stores the recorded video files recorded by the edge network gateway node, and sends the relevant links to the client via the video playback server according to the video playback request of the video playback server, so as to meet the client's demand for playing the recorded video files.

[0036] In some possible embodiments, the method further includes:

[0037] Receiving a registration request sent by the edge network gateway node and authenticating the identity of the edge network gateway node;

[0038] After successful authentication, synchronize the information of the edge network gateway node to the video playback server, so that the video playback server sends the information of the edge network gateway node to the client in response to the request of the client;

[0039] Receiving the recording service information sent by the edge network gateway node and synchronizing it to the video playback server, so that the video playback server sends the recording service information to the client in response to the request of the client.

[0040] Through the above registration and authentication processes, the edge network gateway node and the recording service information can be synchronized to the video playback server, so that the client connected to the video playback server can view the edge network gateway node and the recording service information, in order to support the client to initiate personalized video playback requests.

[0041] In a third aspect, an embodiment of the present application provides a method for playing a recorded video, which is applied to a video playback server. The method further includes:

[0042] Receiving a video playback request sent by the client based on the edge network gateway node information and / or the recording service information, where the edge network gateway node information and / or the recording service information are obtained by the video playback server from the central cloud storage server and synchronized to the client;

[0043] Sending the video playback request to the central cloud storage server;

[0044] Receiving the link of the recorded video file sent by the central cloud storage server and obtaining the recorded video file through the link.

[0045] In the embodiment of the present application, the video playback server is connected to the central cloud storage server and the client at the same time, synchronizes the edge network gateway node information and / or the recording service information synchronized by the central cloud storage server to the client, so as to support the client to initiate a personalized video playback request. After obtaining the link of the recorded video file through the central cloud storage server, it is sent to the client to meet the client's personalized video playback demand.

[0046] In a fourth aspect, an embodiment of the present application provides a recording device for recording videos, including:

[0047] A recording request receiving module, configured to receive a recording request sent by a server, where the server is a central cloud storage server or a video playback server;

[0048] A recording service determining module, configured to generate a recording task according to the recording request and determine a recording service for executing the recording task;

[0049] A recorded file uploading module, configured to start a corresponding number of cameras through the recording service to execute the recording task, and upload the obtained recorded video file to the central cloud storage server.

[0050] In a fifth aspect, an embodiment of the present application further provides a playback device for playing recorded videos, including:

[0051] A playback request receiving module, configured to receive a video playback request sent by a video playback server; the video playback request is used to request playing a target recorded video file; the target recorded video file is uploaded after the central cloud storage server requests an edge network gateway node to start a recording service to complete a recording task;

[0052] A recorded file playback module, configured to send a link of the target recorded video file to the video playback server, so that the video playback server sends the link to a client, and the client plays the target recorded video file according to the link.

[0053] In a sixth aspect, an embodiment of the present application provides a playback device for playing recorded videos, including:

[0054] A playback request receiving module, configured to receive a video playback request sent by a client based on edge network gateway node information and / or recording service information, where the edge network gateway node information and / or recording service information is obtained by the video playback server from the central cloud storage server and synchronized to the client;

[0055] A playback request sending module, configured to send the video playback request to the central cloud storage server;

[0056] A recorded file obtaining module, configured to receive a link of a recorded video file sent by the central cloud storage server, and obtain the recorded video file through the link.

[0057] Seventh aspect, another embodiment of the present application further provides a recording device for recording videos, including at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and when the instructions are executed by the at least one processor, the at least one processor is enabled to execute any of the video recording methods provided by the embodiments of the present application.

[0058] Eighth aspect, another embodiment of the present application further provides a playback device for playing videos, including at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and when the instructions are executed by the at least one processor, the at least one processor is enabled to execute any of the video playback methods provided by the embodiments of the present application.

[0059] Ninth aspect, another embodiment of the present application further provides a computer storage medium storing a computer program for causing a computer to execute any of the video recording methods or any of the video playback methods provided by the embodiments of the present application.

[0060] Other features and advantages of the present application will be described in the subsequent specification, and, in part, will be obvious from the specification, or will be understood by implementing the present application. The objectives and other advantages of the present application can be realized and obtained by the structures specifically pointed out in the written specification, claims, and drawings. Description of the Drawings

[0061] To more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments of the present application will be briefly introduced below. Obviously, the drawings introduced below are only some embodiments of the present application. For those of ordinary skill in the art, without creative efforts, other drawings can be obtained based on these drawings.

[0062] Figure 1 Schematic diagram of a video recording and playback system in the related art;

[0063] Figure 2 Schematic diagram of a video recording and playback system according to an embodiment of the present disclosure;

[0064] Figure 3 Flowchart of a video recording and playback method according to an embodiment of the present disclosure;

[0065] Figure 4 Flowchart of a video recording method applied to an edge network node according to an embodiment of the present disclosure;

[0066] Figure 5 A flowchart of a method for playing a recorded video applied to a central cloud storage server according to an embodiment of the present disclosure;

[0067] Figure 6 A flowchart of a method for playing a recorded video applied to a video playback server according to an embodiment of the present disclosure;

[0068] Figure 7 A schematic structural diagram of a recording device for a recorded video as an edge network gateway node according to an embodiment of the present disclosure;

[0069] Figure 8 A schematic structural diagram of a playback device for a recorded video as a central cloud storage server according to an embodiment of the present disclosure;

[0070] Figure 9 A schematic structural diagram of a playback device for a recorded video as a video playback server according to an embodiment of the present disclosure;

[0071] Figure 10 A schematic structural diagram of a recording / playback device for a recorded video according to an embodiment of the present disclosure. Detailed implementation manners

[0072] To further illustrate the technical solutions provided by the embodiments of the present application, the following will be described in detail with reference to the accompanying drawings and specific implementation manners. Although the embodiments of the present application provide method operation steps as shown in the following embodiments or drawings, more or fewer operation steps may be included in the method based on routine or non-creative labor. In steps where there is no necessary causal relationship logically, the execution order of these steps is not limited to the execution order provided by the embodiments of the present application. When the method is actually processed or executed by a control device, it may be executed in the order shown in the embodiments or drawings or executed in parallel.

[0073] Such as Figure 1As shown in the figure, it is a schematic diagram of a recording video recording and playing system in the related art, mainly including a video playing server 100, an NVR device 101, and a large storage device 102. Both the NVR device 101 and the large storage device 102 are connected to the video playing server 100. The large storage device 102 can be a central-level video network storage device (Central VideoRecorder, CVR) device; the NVR device 101 is together with an Internet Protocol Camera (IP Camera, IPC). After the camera records the video, it is stored in the NVR device 101. The large storage device 102 is deployed in the center, connecting cameras in various regions and storing the video files recorded by the cameras. The above NVR device and large storage device, as storage devices, are connected to the video playing server 100, and the video playing server 100 provides video playing services.

[0074] For the NVR device placed near the camera, there are difficulties in management. There are even situations where someone on-site deliberately shuts down, damages, or tampers with it, resulting in serious problems with the integrity and reliability of historical videos; it is impossible to provide centralized viewing, and one needs to go to the NVR device to view.

[0075] For the solution of placing the large storage device in the center, there is theoretically a problem of bandwidth bottleneck, and the camera needs to be exposed to the central network environment, resulting in camera network security problems.

[0076] In view of the data security problems of the NVR device and the bandwidth bottleneck of the central storage in the related art, this application proposes a recording video recording and playing system for providing recording video services for clients, such as Figure 2 As shown in the figure, the system includes:

[0077] At least one edge gateway node 201, which is used to receive the recording request sent by the server. The server is a central cloud storage server or a video playing server; generate a recording task according to the recording request, and determine the recording service for executing the recording task; start a corresponding number of cameras to execute the recording task through the recording service, and upload the obtained recording video file to the central cloud storage server;

[0078] The central cloud storage server 202 is used to receive the video playing request sent by the video playing server; the video playing request is used to request to play the target recording video file; the target recording video file is uploaded after the central cloud storage server requests the edge gateway node to start the recording service to complete the recording task; send the link of the target recording video file to the video playing server, so that the video playing server sends the link to the client, and the client plays the target recording video file according to the link;

[0079] The video playback server 203 receives a video playback request sent by the client based on edge node information and / or recording service information. The edge node information and / or recording service information are obtained by the video playback server from the central cloud storage server and synchronized to the client. The video playback server sends the video playback request to the central cloud storage server, receives the link of the recorded video file sent by the central cloud storage server, and obtains the recorded video file through the link.

[0080] The camera 204 is connected to the edge node 201 and is used for video recording under the control of the recording service started by the edge node 201.

[0081] The recording video recording and playback system provided by the embodiments of the present application proposes a unified and centralized central storage solution that supports cross-regions, stores the recorded video files in the central cloud environment, eliminates the problems of manual deletion, damage, and shutdown of the recorded videos, and at the same time supports the non-peer network structure between the camera and the storage environment, ensuring that the camera is not exposed to the upper-layer network, and provides a delay feedback mechanism to reduce network congestion problems.

[0082] The edge node of the embodiments of the present application is simultaneously connected to the central cloud storage server and the video playback server. The central cloud storage server is used to provide cloud storage services, and the recorded video files are stored in the central cloud environment composed of multiple devices, which can avoid the bandwidth bottleneck problem existing in the centralized storage of data. The video playback server provides a recorded video playback platform. The client can log in to the recorded video playback platform, establish a connection with the video playback server, and when it is necessary to play the recorded video file, send a video playback request to the video playback server. The video playback server obtains the link of the recorded video file from the central cloud storage server and sends it to the client, and the client obtains the recorded video file through the link.

[0083] The central cloud storage server of the embodiments of the present application may include a primary central cloud storage server and a standby central cloud storage server, so that when the primary central cloud storage server fails, the standby central cloud storage server can be started. For example, the IP addresses of the two central cloud storage servers are 10.169.42.113 and 10.169.42.114 respectively. One of them is used as the IP address of the primary central cloud storage server, and the other is used as the IP address of the standby central cloud storage server.

[0084] The above-mentioned edge network node can be flexibly deployed according to requirements. For example, according to the recording requirements, the local area network where the cameras meeting the recording requirements are located can be determined. After connecting the cameras in the same local area network to the edge network node, the edge network node registers with the central cloud storage server, so that communication with the central cloud storage server and the video playback server can be realized. During implementation, the edge network node can be flexibly deployed according to requirements. For example, different edge network nodes can be deployed in different local area networks. In a local area network, if the number of cameras is very large, multiple edge network nodes can be deployed according to requirements. Exemplarily, if the number of cameras that the started edge network node A in the local area network can connect to is less than 600, and the number of cameras in the local area network is greater than 600, another edge network node B can be deployed.

[0085] For each deployed edge network node, it is necessary to pre-create the information of the newly deployed edge network node in the central cloud storage server. In this way, after the subsequent edge network node sends a registration application to the central cloud storage server, it can be verified based on the pre-created information. If the information is consistent, the verification passes; otherwise, the verification fails. After the verification passes, the registration of the edge network node is completed, and the IP address assignment for the edge network node is realized. The same edge network node cannot initiate registration multiple times. If it initiates registration multiple times and fails, a verification failure will be prompted. Different edge network nodes are assigned different IP addresses. For example, the IP addresses assigned to two different edge network nodes are 192.168.1.12 and 192.168.1.19 respectively.

[0086] In the embodiment of the present application, the edge network node is further used to send a registration request to the central cloud storage server, so that after the central cloud storage server authenticates the registration request and passes, it synchronizes the edge network node information to the video playback server; the central cloud storage server is further used to receive the registration request sent by the edge network node and authenticate the identity of the edge network node; after the authentication passes, it synchronizes the edge network node information to the video playback server, so that the video playback server can send the edge network node information to the client in response to the request of the client. The video playback server receives the edge network node information synchronized by the central cloud storage server and establishes a link with the edge network node. In this way, in response to the request of the client, the edge network node information can be sent to the client and the edge network node information can be displayed on the client. In this way, after the client logs in to the recording video playback platform, the edge network node identifier can be viewed on the recording video playback platform. If it is necessary to send a recording request to a certain edge network node or a video playback request to play the recorded video file of a certain edge network node, the recording request or video playback request can be sent to the edge network node through the video playback server by clicking on the edge network node identifier.

[0087] In the embodiments of the present application, the number of recording services that the edge gateway node can start can be pre-configured. The number of cameras connected to one recording service is fixed, and the maximum number of recording services can be configured according to the load condition. For example, if one recording service can be connected to 32 cameras and the configured number of recording services is 10, then the maximum number of cameras that can be connected is 320.

[0088] In the embodiments of the present application, the edge gateway node is further configured to send the configured recording service information to the video playback server, so that the video playback server sends the recording service information to the client in response to a request from the client. The central cloud storage server is further configured to receive the recording service information sent by the edge gateway node and synchronize it to the video playback server, so that the video playback server sends the recording service information to the client in response to a request from the client. The video playback server receives the recording service information of the edge gateway node sent by the central cloud storage server and, in response to a request from the client, sends the recording service information to the client to display the recording service information on the client side. In this way, the video playback server can display the recording service information on the recording video playback platform, and the client can view the recording service information configured under a certain edge gateway node and can select to start a certain recording service for video recording or request to play the recorded video file of a certain recording service according to the requirements.

[0089] In the embodiments of the present application, the recording task includes a first recording task and / or a second recording task. The recording task can be generated according to a recording request in any of the following ways:

[0090] 1) When the recording request is a non-real-time recording request carrying a recording plan, generate the first recording task according to the recording plan; the first recording task is used to complete the required recording data at the required recording time;

[0091] The central cloud storage server can send a non-real-time recording request carrying a recording plan to the edge gateway node. The recording plan can be a recording plan for video recording in the future, including the start time of recording, the end time of recording, and recording data requirement information, such as recording data for a certain area. When the edge gateway node receives the non-real-time recording request, it generates the first recording task according to the recording plan, specifically determining the recording task of which cameras to start for recording during what time period.

[0092] 2) When the recording request is a real-time recording request, generate the second recording task; the second recording task includes the identifier of the target camera; the second recording task is used to start the target camera to record data and end the second recording task when a recording end request is received.

[0093] The client can view the edge gateway node information and recording service information based on the video playback platform, select to start a certain recording service for video recording, send a real-time recording request to the edge gateway node through the video playback server. After receiving the real-time recording request, the edge gateway node determines the started recording service according to the real-time recording request, and determines the target camera to be started according to the demand data, so as to generate a second recording task, start recording by executing the second recording task, and end the second recording task when the recording end time is reached. Specifically, the client can carry the recording duration or recording stop time in the recording request, end the recording when the recording duration or recording stop time is reached, or end the second recording task when receiving an end request.

[0094] In the embodiment of the present application, the edge gateway node determines the recording service for executing the recording task, including:

[0095] Obtain the resource occupancy information of the running recording services, where the resource occupancy information may include, but is not limited to, at least one of CPU usage rate, memory usage rate, or the number of cameras currently starting video recording;

[0096] Determine the remaining resources of the running recording services according to the resource occupancy information;

[0097] Determine the priority of the running recording services according to the remaining resources, and allocate the recording task to at least one recording service according to the priority.

[0098] For different resources, the more resources are occupied, the less remaining resources there are. Specifically, the following method can be used to determine the priority of the running recording services:

[0099] Determine the priority order of the corresponding running recording services from high to low in the order of increasing CPU usage rate;

[0100] If it is determined that there are multiple running recording services at the same priority, determine the priority order of the corresponding running recording services from high to low in the order of increasing memory usage rate;

[0101] If it is determined that there are multiple running recording services at the same priority, determine the priority order of the corresponding running recording services from high to low in the order of increasing the number of cameras currently starting video recording.

[0102] Exemplarily, the statistical information obtained by the edge gateway node is shown in Table 1:

[0103]

[0104] For the recording services encoded as record001-003 during operation, it is determined that the priority of record001-002 with a CPU usage rate of 20% is the highest. Then, since the memory usage rates are the same, record002 with 8 cameras currently starting video recording is selected, and the recording task is assigned to record002.

[0105] It should be noted that when selecting a recording service to assign a recording task, since the number of cameras that the recording task may need to start is very large, and the number of cameras started by the currently selected recording service reaches the maximum but still cannot fully execute the recording, at this time, the recording task assignment can be executed again according to the above mechanism until all recording tasks are assigned to the recording service.

[0106] In the embodiment of the present application, the edge network node determines the recording service that executes the recording task, and is further used for: when all the remaining resources of the recording services during operation are occupied and there are unassigned recording tasks, determining that there is an unstarted recording service according to the pre-configured number of recording services and the number of the recording services during operation, starting a new recording service; and assigning the unassigned recording tasks to the new recording service.

[0107] In the embodiment of the present application, the edge network node uploads the obtained recorded video file to the central cloud storage server, including: cutting the obtained recorded video file into sub-files of a set file size in real time; encrypting the sub-files and uploading them to the central cloud storage server, which can ensure the security of data transmission.

[0108] The overall process of recording and playing the recorded video in the recording video recording and playing system of the present application is given below in conjunction with the accompanying drawings, as Figure 3 shown, including:

[0109] Step 301, the central cloud storage server formulates a recording plan and sends it to the edge network node;

[0110] Step 302, the edge network node receives the recording plan;

[0111] Step 303, if it is determined that the recording plan has been executed before, the recording ends; if it is determined that it has not been executed before, step 304 is executed;

[0112] Step 304, determine the recording task according to the recording plan, and assign the recording task to the currently started recording service according to the above implementation manner;

[0113] Step 305, determine whether all the remaining resources of the recording services during operation are used. If so, step 306 is executed; otherwise, step 307 is executed;

[0114] Step 306: Determine whether there is any unstarted recording service according to the configured number of recording services. If so, execute Step 307; otherwise, execute Step 3011;

[0115] Step 307: Assign the recording task to the currently available recording service;

[0116] Step 308: Determine whether the recording service has completed the recording task. If so, end; otherwise, execute Step 309;

[0117] Step 309: The edge gateway node cuts the video file recorded by the recording service into small files and uploads them back to the central cloud storage server;

[0118] Step 310: End when it is detected that all the recorded videos have been uploaded back;

[0119] Step 311: Report to the central cloud storage server that there are no resources to execute the recording task, and end the entire upload process.

[0120] The recording and playing system for recorded videos provided by the embodiments of the present application supports cross-regional historical video recording of cameras; does not strictly require the network structure to be a peer-to-peer network; supports full-terminal playback on web pages, Android terminals, and iOS; supports functions such as fast forward, slow motion, and jump of historical videos; based on streaming media forwarding, breaks through the limit on the number of concurrent viewers of historical videos; is fully cloud-developed, and all services support cloud deployment; supports horizontal expansion and can access a large number of video devices; supports the failure of the central storage cloud and ensures that historical videos are not lost within 24 hours; strictly follows the requirements of Internet transmission security, has a registration verification mechanism when accessing at the edge node, and the transmitted content is encrypted by a built-in private encryption algorithm during cross-network transmission.

[0121] Other features and advantages of the present application will be described in the subsequent specification, and part of them will become obvious from the specification or be understood by implementing the present application. The objectives and other advantages of the present application can be realized and obtained by the structures specifically pointed out in the written specification, claims, and drawings.

[0122] Based on the same inventive concept, the embodiments of the present application provide a method for recording recorded videos, which is applied to an edge gateway node, as Figure 4 shown, the method includes:

[0123] Step 401: Receive a recording request sent by a server, where the server is a central cloud storage server or a video playback server;

[0124] Step 402: Generate a recording task according to the recording request and determine the recording service for executing the recording task;

[0125] Step 403: Start the corresponding number of cameras through the recording service to execute the recording task, and upload the obtained recorded video file to the central cloud storage server.

[0126] In one or more possible embodiments, the recording task includes a first recording task and / or a second recording task; generating a recording task according to the recording request includes at least one of the following steps:

[0127] In the case where the recording request is a non-real-time recording request carrying a recording plan, generate the first recording task according to the recording plan; the first recording task is used to complete the required recording data at the required recording time.

[0128] In the case where the recording request is a real-time recording request, generate the second recording task; the second recording task includes the identifier of the target camera; the second recording task is used to start the target camera to record data and end the second recording task when a recording end request is received.

[0129] In one or more possible embodiments, determining the recording service for executing the recording task includes:

[0130] Obtain the resource occupancy information of the running recording service, where the resource occupancy information includes at least one of CPU usage rate, memory usage rate, or the number of cameras currently starting video recording.

[0131] Determine the remaining resources of the running recording service according to the resource occupancy information.

[0132] Determine the priority of the running recording service according to the remaining resources, and allocate the recording task to at least one recording service according to the priority.

[0133] In one or more possible embodiments, the method further includes:

[0134] In the case where all the remaining resources of the running recording service are occupied and there are unallocated recording tasks, when it is determined that there is an unstarted recording service according to the pre-configured number of recording services and the number of running recording services, start a new recording service.

[0135] Allocate the unallocated recording tasks to the new recording service.

[0136] In one or more possible embodiments, uploading the obtained recorded video file to the central cloud storage server includes:

[0137] Real-time cut the obtained recorded video file into sub-files with a set file size.

[0138] Upload the encrypted sub-file to the central cloud storage server.

[0139] In one or more possible embodiments, the method further includes:

[0140] Send a registration request to the central cloud storage server, so that after the central cloud storage server authenticates the registration request, it synchronizes the edge gateway node information to the video playback server;

[0141] Send the configured recording service information to the video playback server, so that the video playback server sends the recording service information to the client in response to a request from the client.

[0142] An embodiment of the present application also provides a method for playing a recorded video, which is applied to a central cloud storage server, as Figure 5 shown, the method includes:

[0143] Step 501, receive a video playback request sent by the video playback server; the video playback request is used to request to play a target recorded video file; the target recorded video file is uploaded after the central cloud storage server requests the edge gateway node to start a recording service to complete a recording task;

[0144] Step 502, send a link to the target recorded video file to the video playback server, so that the video playback server sends the link to the client, and the client plays the target recorded video file according to the link.

[0145] In an embodiment of the present application, the central cloud storage server may send a recording request to the edge gateway node; receive the recorded video file uploaded after the edge gateway node starts a recording service to complete a recording task, and store the recorded video file in a cloud storage manner; after the central cloud storage server receives a video playback request sent by the video playback server, it sends a link to the recorded video file to be played to the video playback server, so that the video playback server sends the link to the client, and the client plays the recorded video file through the link.

[0146] In one or more possible embodiments, the method further includes:

[0147] Receive a registration request sent by the edge gateway node and authenticate the identity of the edge gateway node;

[0148] After authentication, synchronize the information of the edge gateway node to the video playback server, so that the video playback server sends the information of the edge gateway node to the client in response to a request from the client;

[0149] Receive the recording service information sent by the edge network node and synchronize it to the video playback server, so that the video playback server responds to the request of the client and sends the recording service information to the client.

[0150] An embodiment of the present application also provides a method for playing a recorded video, which is applied to a video playback server. As Figure 6 shown, the method includes:

[0151] Step 601, receive a video playback request sent by the client based on the edge network node information and / or the recording service information. The edge network node information and / or the recording service information are obtained by the video playback server from the central cloud storage server and synchronized to the client;

[0152] Step 602, send the video playback request to the central cloud storage server;

[0153] Step 603, receive the link of the recorded video file sent by the central cloud storage server, and obtain the recorded video file through the link.

[0154] Step 604, send the link of the recorded video file to the client, so that the client can play the recorded video file through the link.

[0155] In the embodiment of the present application, the video playback server receives the edge network node information synchronized by the central cloud storage server, and in response to the request of the client, sends the edge network node information to the client; receives the recording service information of the edge network node sent by the central cloud storage server, and in response to the request of the client, sends the recording service information to the client; receives the recording request sent by the client based on the edge network node and / or the recording service information, and sends the recording request to the edge network node, so as to realize that the client requests to start the corresponding edge network node and / or the recording service for video recording; receives the video playback request sent by the client based on the edge network node information and / or the recording service information, and sends it to the central cloud storage server, so as to realize the playback of the recorded video file recorded by the corresponding edge network node and / or the recording service by the client.

[0156] Based on the same inventive concept, an embodiment of the present application also provides a recording device for recording a video. As Figure 7 shown, the device 700 includes:

[0157] A recording request receiving module 701, configured to receive a recording request sent by a server, where the server is a central cloud storage server or a video playback server;

[0158] A recording service determining module 702, configured to generate a recording task according to the recording request and determine a recording service for executing the recording task;

[0159] The recording file upload module 703 is used to start a corresponding number of cameras through the recording service to execute the recording task, and upload the obtained recorded video file to the central cloud storage server.

[0160] Based on the same concept, an embodiment of the present application further provides a playback device for recorded videos, as Figure 8 shown. The device 800 includes:

[0161] A playback request receiving module 801, configured to receive a video playback request sent by a video playback server; the video playback request is used to request playback of a target recorded video file; the target recorded video file is uploaded after the central cloud storage server requests an edge network gateway node to start a recording service to complete a recording task.

[0162] A recording file playback module 802, configured to send a link of the target recorded video file to the video playback server, so that the video playback server sends the link to a client, and the client plays the target recorded video file according to the link.

[0163] An embodiment of the present application further provides a playback device for recorded videos, as Figure 9 shown. The device 900 includes:

[0164] A playback request receiving module 901, configured to receive a video playback request sent by a client based on edge network gateway node information and / or recording service information, where the edge network gateway node information and / or recording service information is obtained by the video playback server from the central cloud storage server and synchronized to the client.

[0165] A playback request sending module 902, configured to send the video playback request to the central cloud storage server.

[0166] A recording file obtaining module 903, configured to receive a link of a recorded video file sent by the central cloud storage server, and obtain the recorded video file through the link.

[0167] After introducing the recording and playback methods for recorded videos and the recording and playback devices of the exemplary embodiments of the present application, next, the recording devices and playback devices for recorded videos according to another exemplary embodiment of the present application will be introduced.

[0168] Those skilled in the art can understand that various aspects of the present application can be implemented as a system, a method, or a program product. Therefore, various aspects of the present application can be specifically implemented in the following forms, namely: a complete hardware implementation, a complete software implementation (including firmware, microcode, etc.), or an implementation combining hardware and software aspects, which can be collectively referred to as "circuits", "modules", or "systems" here.

[0169] In some possible implementation manners, the recording device for recording videos according to the present application may at least include at least one processor and at least one memory. Among them, the memory stores program codes, and when the program codes are executed by the processor, the processor is caused to execute the steps in the method for recording videos according to various exemplary implementation manners of the present application described above in this specification.

[0170] The playback device for playing back videos according to the present application may at least include at least one processor and at least one memory. Among them, the memory stores program codes, and when the program codes are executed by the processor, the processor is caused to execute the steps in the method for playing back videos according to various exemplary implementation manners of the present application described above in this specification.

[0171] Next, with reference to Figure 10 the recording / playback device 100 for recording videos according to this implementation manner of the present application will be described. Figure 10 The recording / playback device 100 for recording videos shown is merely an example and should not impose any limitations on the functions and usage scope of the embodiments of the present application.

[0172] As Figure 10 shown, the recording / playback device 100 for recording videos is presented in the form of a general-purpose electronic device. The components of the recording / playback device 100 for recording videos may include but are not limited to: the above-mentioned at least one processor 101, the above-mentioned at least one memory 102, and a bus 103 connecting different system components (including the memory 102 and the processor 101).

[0173] The bus 103 represents one or more of several types of bus structures, including a memory bus or a memory controller, a peripheral bus, a processor, or a local bus using any bus structure in a variety of bus structures.

[0174] The memory 102 may include a readable medium in the form of a volatile memory, such as a random access memory (RAM) 1021 and / or a cache memory 1022, and may further include a read-only memory (ROM) 1023.

[0175] The memory 102 may also include a program / utilities 1025 having a set (at least one) of program modules 1024. Such program modules 1024 include, but are not limited to, an operating system, one or more application programs, other program modules, and program data. Each or some combination of these examples may include an implementation of a network environment.

[0176] The recording / playback device 100 for recording video may also communicate with one or more external devices 104 (such as a keyboard, a pointing device, etc.), and may also communicate with one or more devices that enable a user to interact with the recording / playback device 100 for recording video, and / or communicate with any device (such as a router, a modem, etc.) that enables the recording / playback device 100 for recording video to communicate with one or more other electronic devices. Such communication may be carried out through an input / output (I / O) interface 105. Further, the recording / playback device 100 for recording video may also communicate with one or more networks (such as a local area network (LAN), a wide area network (WAN), and / or a public network, such as the Internet) through a network adapter 106. As shown in the figure, the network adapter 106 communicates with other modules of the recording / playback device 100 for recording video through a bus 103. It should be understood that although not shown in the figure, other hardware and / or software modules may be used in conjunction with the recording / playback device 100 for recording video, including but not limited to: microcode, device drivers, redundant processors, external disk drive arrays, RAID systems, tape drives, and data backup storage systems, etc.

[0177] In some possible embodiments, various aspects of a recording / playback method for recording video provided in this application may also be implemented in the form of a program product, which includes program code. When the program product runs on a computer device, the program code is used to cause the computer device to execute the steps in a recording / playback method for recording video according to various exemplary embodiments of this application described above in this specification.

[0178] The program product may adopt any combination of one or more readable media. The readable media may be a readable signal medium or a readable storage medium. A readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the above. More specific examples (a non-exhaustive list) of the readable storage medium include: an electrical connection having one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.

[0179] The program product for monitoring according to an embodiment of the present application may be a portable compact disc read-only memory (CD-ROM) and include program code, and may run on an electronic device. However, the program product of the present application is not limited thereto. In this document, a readable storage medium may be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, apparatus, or device.

[0180] The readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, in which the readable program code is carried. Such a propagated data signal may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. The readable signal medium may also be any readable medium other than the readable storage medium, which can send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device.

[0181] The program code contained on the readable medium may be transmitted by any appropriate medium, including but not limited to wireless, wired, optical fiber cable, RF, etc., or any suitable combination of the above.

[0182] The program code for performing the operations of the present application may be written in any combination of one or more programming languages, including object-oriented programming languages such as Java, C++, etc., and also including conventional procedural programming languages such as the "C" language or similar programming languages. The program code may be executed entirely on the user's electronic device, partially on the user's device, executed as a stand-alone software package, partially on the user's electronic device and partially on a remote electronic device, or entirely on a remote electronic device or server. In the case of a remote electronic device, the remote electronic device may be connected to the user's electronic device through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external electronic device (e.g., by connecting through an Internet service provider via the Internet).

[0183] It should be noted that although several units or subunits of the apparatus are mentioned in the above detailed description, this division is merely exemplary and not mandatory. In fact, according to the embodiments of the present application, the features and functions of the two or more units described above may be embodied in one unit. Conversely, the features and functions of one unit described above may be further divided and embodied by multiple units.

[0184] In addition, although the operations of the method of the present application are described in a specific order in the accompanying drawings, this does not require or imply that these operations must be performed in that specific order, or that all of the shown operations must be performed to achieve the desired result. Additionally or alternatively, certain steps may be omitted, multiple steps may be combined into one step for execution, and / or one step may be decomposed into multiple steps for execution.

[0185] Those skilled in the art should understand that the embodiments of the present application can be provided as a method, a system, or a computer program product. Therefore, the present application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present application can take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code.

[0186] The present application is described with reference to the flowcharts and block diagrams of methods, apparatuses (systems), and computer program products according to the embodiments of the present application. It should be understood that each flow and / or block in the flowcharts and block diagrams, as well as the combination of flows and blocks in the flowcharts and block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to the processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing devices to generate a machine, such that the instructions executed by the processor of the computer or other programmable data processing devices generate means for implementing the specified functions in Figure 1 one or more flows or multiple flows and blocks Figure 1 one or more blocks or multiple blocks.

[0187] These computer program instructions can also be stored in a computer-readable memory that can direct a computer or other programmable data processing device to work in a specific manner, such that the instructions stored in the computer-readable memory generate a manufactured article including instruction means that implement the specified functions in Figure 1 one or more flows or multiple flows and blocks Figure 1 one or more blocks or multiple blocks.

[0188] These computer program instructions can also be loaded onto a computer or other programmable data processing device, such that a series of operation steps are performed on the computer or other programmable device to generate a computer-implemented process, and thus the instructions executed on the computer or other programmable device provide steps for implementing the specified functions in Figure 1 one or more flows or multiple flows and blocks Figure 1 one or more blocks or multiple blocks.

[0189] Although the preferred embodiments of the present application have been described, additional changes and modifications can be made to these embodiments by those skilled in the art once they learn the basic inventive concept. Therefore, the appended claims are intended to be construed to include the preferred embodiments as well as all changes and modifications falling within the scope of the present application.

[0190] Obviously, those skilled in the art can make various changes and modifications to the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalent technologies, the present application is also intended to include these modifications and variations.

Claims

1. A recording method for recording videos, applied to an edge gateway node, characterized in that The method includes: Receiving a recording request sent by a server, where the server is a central cloud storage server or a video playback server; Generating a recording task according to the recording request and determining a recording service for executing the recording task; Starting a corresponding number of cameras through the recording service to execute the recording task, and uploading the obtained recorded video file to the central cloud storage server.

2. The method according to claim 1, wherein The recording task includes a first recording task and / or a second recording task; generating a recording task according to the recording request includes at least one of the following steps: In the case where the recording request is a non-real-time recording request carrying a recording plan, generating the first recording task according to the recording plan; The first recording task is used to complete the required recording data at the required recording time; In the case where the recording request is a real-time recording request, generating the second recording task; The second recording task includes the identifier of the target camera; The second recording task is used to start the target camera to record data and end the second recording task when a recording end request is received.

3. The method according to claim 1, wherein Determining the recording service for executing the recording task includes: Obtaining the resource occupancy information of the running recording service, where the resource occupancy information includes at least one of CPU usage rate, memory usage rate, or the number of cameras currently starting video recording; Determining the remaining resources of the running recording service according to the resource occupancy information; Determining the priority of the running recording service according to the remaining resources, and allocating the recording task to at least one recording service according to the priority.

4. The method according to claim 3, characterized in that The method further includes: In the case where all the remaining resources of the running recording service are occupied and there are unallocated recording tasks, when it is determined that there is an unstarted recording service according to the pre-configured number of recording services and the number of running recording services, starting a new recording service; Allocating the unallocated recording tasks to the new recording service.

5. The method according to claim 1, wherein Uploading the obtained recorded video file to the central cloud storage server includes: Real-time cutting the obtained recorded video file into sub-files of a set file size; Encrypting the sub-files and uploading them to the central cloud storage server.

6. The method according to claim 1, characterized in that, It further includes: Sending a registration request to the central cloud storage server, so that after the central cloud storage server authenticates the registration request, it synchronizes the edge gateway node information to the video playback server; Sending the configured recording service information to the video playback server, so that the video playback server sends the recording service information to the client in response to a request from the client.

7. A method for playing a recorded video, which is applied to a central cloud storage server, characterized in that, This method includes: Receiving a video playback request sent by a video playback server; the video playback request is used to request to play a target recorded video file; the target recorded video file is uploaded after the central cloud storage server requests the edge gateway node to start a recording service to complete a recording task; Sending a link to the target recorded video file to the video playback server, so that the video playback server sends the link to the client, and the client plays the target recorded video file according to the link.

8. The method according to claim 7, characterized in that, It further includes: Receive the registration request sent by the edge network gateway node and authenticate the identity of the edge network gateway node; After successful authentication, synchronize the information of the edge network gateway node to the video playback server, so that the video playback server can send the information of the edge network gateway node to the client in response to the request of the client; Receive the recording service information sent by the edge network gateway node and synchronize it to the video playback server, so that the video playback server can send the recording service information to the client in response to the request of the client.

9. A method for playing a recorded video, applied to a video playback server, characterized in that The method further includes: Receive the video playback request sent by the client based on the edge network gateway node information and / or recording service information, and the edge network gateway node information and / or recording service information are obtained by the video playback server from the central cloud storage server and synchronized to the client; Send the video playback request to the central cloud storage server; Receive the link of the recorded video file sent by the central cloud storage server and obtain the recorded video file through the link.

10. A recording device for recording videos, characterized in that, It includes: A recording request receiving module, configured to receive the recording request sent by the server, and the server is the central cloud storage server or the video playback server; A recording service determining module, configured to generate a recording task according to the recording request and determine the recording service for executing the recording task; A recorded file uploading module, configured to start a corresponding number of cameras through the recording service to execute the recording task and upload the obtained recorded video file to the central cloud storage server.

11. A playback device for recorded videos, characterized in that, It includes: A playback request receiving module, configured to receive the video playback request sent by the video playback server; The video playback request is used to request to play the target recorded video file; The target recorded video file is uploaded after the central cloud storage server requests the edge network gateway node to start the recording service to complete the recording task; A recorded file playback module, configured to send the link of the target recorded video file to the video playback server, so that the video playback server can send the link to the client, and the client can play the target recorded video file according to the link.

12. A playback device for recorded videos, characterized in that, It includes: A playback request receiving module, configured to receive the video playback request sent by the client based on the edge network gateway node information and / or recording service information, and the edge network gateway node information and / or recording service information are obtained by the video playback server from the central cloud storage server and synchronized to the client; A playback request sending module, configured to send the video playback request to the central cloud storage server; A recorded file obtaining module, configured to receive the link of the recorded video file sent by the central cloud storage server and obtain the recorded video file through the link.

13. A recording device for recording videos, characterized in that It includes at least one processor; and a memory communicatively connected to the at least one processor; wherein, the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the method according to any one of claims 1-6.

14. A playback device for recording videos, characterized in that, characterized in that, Comprising at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to execute the method according to any one of claims 7-8, or to be able to execute the method according to claim 9.

15. A computer storage medium, characterized in that, The computer storage medium stores a computer program, and the computer program is used to cause a computer to execute the method according to any one of claims 1-6, or to be able to execute the method according to any one of claims 7-8, or to be able to execute the method according to claim 9.