Method and system for processing video service based on edge server

By introducing a master-slave server architecture into the edge server and dynamically allocating tasks and resources, the problem of uneven distribution of computing resources on the edge server is solved, and the stability and efficient processing of the video service system are achieved.

CN116347169BActive Publication Date: 2025-11-25INSPUR SUZHOU INTELLIGENT TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310135335.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-02-17
Publication Date
2025-11-25
Estimated Expiration
2043-02-17

AI Technical Summary

Technical Problem

In existing technologies, when edge servers are combined with network cameras, the distribution of computing resources is uneven, resulting in uneven video service processing efficiency and a tendency for computing resources to be abused or wasted.

Method used

The system adopts a master-slave server architecture. The edge master server is responsible for task scheduling and storing video algorithm models. Tasks are dynamically allocated based on the real-time resource status of the edge sub-servers. The edge sub-servers execute the video algorithm models to process video data and upload the results to the master server.

Benefits of technology

It ensures the smoothness and stability of the video service system, avoids the waste of computing resources and lag, and improves the efficiency of video service processing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116347169B_ABST
    Figure CN116347169B_ABST
Patent Text Reader

Abstract

The application provides an edge server-based video service processing method and system, the method comprising: obtaining a target configuration file from an edge master server, wherein the target configuration file is generated according to real-time resource state information of the edge server; obtaining a target video algorithm model and mapping information between a target image acquisition device and a target edge sub-server according to the target configuration file; sending the target video algorithm model and the mapping information to the target edge sub-server, so that the target edge sub-server establishes a connection with the corresponding target image acquisition device according to the mapping information, and then performs the target video algorithm model to process video information obtained by the target image acquisition device; and obtaining a video service processing result uploaded by the target edge sub-server. The application guarantees the fluency and stability of the entire video service system and improves the video service processing efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of edge server, and particularly relates to a video service processing method and system based on an edge server. BACKGROUND

[0002] With the maturity of artificial intelligence, 5G and Internet of Things technologies, computing power demand extends from data centers to the edge, and edge computing is rapidly developing to become a core part of the cloud-edge-end system. At the same time, the popularity of security systems and monitoring systems has brought network cameras into millions of households. However, most network cameras, as an end device, have no or only a small amount of computing power, making it difficult to meet various edge scenarios.

[0003] Combining edge micro servers with network cameras can form a complete closed-loop system to realize complete business functions of monitoring, video acquisition, video processing, video analysis and result output. However, when combining edge micro servers with multiple network cameras, the existing technology usually simply binds a single edge micro server with multiple network cameras, and each edge server independently executes its own video service, which can easily cause misuse or waste of computing resources, resulting in uneven video service processing efficiency of the security system or monitoring system.

[0004] Therefore, there is an urgent need for a video service processing method and system based on an edge server to solve the above problems. SUMMARY

[0005] In view of the problems in the prior art, the present application provides a video service processing method and system based on an edge server.

[0006] The present application provides a video service processing method based on an edge server, comprising:

[0007] obtaining a target configuration file from an edge master server, wherein the target configuration file is generated according to real-time resource state information of the edge server;

[0008] obtaining a target video algorithm model and mapping information between a target image acquisition device and a target edge sub-server according to the target configuration file;

[0009] sending the target video algorithm model and the mapping information to the target edge sub-server, so that the target edge sub-server establishes a connection with the corresponding target image acquisition device according to the mapping information, and then performs the target video algorithm model to process the video information obtained by the target image acquisition device;

[0010] obtaining a video service processing result uploaded by the target edge sub-server.

[0011] According to the video service processing method based on the edge server provided by the application, before the target configuration file is obtained from the edge master server, the method further comprises:

[0012] According to the preset video detection task, the target video algorithm model and the target image acquisition device are determined, and video stream address information of the target image acquisition device is obtained;

[0013] Edge server information is obtained, wherein the edge server information comprises server information of the edge master server and server information of the target edge sub-server;

[0014] According to the edge server information and the video stream address information, the mapping information is constructed;

[0015] According to the mapping information and the target video algorithm model, the target configuration file is constructed, and the target configuration file is saved to the edge master server.

[0016] According to the video service processing method based on the edge server provided by the application, before the edge server information is obtained, the method further comprises:

[0017] The edge master server is randomly selected from a plurality of edge servers, and all edge servers except the edge master server from the plurality of edge servers are taken as edge sub-servers to be selected.

[0018] According to the video service processing method based on the edge server provided by the application, the edge server information is obtained, comprising:

[0019] According to the real-time resource state information of the edge server, the target edge sub-server is determined from a plurality of the edge sub-servers to be selected;

[0020] According to the IP address information of the edge master server and the target edge sub-server, the edge server information is obtained.

[0021] According to the video service processing method based on the edge server provided by the application, the target edge sub-server is determined from a plurality of the edge sub-servers to be selected according to the real-time resource state information of the edge server, comprising:

[0022] Resource occupation data required by the target video algorithm model is determined;

[0023] According to the resource occupation data, real-time resource state information of computing resources in each of the edge sub-servers to be selected is obtained;

[0024] According to the real-time resource state information, an allocation weight of each of the candidate edge sub-servers is obtained;

[0025] The target edge sub-server is determined from the plurality of candidate edge sub-servers according to the allocation weight.

[0026] According to the video service processing method based on the edge server, after the target video algorithm model and the mapping information are sent to the target edge sub-server, the method further comprises:

[0027] After the target video algorithm model is run on the target edge sub-server, overload judgment is performed on real-time resource state information of the target edge sub-server.

[0028] If the real-time resource state information of the target edge sub-server is greater than a preset resource occupation threshold, a new target edge sub-server is selected according to real-time resource state information of each of the candidate edge sub-servers.

[0029] According to IP address information of the new target edge sub-server and the video stream address information, the mapping information is updated to obtain updated mapping information.

[0030] The updated mapping information and the target video algorithm model are sent to the new target edge sub-server.

[0031] According to the video service processing method based on the edge server, after the target video algorithm model and the mapping information are sent to the target edge sub-server, the method further comprises:

[0032] The time length information of the target video algorithm model running on the target edge sub-server is obtained.

[0033] If the time length information is greater than or equal to a preset time length, the target video algorithm model is deleted.

[0034] The application further provides a video service processing system based on an edge server, comprising:

[0035] A configuration file obtaining module is configured to obtain a target configuration file from an edge master server, wherein the target configuration file is generated according to real-time resource state information of the edge server.

[0036] An analysis module is configured to obtain a target video algorithm model and mapping information between a target image acquisition device and a target edge sub-server according to the target configuration file.

[0037] A deployment module is configured to send the target video algorithm model and the mapping information to the target edge sub-server, so that the target edge sub-server establishes a connection with a corresponding target image acquisition device according to the mapping information, and then performs the target video algorithm model to process video information acquired by the target image acquisition device.

[0038] A video service result recovery module is configured to acquire a video service processing result uploaded by the target edge sub-server.

[0039] The application further provides an electronic device, which comprises a memory, a processor, and a computer program stored in the memory and executable on the processor, and the processor implements the edge server-based video service processing method according to any one of the above when executing the program.

[0040] The application further provides a non-transitory computer-readable storage medium, which stores a computer program, and the computer program is executable on a processor to implement the edge server-based video service processing method according to any one of the above.

[0041] The edge server-based video service processing method and system provided by the application can ensure the fluency of the operation end by setting a master-slave server in the edge server, so that the edge master server does not participate in video information processing, and only performs task scheduling and stores video algorithm models, and at the same time, the video algorithm model and the configuration file are sent to the corresponding edge server according to the real-time resource state of the edge sub-server, so that the edge sub-server processes the video data collected by the corresponding image acquisition device, and finally uploads the video service processing result to the edge master server for aggregation, so that the edge sub-server does not appear to be stuck when processing different video services, and the fluency and stability of the entire video service system are ensured, and the video service processing efficiency is improved. BRIEF DESCRIPTION OF DRAWINGS

[0042] In order to more clearly illustrate the technical solutions in the application or prior art, the following will briefly introduce the drawings needed to be used in the embodiments or prior art description. Obviously, the drawings in the following description are some embodiments of the application, and for those skilled in the art, other drawings can also be obtained without creative labor.

[0043] Figure 1 The flowchart of the edge server-based video service processing method provided by the application;

[0044] Figure 2 The networking schematic diagram of the edge server provided by the application;

[0045] Figure 3 A structural schematic diagram of an edge server-based video service processing system provided by the present application is shown in FIG. 1.

[0046] Figure 4 A structural schematic diagram of an electronic device provided by the present application is shown in FIG. 2. DETAILED DESCRIPTION

[0047] In order to make the objectives, technical solutions and advantages of the present application clearer, the technical solutions of the present application will be described below in detail with reference to the accompanying drawings of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments of the present application, all other embodiments obtained by those of ordinary skill in the art without creative work fall within the protection scope of the present application.

[0048] In the existing distributed security and monitoring system, a plurality of network cameras are usually bound to an edge server in advance, and a video algorithm model is set in the edge server in advance. When the network camera collects video, the edge server processes the video data collected by the network camera by running the relevant video algorithm model. However, in the current distributed security system, multiple edge servers usually execute corresponding video services according to the video algorithm models stored therein, and there is no linkage and supervision between the edge servers, which is easy to cause abuse or waste of computing resources.

[0049] Based on the problems in the prior art, the present application provides a method for deploying a video algorithm model of a network camera for an edge server in a cluster environment, by selecting an edge master server from a plurality of edge servers in the cluster environment, and managing other edge servers (i.e., edge slave servers) by using the edge master server, wherein the edge master server will not be used for algorithm inference, and its main role is to store algorithm models and publish tasks for edge slave servers; at the same time, the edge master server monitors the resource usage of each edge slave server, thereby generating a dynamic allocation task (i.e., generating a corresponding configuration file); further, after the edge master server sends the configuration file to each edge slave server, the edge slave server only needs to pull (download) the corresponding video algorithm model from the edge master server after receiving the configuration file from the master server, and obtain the corresponding video stream (establish a connection between the edge slave server and the network camera according to the camera address information in the configuration file), and start the video algorithm model to complete the processing of video data. The present application sets up master-slave edge servers in a distributed video monitoring system or a security system, so that the entire system will not appear to be stuck due to uneven allocation of computing resources of edge servers or overload of edge servers, and centralized configuration of algorithms and centralized display of detection results are realized. For scenes requiring deployment and running of video algorithms by multiple edge servers, the deployment process is simplified, the self-detection and self-repair mechanism is increased, the inference results (i.e., video service processing results) are uniformly packaged, and the dynamic scheduling of algorithm engines and video streams under multiple edge servers is realized.

[0050] In the present application, the execution subject of the video service processing can be a functional module or a functional entity in the edge master server that can realize the function of the edge server-based video service processing method. It should be noted that the above execution subject does not constitute a limitation on the present application.

[0051] Figure 1 The flowchart of the edge server-based video service processing method provided by the present application is shown in Figure 1 As shown in the figure, the present application provides an edge server-based video service processing method, which comprises:

[0052] Step 101, obtaining a target configuration file from an edge master server, wherein the target configuration file is generated according to real-time resource state information of the edge server.

[0053] In the present application, the edge master server is selected from a plurality of edge micro servers, preferably, the edge master server can be selected according to the resource conditions (such as storage space and hardware configuration, etc.) of the edge servers. After the edge master server is determined, the related video algorithm model (such as target recognition algorithm and target tracking algorithm, etc.) is stored in the storage unit of the edge master server, and at the same time, according to the video detection task, the target scene area corresponding to each video detection task is determined, and then the related network camera (i.e. target image acquisition device) under the target scene area is determined. In the present application, according to the real-time resource state information of the edge servers (except the edge master server), the target edge sub-server is determined, then the IP address information of the target edge sub-server and the video stream address information of the target acquisition device are associated to obtain the mapping information between them, finally, according to the mapping information and the target video algorithm model, the corresponding target configuration file is generated, and the target configuration file is stored to the edge master server.

[0054] Further, when the current video detection task is obtained, the corresponding configuration file is called from the edge master server for subsequent task allocation and algorithm deployment, so as to complete the video service processing.

[0055] Step 102, according to the target configuration file, obtaining the target video algorithm model, and the mapping information between the target image acquisition device and the target edge sub-server.

[0056] In the present application, by analyzing the target configuration file, the target video algorithm model required by the current video detection task, and the target edge sub-server and the target image acquisition device required to run the target video algorithm model are determined. It should be noted that in the present application, the target image acquisition device and the target edge sub-server can be multiple, wherein according to the mapping information, one edge sub-server can process the video data collected by multiple target image acquisition devices; or one edge sub-server can correspond to one target image acquisition device, so as to process the video data collected by the target image acquisition device.

[0057] Step 103, sending the target video algorithm model and the mapping information to the target edge sub-server, so that the target edge sub-server establishes a connection with the corresponding target image acquisition device according to the mapping information, and then processes the video information obtained by the target image acquisition device through the target video algorithm model.

[0058] In the present application, the target configuration file includes the relevant information of the target edge sub-server required for the current video detection task, such as IP address information, and then the target video algorithm model and the mapping information can be sent to the target edge sub-server according to the information. In an embodiment, the mapping information (or configuration file) can also be sent to the target edge sub-server, and after the target edge sub-server establishes a communication connection with the corresponding target image acquisition device according to the mapping information, the target edge sub-server sends a download request of the target video algorithm model to the edge master server, so that after the target edge sub-server downloads the target video algorithm model, the video data collected by the target image acquisition device is inferred and calculated.

[0059] Optionally, in an embodiment, when one or more edge sub-servers are insufficient in performance, for example, the current computing resource occupancy is high, the tasks in the configuration file can be rearranged (to form a new mapping relationship) and new tasks are published (mainly involving new mapping information between the image acquisition device and the edge sub-server). When the edge sub-server receives the new task published by the edge master server, it only needs to pull the new algorithm model from the edge master server (if there is a change in the algorithm model), so that after the corresponding video stream is obtained from the corresponding image acquisition device, the algorithm model is started to infer and calculate the video data.

[0060] Step 104, obtaining the video service processing result uploaded by the target edge sub-server.

[0061] In the present application, after the target edge sub-server obtains the analysis result in the configuration file, the required video algorithm model will be downloaded from the edge master service, and when the model download is completed, the target edge sub-server will call the algorithm startup script to decode the camera video stream, and the algorithm scheduling engine will call the video algorithm model for inference. Preferably, in the present application, when the video algorithm model on the target edge sub-server is successfully started, the edge master server will be notified through the http interface. Finally, the video service result inferred and calculated by the target edge sub-server through the video algorithm model will also be pushed to the edge master server through the http interface, and the edge master server will classify and process these video service results and display the information. Specifically, in the present application, the video service result includes the base64 encoding of the alarm picture, the unique identification code of the sub-server, the alarm picture timestamp (related to the video detection task of the scene area security monitoring), and the camera name and other main information. Then the edge master server classifies the video service result and stores it in the video database.

[0062] The application provides an edge server-based video service processing method, which comprises the following steps: setting a master-slave server in an edge server, so that the edge master server does not participate in video information processing, and only performs task scheduling and stores a video algorithm model, thereby ensuring the fluency of an operation terminal; according to the real-time resource state of an edge slave server, sending a video algorithm model and a configuration file to the corresponding edge server for running, so that the edge slave server processes the video data collected by a corresponding image acquisition device, and finally uploads the video service processing result to the edge master server for summarizing, thereby ensuring that the edge slave server does not appear to be stuck when processing different video services, ensuring the fluency and stability of the entire video service system, and improving the video service processing efficiency.

[0063] On the basis of the above-mentioned embodiment, before the target configuration file is obtained from the edge master server, the method further comprises the following steps:

[0064] According to a preset video detection task, the target video algorithm model and the target image acquisition device are determined, and the video stream address information of the target image acquisition device is obtained;

[0065] Edge server information is obtained, wherein the edge server information comprises server information of the edge master server and server information of the target edge slave server;

[0066] According to the edge server information and the video stream address information, the mapping information is constructed;

[0067] According to the mapping information and the target video algorithm model, the target configuration file is constructed, and the target configuration file is saved to the edge master server.

[0068] In the present application, by acquiring a preset video detection task, the algorithm model information required by the current video service and the network camera of the corresponding area are determined, so as to acquire the video algorithm model and the camera data (such as the video stream address of the network camera), and write these information into a configuration file, which is maintained by the edge master server. In the present application, in addition to the algorithm model and the camera information, the configuration file also includes the association relationship between the cameras involved in the current task and the edge sub-servers and some specific configurations (for example, the IP address information and the resource state information of the edge server, and the server information such as the video service description information). Specifically, in an embodiment, the camera information can be imported through the web interface of the cluster system of the edge server, mainly the Real Time Streaming Protocol (RTSP) video stream address. After importing the camera information, the camera can be selected in the algorithm configuration interface and the camera content can be previewed, and then the corresponding algorithm model is configured for the camera. Then the camera information and the configured algorithm model information are written into the configuration file, and then according to the real-time resource state information of the edge server, the edge sub-server with lower current computing resource occupation rate is selected, and the mapping relationship between the IP information of the edge sub-server and the video stream address is established, and written into the configuration file. Finally, the configuration file is saved to the edge master server. In another embodiment, after the camera information and the configured algorithm model information are written into the configuration file, if the edge sub-server needs to be called to process the video service at this time, according to the real-time resource state information of each edge sub-server, the edge master server can directly send the current configuration file to the edge sub-server with lower current computing resource occupation rate, so that the edge sub-server directly connects with the corresponding image acquisition device according to the video stream address information in the configuration file, and performs inference calculation on the video service data through the video algorithm model downloaded from the edge master server.

[0069] On the basis of the above embodiment, before the edge server information is acquired, the method further comprises:

[0070] Randomly selecting the edge master server from a plurality of edge servers, and taking all the edge servers except the edge master server from the plurality of edge servers as the edge sub-servers to be selected.

[0071] In the present application, the edge servers are deployed under the same local area network, and after the edge master server is randomly selected from the plurality of edge servers, the other edge servers are taken as the edge sub-servers to be selected. The http interface is provided by these edge sub-servers to be selected, so that the edge master server can realize the management of these edge sub-servers to be selected by calling the http interface. Figure 2 The networking schematic diagram of the edge server provided by the present application can be referred toFigure 2 In the present application, for IP information management of each edge sub-server, an IP configuration file is arranged in the edge master server, and after the IP addresses of all edge servers are configured, a designated network segment scanning is started on the web management interface of the edge master server, and the IP addresses of the edge sub-servers under the same network segment are maintained to the configuration file, and after the scanning, the initialization of the cluster system is completed.

[0072] On the basis of the above embodiment, the edge server information comprises:

[0073] According to the real-time resource state information of the edge server, the target edge sub-server is determined from the plurality of candidate edge sub-servers.

[0074] According to the IP address information of the edge master server and the target edge sub-server, the edge server information is obtained.

[0075] In the present application, according to the real-time resource state information of the edge sub-server, the distribution weight of the edge sub-server is calculated, and the target edge sub-server is determined according to the distribution weight, and the IP address information of the target edge sub-server is obtained. Since the target edge sub-server needs to upload the video service processing result to the edge master server subsequently, the edge server information is generated according to the IP address information of the edge master server and the target edge sub-server, and a corresponding configuration file is generated, so that the edge master server sends the configuration information to the target edge sub-server in the form of http interface call according to the IP address information of the target edge server in the configuration file. When the target edge sub-server completes the inference calculation of the algorithm model, the processing result is uploaded to the edge master server according to the IP address information of the edge master server in the configuration information.

[0076] On the basis of the above embodiment, the target edge sub-server is determined from the plurality of candidate edge sub-servers according to the real-time resource state information of the edge server, and the target edge sub-server comprises:

[0077] The resource occupation data required by the target video algorithm model is determined.

[0078] According to the resource occupation data, the real-time resource state information of the computing resource in each candidate edge sub-server is obtained.

[0079] According to the real-time resource state information, the distribution weight of each candidate edge sub-server is obtained.

[0080] The target edge sub-server is determined from the plurality of candidate edge sub-servers through the distribution weight.

[0081] In the present application, the edge master server can call the resource state interface of the target edge sub-server to obtain real-time resource state information (including CPU occupancy, GPU occupancy, and memory occupancy, etc.), and then assign a weight value to each edge sub-server as a parameter value for reference when allocating tasks according to the dependence of the target video algorithm model on each computing resource. In an embodiment, the current CPU occupancy, GPU occupancy, and memory occupancy of each edge sub-server can be summed up, and the summed results can be sorted to select the top N (the value of N is determined according to the video detection task) edge sub-servers with the smallest summed results as the target edge sub-servers. Preferably, in an embodiment, a corresponding determination threshold can be set for each computing resource, and first determine whether the occupancy of each computing resource exceeds the respective determination threshold, and then sum up the resource occupancy of the edge sub-servers whose occupancy of the three computing resources all exceeds the respective determination threshold to select the target edge sub-servers. In an embodiment, one or two computing resource occupancies can also be selected for weight value calculation according to the computing resources required by the video algorithm model.

[0082] On the basis of the above-mentioned embodiments, after the target video algorithm model and the mapping information are sent to the target edge sub-server, the method further comprises:

[0083] After the target video algorithm model is run on the target edge sub-server, overload judgment is performed on the real-time resource state information of the target edge sub-server.

[0084] If the real-time resource state information of the target edge sub-server is greater than a preset resource occupancy threshold, a new target edge sub-server is selected according to the real-time resource state information of each of the to-be-selected edge sub-servers.

[0085] The mapping information is updated according to the IP address information of the new target edge sub-server and the video stream address information to obtain updated mapping information.

[0086] The updated mapping information and the target video algorithm model are sent to the new target edge sub-server.

[0087] In the present application, the resource usage of each target edge sub-server executing a video algorithm model is monitored in real time by the edge master server, if there is an overload situation in a certain target edge sub-server, a low-computing-resource-occupying edge sub-server (i.e. a new target edge sub-server) at the current moment can be found to balance the overloaded target edge sub-server, so as to update the mapping information according to the new target edge sub-server, and the new mapping relationship is sent to the new target edge sub-server, so as to reduce the overload pressure of the overloaded target edge sub-server. It should be noted that in the present application, if there is no idle edge sub-server to balance the overloaded target edge sub-server at the current moment, a new configuration file can be generated according to the real-time resource state information of all edge sub-servers, so as to allocate algorithm models and camera address information to the corresponding edge sub-servers according to the new configuration file.

[0088] On the basis of the above-mentioned embodiments, after the target edge sub-server uploads the video service processing result, the method further comprises:

[0089] Obtaining the time length information of the target video algorithm model stopping running on the target edge sub-server;

[0090] If the time length information is greater than or equal to a preset time length, deleting the target video algorithm model.

[0091] In the present application, when the target edge sub-server finishes executing the current video detection task, the video algorithm model is no longer run, and the algorithm model is allowed again only when the same video detection task is started again. Therefore, the present application sets a preset time length to judge the time length information of the target edge sub-server stopping running the target video algorithm model, and when the time length information exceeds the preset time length, it is determined that the previous video detection task is no longer executed, and a configuration file needs to be deployed again. At this time, the edge master server can send an algorithm model deletion instruction to the target edge sub-server, so that the target edge sub-server deletes the video algorithm model stored therein, thereby releasing the storage space. The target edge sub-server can also delete the video algorithm model by itself when the preset time length is met.

[0092] The video service processing system based on an edge server provided by the present application is described below, and the video service processing system based on an edge server described below can be mutually corresponding and referred to the video service processing method based on an edge server described above.

[0093] Figure 3 The structure diagram of the video service processing system based on an edge server provided by the present application is as follows, Figure 3As shown, the application provides an edge server-based video service processing system, comprising a configuration file acquisition module 301, an analysis module 302, a deployment module 303 and a video service result recycling module 304, wherein the configuration file acquisition module 301 is used to acquire a target configuration file from an edge master server, wherein the target configuration file is generated according to real-time resource state information of the edge server; the analysis module 302 is used to acquire a target video algorithm model and mapping information between a target image acquisition device and a target edge sub-server according to the target configuration file; the deployment module 303 is used to send the target video algorithm model and the mapping information to the target edge sub-server, so that the target edge sub-server establishes a connection with the corresponding target image acquisition device according to the mapping information, and then performs the target video algorithm model to process the video information acquired by the target image acquisition device; and the video service result recycling module 304 is used to acquire the video service processing result uploaded by the target edge sub-server.

[0094] The edge server-based video service processing system provided by the application sets up a master-slave server in the edge server, so that the edge master server does not participate in video information processing, and only performs task scheduling and stores video algorithm models, thereby ensuring the smoothness of the operation end, and at the same time, according to the real-time resource state of the edge sub-server, the video algorithm model and the configuration file are sent to the corresponding edge server for running, so that the edge sub-server processes the video data collected by the corresponding image acquisition device, and finally uploads the video service processing result to the edge master server for summarizing, so that the edge sub-server does not appear to be stuck when processing different video services, thereby ensuring the smoothness and stability of the entire video service system, and improving the video service processing efficiency.

[0095] The system provided by the application is used to execute the above-mentioned method embodiments, and the specific process and detailed content are referred to the above-mentioned embodiments, which will not be repeated here.

[0096] Figure 4 The structural schematic diagram of the electronic equipment provided by the application is as follows, Figure 4As shown, the electronic device can include a processor 401, a communications interface 402, a memory 403, and a communications bus 404, wherein the processor 401, the communications interface 402, and the memory 403 complete mutual communication through the communications bus 404. The processor 401 can invoke a logical instruction in the memory 403 to execute an edge server-based video service processing method, which includes: obtaining a target configuration file from an edge master server, wherein the target configuration file is generated according to real-time resource state information of the edge server; obtaining a target video algorithm model and mapping information between a target image acquisition device and a target edge sub-server according to the target configuration file; sending the target video algorithm model and the mapping information to the target edge sub-server, so that the target edge sub-server establishes a connection with the corresponding target image acquisition device according to the mapping information, and then performs the target video algorithm model to process video information obtained by the target image acquisition device; and obtaining a video service processing result uploaded by the target edge sub-server.

[0097] In addition, the logical instruction in the memory 403 described above can be implemented in the form of a software function unit and sold or used as an independent product, which can be stored in a computer-readable storage medium. Based on such understanding, the technical solutions of the present application essentially or the part that contributes to the prior art or part of the technical solutions can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a plurality of instructions to make a computer device (which can be a personal computer, a server, or a network device, etc.) execute all or part of the steps of the methods described in various embodiments of the present application. The foregoing storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM, Read-Only Memory), a random access memory (RAM, Random Access Memory), a magnetic disk or an optical disk, and various program code storage media.

[0098] In another aspect, the present application also provides a computer program product, which comprises a computer program stored on a non-transitory computer readable storage medium, the computer program comprising program instructions which, when executed by a computer, enable the computer to perform the edge server-based video service processing method provided by the above-mentioned methods, the method comprising: obtaining a target configuration file from an edge master server, wherein the target configuration file is generated according to real-time resource state information of the edge server; obtaining a target video algorithm model and mapping information between a target image acquisition device and a target edge sub-server according to the target configuration file; sending the target video algorithm model and the mapping information to the target edge sub-server, so that the target edge sub-server establishes a connection with the corresponding target image acquisition device according to the mapping information, and then performs service processing on video information acquired by the target image acquisition device by executing the target video algorithm model; and obtaining a video service processing result uploaded by the target edge sub-server.

[0099] In yet another aspect, the present application also provides a non-transitory computer readable storage medium having a computer program stored thereon, which, when executed by a processor, implements an edge server-based video service processing method provided by the above-mentioned embodiments, the method comprising: obtaining a target configuration file from an edge master server, wherein the target configuration file is generated according to real-time resource state information of the edge server; obtaining a target video algorithm model and mapping information between a target image acquisition device and a target edge sub-server according to the target configuration file; sending the target video algorithm model and the mapping information to the target edge sub-server, so that the target edge sub-server establishes a connection with the corresponding target image acquisition device according to the mapping information, and then performs service processing on video information acquired by the target image acquisition device by executing the target video algorithm model; and obtaining a video service processing result uploaded by the target edge sub-server.

[0100] The device embodiments described above are merely illustrative, wherein the units described as separate components can or can not be physically separate, and the components displayed as units can or can not be physical units, i.e., they can be located in one place, or distributed on multiple network units. Part or all of the modules can be selected to achieve the purpose of the present embodiment scheme according to actual needs. Those skilled in the art can understand and implement it without creative labor.

[0101] Those skilled in the art can clearly understand the technical solutions of the various embodiments from the above description of the embodiments, and the various embodiments can be implemented by means of software with the necessary general hardware platforms, and of course, can also be implemented by hardware. Based on such understanding, the above technical solutions, essentially or in other words, the part of the prior art that makes a contribution, can be embodied in the form of a software product, which can be stored in a computer readable storage medium, such as a ROM / RAM, a magnetic disk, an optical disk, and the like, and includes a number of instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.

[0102] Finally, it should be noted that: the above embodiments are only used to illustrate the technical solutions of the present application, rather than limit them; although the present application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that: it can still modify the technical solutions recorded in the foregoing embodiments, or make equivalent replacement for some technical features therein; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present application.

Claims

1. A video service processing method based on an edge server, characterized in that, include: Obtain the target configuration file from the edge master server, wherein the target configuration file is generated based on the real-time resource status information of the edge server; Based on the target configuration file, obtain the target video algorithm model and the mapping information between the target image acquisition device and the target edge sub-server; The target video algorithm model and the mapping information are sent to the target edge sub-server, so that the target edge sub-server can establish a connection with the corresponding target image acquisition device according to the mapping information, and then perform business processing on the video information acquired by the target image acquisition device by executing the target video algorithm model; Obtain the video service processing results uploaded by the target edge sub-server; The target configuration file is obtained through the following steps: The target edge sub-server is determined based on the real-time resource status information of the edge servers other than the edge master server. The IP address information of the target edge sub-server is associated with the video stream address information of the target image acquisition device to obtain the mapping information between the two. Based on the mapping information and the target video algorithm model, a corresponding target configuration file is generated and stored in the edge master server; The method further includes: Based on the real-time resource status information of each edge sub-server, the edge master server directly sends the current configuration file to the edge sub-server whose current computing resource utilization rate is lower than the judgment threshold. The real-time resource status information includes CPU utilization rate, GPU utilization rate, and memory utilization rate.

2. The video service processing method based on an edge server according to claim 1, characterized in that, Before retrieving the target configuration file from the edge master server, the method further includes: Based on the preset video detection task, the target video algorithm model and the target image acquisition device are determined, and the video stream address information of the target image acquisition device is obtained; Obtain edge server information, wherein the edge server information includes the server information of the edge master server and the server information of the target edge sub-server; The mapping information is constructed based on the edge server information and the video stream address information; Based on the mapping information and the target video algorithm model, the target configuration file is constructed and saved to the edge master server.

3. The video service processing method based on an edge server according to claim 2, characterized in that, Prior to obtaining the edge server information, the method further includes: The edge master server is randomly selected from multiple edge servers, and all edge servers other than the edge master server are selected as edge sub-servers.

4. The video service processing method based on an edge server according to claim 3, characterized in that, The acquisition of edge server information includes: Based on the real-time resource status information of the edge server, the target edge sub-server is determined from a plurality of edge sub-servers to be selected; The edge server information is obtained based on the IP address information of the edge master server and the target edge sub-server.

5. The video service processing method based on an edge server according to claim 4, characterized in that, The step of determining the target edge sub-server from a plurality of candidate edge sub-servers based on the real-time resource status information of the edge server includes: Determine the resource consumption data required by the target video algorithm model; Based on the resource occupancy data, obtain the real-time resource status information of the computing resources in each of the edge sub-servers to be selected; Based on the real-time resource status information, obtain the allocation weight of each of the edge sub-servers to be selected; The target edge sub-server is determined from a plurality of edge sub-servers to be selected by using the allocated weights.

6. The video service processing method based on an edge server according to claim 3, characterized in that, After sending the target video algorithm model and the mapping information to the target edge sub-server, the method further includes: After the target video algorithm model is run on the target edge sub-server, an overload judgment is made on the real-time resource status information of the target edge sub-server. If the real-time resource status information of the target edge sub-server is greater than the preset resource occupancy threshold, a new target edge sub-server is selected based on the real-time resource status information of each of the edge sub-servers to be selected. The mapping information is updated based on the IP address information of the new target edge sub-server and the video stream address information to obtain the updated mapping information; The updated mapping information and the target video algorithm model are sent to the new target edge sub-server.

7. The video service processing method based on an edge server according to any one of claims 1 to 6, characterized in that, After obtaining the video service processing result uploaded by the target edge sub-server, the method further includes: Obtain information on the duration during which the target video algorithm model stops running on the target edge sub-server; If the duration information is greater than or equal to the preset duration, the target video algorithm model is deleted.

8. A video service processing system based on an edge server, characterized in that, include: The configuration file acquisition module is used to obtain the target configuration file from the edge master server, wherein the target configuration file is generated based on the real-time resource status information of the edge server; The parsing module is used to obtain the target video algorithm model and the mapping information between the target image acquisition device and the target edge sub-server based on the target configuration file. The deployment module is used to send the target video algorithm model and the mapping information to the target edge sub-server, so that the target edge sub-server can establish a connection with the corresponding target image acquisition device according to the mapping information, and then perform business processing on the video information acquired by the target image acquisition device by executing the target video algorithm model; The video service result collection module is used to obtain the video service processing results uploaded by the target edge sub-server; The target configuration file is obtained through the following steps: The target edge sub-server is determined based on the real-time resource status information of the edge servers other than the edge master server. The IP address information of the target edge sub-server is associated with the video stream address information of the target image acquisition device to obtain the mapping information between the two. Based on the mapping information and the target video algorithm model, a corresponding target configuration file is generated and stored in the edge master server; The system is also used for: Based on the real-time resource status information of each edge sub-server, the edge master server directly sends the current configuration file to the edge sub-server whose current computing resource utilization rate is lower than the judgment threshold. The real-time resource status information includes CPU utilization rate, GPU utilization rate, and memory utilization rate.

9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the video service processing method based on the edge server as described in any one of claims 1 to 7.

10. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the video service processing method based on the edge server as described in any one of claims 1 to 7.

Citation Information

Patent Citations

  • Cloud platform fully automatic calculation method and device

    CN107689999A

  • Data processing method and apparatus of network broadcast

    CN108632633A