Equipment configuration method
By running an embedded browser in a video control device and accessing the web page of the device to be configured for configuration, the problem of high resource consumption in traditional IPC configuration solutions after the version upgrade is solved, and efficient adaptation to different versions of devices is achieved and development costs is saved.
Patent Information
- Application Number
- CN202510058685.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2021-09-18
- Publication Date
- 2025-05-13
- Estimated Expiration
- 2041-09-18
AI Technical Summary
After the version upgrade, the traditional network camera (IPC) configuration solution requires NVR to be upgraded, resulting in high resource consumption and it is difficult to adapt to the configuration needs of different versions of equipment.
Run an embedded browser in a video control device, access the web page of the device to be configured through an embedded browser, and perform configuration operations, improving the adaptability of the video control device to different versions of devices.
It realizes efficient adaptation of video control equipment to different versions of equipment, saves development costs and simplifies the configuration process.
Smart Images

Figure CN119987875A_ABST
Abstract
Description
[0001] This application is a divisional application of the Chinese application with application number 202111101113.7, application date September 18, 2021, and invention name “Device configuration method, device, electronic device and machine-readable storage medium”. Technical Field
[0002] The present application relates to the field of security technology, and in particular to a device configuration method. Background Art
[0003] In recent years, Internet Protocol Camera (IPC) supports more and more functions. As the integrated control center of IPC, the configuration of IPC needs to be realized through NVR.
[0004] However, in the traditional IPC configuration scheme, when the IPC adds new functions due to version upgrades or other reasons, the NVR side needs to be upgraded accordingly, which consumes more resources to configure the new functions. Summary of the invention
[0005] In view of this, the present application provides a device configuration method, apparatus, electronic device and machine-readable storage medium.
[0006] According to a first aspect of an embodiment of the present application, there is provided a device configuration method, which is applied to a video control device, and includes:
[0007] When a first control instruction is detected, the embedded browser is run; wherein the first control instruction is used to control the video control device to enter a browser mode;
[0008] The Web page of the device to be configured is accessed through the embedded browser, and configuration operations are performed on the device to be configured, where the device to be configured is a device equipped with a Web service.
[0009] According to a second aspect of an embodiment of the present application, there is provided a device configuration apparatus, applied to a video control device, comprising:
[0010] A detection unit, used for detecting control instructions;
[0011] An operating unit, configured to operate the embedded browser when the detecting unit detects a first control instruction; wherein the first control instruction is used to control the video control device to enter a browser mode;
[0012] The configuration unit is used to access the Web page of the device to be configured through the embedded browser and perform configuration operations on the device to be configured, where the device to be configured is a device equipped with a Web service.
[0013] According to a third aspect of an embodiment of the present application, an electronic device is provided, comprising a processor and a machine-readable storage medium, wherein the machine-readable storage medium stores machine-executable instructions that can be executed by the processor, and the processor is used to execute the machine-executable instructions to implement the method provided in the first aspect.
[0014] According to a fourth aspect of an embodiment of the present application, a machine-readable storage medium is provided, in which a computer program is stored. When the computer program is executed by a processor, the method provided in the first aspect is implemented.
[0015] According to a fifth aspect of an embodiment of the present application, a computer program is provided. The computer program is stored in a machine-readable storage medium, and when a processor executes the computer program, the processor is prompted to execute the method provided in the first aspect.
[0016] The device configuration method of the embodiment of the present application improves the adaptability of the video control device to devices of different versions and saves the development cost of the video control device for adapting to devices of different versions by running an embedded browser in the video control device and accessing the web page of the device to be configured through the embedded browser to perform configuration operations on the device to be configured. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] Figure 1 It is a flowchart of a device configuration method provided in an embodiment of the present application;
[0018] Figure 2 It is a module schematic diagram of an overall architecture of a device configuration provided by an embodiment of the present application;
[0019] Figure 3 It is a schematic diagram of the architecture of an NVR provided in an embodiment of the present application;
[0020] Figure 4 It is a schematic diagram of a web page rendering process provided by an embodiment of the present application;
[0021] Figure 5 This is a schematic diagram of a process for configuring an IPC provided in an embodiment of the present application;
[0022] Figure 6 It is a schematic diagram of a mutually exclusive design of a decoding process provided by an embodiment of the present application;
[0023] Figure 7It is a schematic diagram of an IPC access extension through an explicit search list provided by an embodiment of the present application;
[0024] Fig. 8A It is a schematic diagram of an intelligent event deployment configuration interface provided by an embodiment of the present application;
[0025] Figure 8B is a schematic diagram of an event type configuration interface provided in an embodiment of the present application;
[0026] Figure 8C It is a schematic diagram of an intelligent event deployment configuration interface provided by an embodiment of the present application;
[0027] Fig.8D It is a schematic diagram of a defense area configuration interface provided in an embodiment of the present application;
[0028] Fig. 9 It is a structural schematic diagram of a device configuration apparatus provided in an embodiment of the present application;
[0029] Fig.10 It is a schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0030] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the present application. Instead, they are merely examples of devices and methods consistent with some aspects of the present application as detailed in the appended claims.
[0031] The terms used in this application are for the purpose of describing specific embodiments only and are not intended to limit this application. The singular forms "a", "said" and "the" used in this application and the appended claims are also intended to include plural forms, unless the context clearly indicates other meanings.
[0032] In order to enable those skilled in the art to better understand the technical solutions provided by the embodiments of the present application and to make the above-mentioned purposes, features and advantages of the embodiments of the present application more obvious and understandable, the technical solutions in the embodiments of the present application are further described in detail below in conjunction with the accompanying drawings.
[0033] See also Figure 1 , is a flow chart of a device configuration method provided in an embodiment of the present application, wherein the device configuration method can be applied to a video control device, such as Figure 1 As shown, the device configuration method may include:
[0034] Step S100: When a first control instruction is detected, the embedded browser is run; wherein the first control instruction is used to control the video control device to enter a browser mode.
[0035] In the embodiment of the present application, in order to improve the adaptability of the video control device to different devices (such as IPC), the video control device can access the device through an embedded browser and configure the device through the embedded browser.
[0036] It should be noted that in the embodiments of the present application, unless otherwise specified, the devices mentioned refer to devices equipped with Web services.
[0037] In the embodiment of the present application, when the video control device detects a control instruction (referred to herein as a first control instruction) for controlling the device to enter a browser mode, the video control device may run an embedded browser.
[0038] Step S110: Access the Web page of the device to be configured through the embedded browser, and perform configuration operations on the device to be configured.
[0039] In the embodiment of the present application, the video control device can access the device to be configured (such as IPC) through the embedded browser and perform configuration operations on the device to be configured.
[0040] Exemplarily, the configuration operation may include, but is not limited to, one or more of the configurations of network parameters, image and audio / video stream parameters, intelligent event deployment, and storage management.
[0041] Exemplarily, the network parameter configuration may include but is not limited to configuration of IP address, gateway, etc.
[0042] Image and audio / video stream parameters may include but are not limited to resolution, bit rate and other configurations.
[0043] Intelligent event deployment configuration may include but is not limited to event type (such as motion detection, occlusion alarm, etc.), deployment area, deployment time, and linkage mode.
[0044] Storage management configuration includes but is not limited to storage partitioning, storage space allocation and recycling, etc.
[0045] It can be seen that in Figure 1 In the method process, an embedded browser is run in a video control device, and the web page of the device to be configured is accessed through the embedded browser to perform configuration operations on the device to be configured, thereby improving the adaptability of the video control device to devices of different versions and saving the development cost of the video control device for adapting to devices of different versions.
[0046] In some embodiments, in step S110, the device to be configured is a video device to be configured, and the configuration operation includes an intelligent event arming configuration operation;
[0047] Perform intelligent event arming configuration operations on the device to be configured, which may include:
[0048] When the second control instruction is detected, the display interface of the embedded browser is switched to the intelligent event arming configuration interface;
[0049] According to the configuration instructions detected through the intelligent event arming configuration interface, the corresponding intelligent event arming configuration instructions are sent to the video device to be configured, so that the video device to be configured performs the intelligent event arming configuration operation according to the received intelligent event arming configuration instructions.
[0050] Exemplarily, the video control device can access the web page of the video device to be configured through the embedded browser, and can control the display interface of the embedded browser to switch to the intelligent event deployment configuration interface according to the received instructions.
[0051] Exemplarily, when the video control device detects a control instruction (referred to herein as the second control instruction) used to instruct the device to switch the display interface of the embedded browser to the intelligent event deployment configuration interface, the video control device may switch the display interface of the embedded browser to the intelligent event deployment configuration interface.
[0052] For example, the video control device may determine that the second control instruction is detected when detecting a selection instruction for an “event” function button in the display interface of the embedded browser.
[0053] Exemplarily, when the display interface of the embedded browser is the intelligent event arming configuration interface, the video control device detects the configuration instructions input through the intelligent event arming configuration interface, and based on the configuration instructions detected through the intelligent event arming configuration interface, sends corresponding intelligent event arming configuration instructions to the video device to be configured, so that the video device to be configured performs the intelligent event arming configuration operation according to the received intelligent event arming configuration instructions.
[0054] Exemplarily, the intelligent event arming configuration operation may include but is not limited to one or more of the following:
[0055] Event type configuration, deployment area configuration, deployment time configuration and linkage mode configuration.
[0056] For example, if Fig. 8AAs shown, the intelligent event deployment configuration interface may include an "event type" function button, a "deployment area" function button, a "deployment time" function button, and a "linkage mode" function button. Users can perform corresponding configuration operations by clicking on the function buttons in the intelligent event deployment configuration interface.
[0057] For example, when the user clicks the "Event Type" function button in the intelligent event deployment configuration interface, the video control device can be triggered to switch the display interface of the embedded browser to the event type configuration interface, and its schematic diagram can be as follows: Figure 8B The video control device can select instructions based on the detected event type and determine the event type of intelligent event defense that needs to be configured, such as motion detection, occlusion alarm, etc.
[0058] It should be noted that, in actual applications, each event type option can also be displayed in the form of a function button on the intelligent event deployment configuration interface for users to select according to their needs. The schematic diagram can be as follows: Figure 8C shown.
[0059] In one example, the configuration instructions include a deployment area configuration instruction;
[0060] When the display interface of the embedded browser is switched to the intelligent event deployment configuration interface, the video device configuration method provided in the embodiment of the present application may further include:
[0061] Overlaying and displaying the video area at a designated position of the display interface of the embedded browser, and playing the decoded bit stream of the video device to be configured in the video area;
[0062] The above-mentioned sending of the corresponding intelligent event arming configuration instruction to the video device to be configured according to the configuration instruction detected through the intelligent event arming configuration interface may include:
[0063] According to the intelligent rule frame parameter configuration instructions detected in the video area, the corresponding intelligent event deployment area configuration instructions are sent to the video device to be configured, so that the video device to be configured performs the intelligent event deployment area configuration operation according to the received intelligent event deployment area configuration instructions.
[0064] For example, take the defense area configuration as an example.
[0065] In the embodiment of the present application, the defense area configuration can be achieved by drawing an intelligent rule box in the preview screen of the video device to be configured.
[0066] Correspondingly, when the video control device switches the display interface of the embedded browser to the intelligent event deployment configuration interface, the video area can be superimposed and displayed at the specified position of the display interface of the embedded browser, the code stream of the video device to be configured can be decoded, and the decoded video data can be played in the video area to realize the video screen preview of the video device to be configured.
[0067] The user can determine the deployment area of the video device to be configured by drawing an intelligent rule box on the preview screen, thereby configuring the deployment area of the video device to be configured.
[0068] Exemplarily, the video control device may send corresponding intelligent event deployment area configuration instructions to the video device to be configured based on the intelligent rule frame parameter configuration instructions detected in the video area.
[0069] Exemplarily, the smart rule frame parameters may include but are not limited to the size and location of the defense area.
[0070] When the video device to be configured receives the intelligent event defense area configuration instruction, it can determine the defense area according to the received instruction and perform intelligent detection on the defense area, such as motion detection.
[0071] In one example, displaying a video area at a specified position of a display interface of an embedded browser and playing a decoded bitstream of a video device to be configured in the video area may include:
[0072] Control the embedded browser process to send a video area overlay request to the UI process of the video control device through the socket communication connection between the embedded browser process and the UI process of the video control device, so that the UI process of the video control device allocates a matching video area to the embedded browser process according to the video area overlay position and the video area size carried in the video area overlay request;
[0073] And, controlling the UI process of the video control device to send a decoding resource application request to the decoding process, so that the decoding process allocates decoding resources to the embedded browser process according to the channel parameters of the video device to be configured carried in the decoding resource application request;
[0074] The UI process of the video control device is controlled to overlay the video area at a specified position of the display interface of the embedded browser, and to play the decoded bit stream of the video device to be configured in the video area; the specified position is a position matching the overlay position.
[0075] For example, considering that the embedded browser does not support plug-ins for video decoding and intelligent rule frame acquisition, in order to realize the intelligent event deployment configuration of the video device to be configured through the embedded browser, a virtual network communication model can be established between the embedded browser process and the UI process of the video control device to realize the communication between the embedded browser process and the UI process of the video control device.
[0076] Exemplarily, the embedded browser process and the UI process of the video control device may interact with each other through inter-process communication.
[0077] In one example, a socket communication connection may be established between the embedded browser process and the UI process of the video control device, and the embedded browser process communicates with the UI process of the video control device through the socket communication connection.
[0078] Accordingly, the video control device can control the socket communication connection between the embedded browser process and the UI process of the video control device, and send a video area overlay request to the UI process of the video control device, where the video area overlay request can carry the video area overlay position and the video area size.
[0079] When the UI process of the video control device receives a video area overlay request, it can allocate a video area matching the video area size to the embedded browser process based on the video area overlay position and the video area size carried in the video area overlay request, that is, allocate display resources corresponding to the video area.
[0080] In addition, the UI process of the video control device may also send a decoding resource application request to the decoding process, and the decoding resource application request may carry channel parameters of the video device to be configured.
[0081] When the decoding process receives the decoding resource application request, it can allocate decoding resources to the embedded browser process according to the channel parameters of the video device to be configured.
[0082] Furthermore, the UI process of the video control device can overlay the video area at a position (which can be called a specified position) matching the video area overlay position in the display interface of the embedded browser, and play the decoded code stream of the video device to be configured in the video area.
[0083] In one example, the layer for playing the bitstream of the configured video device can be a video layer under the layer corresponding to the embedded browser (which can include a menu frame layer and a web page canvas layer). The video area can be superimposed in the display interface of the embedded browser by setting a specified transparency for the area in the menu frame layer and the web page canvas layer that matches the video area superimposed position. For example, taking 100% transparency as an example of complete transparency, the specified transparency can be 100%, 90% or 80%, etc.; thus, when the video control device plays the decoded video bitstream in the area in the video layer that matches the video area superimposed position, the video preview screen is visible to the user, and the user can configure the smart rule box on the video preview screen as needed. The smart rule box is displayed on the graphic component layer, and the graphic component layer is superimposed and displayed on the web page canvas layer. Exemplarily, when the NVR is in browser mode, the visual layer includes the following from top to bottom:
[0084] Graphic component layer, web page canvas layer, menu frame layer and video layer;
[0085] Exemplarily, the graphic component layer is used to draw and modify basic graphics, such as rectangles, triangles or other irregular graphics, and is displayed superimposed on the web page canvas layer.
[0086] The web page canvas layer is used to display the web page rendering image obtained after the embedded browser parses and renders the acquired web page resources;
[0087] The menu frame layer is used to display the menu selection list corresponding to the functions supported by the embedded browser, and to overlay and display the web page canvas layer on a preset area outside the area where the menu selection list is located; wherein the display interface corresponding to the function selected in the menu selection list is displayed on the web page canvas layer in the form of a web page rendering;
[0088] The video layer is used to display the video preview screen of the video front-end device.
[0089] In some embodiments, the above-mentioned superimposing and displaying the video area at a designated position of the display interface of the embedded browser, and after decoding and playing the decoded bit stream of the video device to be configured in the video area, may also include:
[0090] When the third control instruction is detected, the display resources corresponding to the video area and the decoding resources corresponding to the video device to be configured are released; wherein the third control instruction is used to control the video control device to exit the intelligent event deployment configuration interface.
[0091] For example, when the video control device exits the intelligent event deployment configuration interface, such as exiting the intelligent event deployment configuration interface and entering other interfaces, if the video area is still superimposed and the code stream decoding and playback for the video device to be configured is still performed, it will cause a waste of resources.
[0092] Therefore, when the video control device detects a control instruction (referred to as the third control instruction in this article) to control the device to exit the intelligent event deployment configuration interface, the video control device can release the display resources corresponding to the video area and the decoding resources corresponding to the video device to be configured to save display resources and decoding resources and avoid waste of resources.
[0093] It should be noted that when the intelligent event deployment configuration is implemented by setting a specified transparency for the area in the menu frame layer and the web page canvas layer that matches the video area overlay position, when the video control device exits the intelligent event deployment configuration interface, the transparency setting for the area in the menu frame layer and the web page canvas layer that matches the video area overlay position can be canceled.
[0094] In some embodiments, after the video area is superimposed and displayed at a designated position of the display interface of the embedded browser and the bit stream of the decoded video device is played in the video area, the method may further include:
[0095] Get the current intelligent rule frame parameters of the video device to be configured;
[0096] When the current smart rule frame parameters of the video device to be configured are obtained, the smart rule frame is superimposed and displayed at the corresponding position of the video area according to the current smart rule frame parameters of the video device to be configured;
[0097] The above-mentioned video area detection intelligent rule frame parameter configuration instruction may include:
[0098] In the video area, a modification instruction for the current intelligent rule frame parameters of the video device to be configured is detected.
[0099] Exemplarily, the smart rule frame parameters may include but are not limited to the size and location of the defense area.
[0100] Exemplarily, the smart rule frame parameter configuration instruction for the video device to be configured may include a modification instruction for the current smart rule frame parameter of the video device to be configured.
[0101] Accordingly, when the video area is superimposed and displayed at a designated position of the display interface of the embedded browser in the above manner, and after the decoded code stream of the video device to be configured is played in the video area, the current intelligent rule frame parameters of the video device to be configured can also be obtained.
[0102] When the video control device obtains the current smart rule frame parameters of the video device to be configured, the smart rule frame can be superimposed and displayed at the corresponding position of the video area according to the current smart rule frame parameters of the video device to be configured.
[0103] Exemplarily, the superimposed position of the intelligent rule frame may be determined according to the position of the defense area, and the size of the intelligent rule frame may be determined according to the size of the defense area.
[0104] Exemplarily, modification instructions for the current smart rule frame parameters of the video device to be configured can be detected in the video area, and based on the modification instructions, the modified smart rule frame parameters can be determined. Then, based on the modified smart rule frame parameters, corresponding configuration instructions can be sent to the video device to be configured, so that the video device to be configured performs configuration operations according to the received configuration instructions.
[0105] In an example, the above-mentioned video area detection intelligent rule frame parameter configuration instruction may also include:
[0106] When the current smart rule frame parameters of the video device to be configured are not obtained, a smart rule frame parameter drawing instruction for the video device to be configured is detected in the video area.
[0107] Exemplarily, when the video control device does not obtain the current smart rule frame parameters of the video device to be configured, the video control device can detect the smart rule frame parameter drawing instructions for the video device to be configured in the video area, and determine the smart rule frame parameter configuration instructions for the video device to be configured based on the parameter drawing instructions, and send corresponding configuration instructions to the video device to be configured based on the configuration instructions, so that the video device to be configured performs the configuration operation according to the received configuration instructions.
[0108] In some embodiments, decoding resources in regular mode and browser mode are mutually exclusive;
[0109] When the video control device is in normal mode, the decoding resource occupancy of the browser mode is empty;
[0110] When the video control device is in browser mode, the decoding resource occupancy of the normal mode is empty.
[0111] For example, considering that the video control device decodes and plays the code stream of the video front-end device through the normal mode (i.e., the mode when the embedded browser is not running) and decodes and plays the code stream of the video front-end device through the browser mode (i.e., the mode when the embedded browser is running) usually do not need to be performed at the same time, therefore, in order to avoid wasting decoding resources and improve resource utilization, the decoding resources in the normal mode and the browser mode are mutually exclusive.
[0112] When the video control device is in normal mode, the decoding resource occupancy of the browser mode is empty;
[0113] When the video control device is in browser mode, the decoding resource occupancy of the normal mode is empty.
[0114] Exemplarily, the decoding resources may include decoder resources and memory resources for storing the bitstream.
[0115] In some embodiments, in step S110, accessing a web page of the device to be configured through an embedded browser may include:
[0116] According to the address information of the device to be configured, the web page of the device to be configured is accessed; wherein the device to be configured is a device outside the access list of the video control device, and the address information of the device to be configured is obtained by searching.
[0117] For example, due to the dynamic nature of browser configuration, different address information (such as IP address) can be selected to access the web page of the video device. Therefore, the user can also select a device that is not in the access list of the video control device and configure the device by accessing the web page of the device.
[0118] Exemplarily, the video control device may obtain the address information (such as IP address) of a device (referred to herein as the device to be configured) outside the access list of the device by searching, and access the web page of the device to be configured based on the address information of the device to be configured.
[0119] It can be seen that by using the embedded browser to configure the device, it is no longer limited to configuring the devices in the access list, and the configuration control of the video control device over the device is expanded.
[0120] In order to enable those skilled in the art to better understand the technical solutions provided in the embodiments of the present application, the technical solutions provided in the embodiments of the present application are described below with reference to specific examples.
[0121] In this embodiment, it is taken that the video control device is an NVR and the device to be configured is an IPC as an example.
[0122] See also Figure 2 , is a schematic diagram of an overall architecture of a device configuration provided by an embodiment of the present application. In this embodiment, considering that the embedded browser does not support plug-ins for video decoding and regular frame acquisition, an embedded browser combined with a local service solution can be used.
[0123] like Figure 2As shown, after the user turns on the browser mode, the user selects the intelligent event deployment configuration and enters the intelligent event deployment configuration interface. Based on the preview of the real-time stream, the embedded browser process can apply to the UI process of the NVR for a valid area rectangular frame as a "container" (i.e., the above-mentioned video area) through the virtual network communication model to carry the code stream display. At the same time, the embedded browser process applies to the decoding process to add the corresponding IPC decoding channel to decode the real-time code stream of the IPC and overlay it on the embedded browser for display.
[0124] Exemplarily, the display interface of the browser may include two layers: a menu frame layer and a web page canvas layer, but the display effect is a whole. The user can configure the intelligent rule frame parameters for the IPC through the embedded browser and send them to the IPC through the virtual network communication model.
[0125] Exemplarily, when the embedded browser exits the intelligent event deployment configuration page, the "container" can be removed and the decoding channel resources can be released through the virtual network communication model.
[0126] See also Figure 3 , is a schematic diagram of the architecture of an NVR provided in an embodiment of the present application, such as Figure 3 As shown, when the NVR configures the IPC, through the process communication between the WebKit process (i.e., the embedded browser process) and the UI process of the NVR, the WebKit process can send the "container (also called video window)" coordinate information to the UI process of the NVR, and the GUI (Graphical User Interface) module in the UI process of the NVR allocates a video window for it, superimposes the video window on the corresponding position of the browser interface, and the DSP process (i.e., the decoding process) decodes the video stream and plays the decoded video data in the video window.
[0127] Exemplarily, the local service can be used as a client in the virtual network communication model, and the Websocket service module can be used as a server in the virtual network communication model, so that the WebKit process and the UI process of the NVR can interact through the virtual network communication model.
[0128] Exemplarily, the UI process of the NVR can also receive the embedded browser page coordinate information, and the video window is superimposed on the blank area in the display interface of the embedded browser (the area does not display the embedded browser's own information), and changes with the position of the blank area in the embedded browser interface.
[0129] Exemplarily, the position of the "white space" in the display interface of the embedded browser can be changed, and the size can be adjusted through code or mouse.
[0130] The UI process of the NVR can obtain the currently configured smart rule frame parameters (such as the size and position of the defense area), and obtain the currently configured smart rule frame parameters during the configuration process of the smart rule frame, and overlay and display the corresponding smart rule frame in the video window based on the currently configured smart rule frame parameters, and modify the currently configured smart rule frame parameters as needed to realize the defense area configuration.
[0131] The following is for Figure 2 The implementation of each process is described in detail.
[0132] 1. NVR UI process
[0133] The UI process of the NVR can allocate a frame buffer (FramBuffer) for the embedded browser process to use for the embedded browser process to display the menu selection list and the web page rendering image, forming a menu frame layer and a web page canvas layer.
[0134] The embedded browser process determines the size of the "container" that carries the video and notifies the decoding process to overlay the video layer.
[0135] When exiting browser mode, the frame buffer space is released.
[0136] 2. Embedded browser process
[0137] The embedded browser is implemented based on the WebKit kernel. Considering the memory usage limit and device limitations, the browser's software rendering mode can be adopted.
[0138] When the user controls the NVR to enter the browser mode from the normal mode, a section of shared memory will be pre-allocated for web page rendering.
[0139] Exemplarily, the embedded browser process can render the resource data of the web page of the video device to be configured, obtain a web page rendering image, and store it in the shared memory. The UI process of the NVR reads the web page rendering image from the shared memory and fills it into the web page layer in the window of the embedded browser.
[0140] Exemplarily, when a page change requirement is detected, that is, the web page needs to be updated, such as a URL update, a page switch, etc., on the one hand, a bitmap memory (referred to as a first bitmap memory in this article) can be created according to the size of the web page, and the web page rendering data corresponding to the current web page can be stored in the first bitmap memory, and the web page rendering data in the first bitmap memory can be traversed to update the data in the area that needs to be updated.
[0141] On the other hand, a canvas of the same size may be generated in another bitmap memory (referred to as the second bitmap memory in this article) according to the size of the Web page.
[0142] Then, the data in the first image memory is copied to the canvas, and the web page is refreshed according to the web page rendering image data in the canvas.
[0143] like Figure 4 As shown, during the rendering process, when a page change requirement is detected, the embedded browser process can create a bitmap memory shared between processes (i.e., the first bitmap memory mentioned above) according to the size of the Web page, and store the web page rendering data corresponding to the current Web page in the bitmap memory; the embedded browser process can traverse the bitmap memory and update the data in the area that needs to be updated.
[0144] When the embedded browser process completes the data update, it can notify the UI process of the NVR to update the bitmap memory of the BackingStrore (backup storage).
[0145] The UI process of the NVR generates a canvas of the same size according to the size of the web page, copies the web page rendering data in the first image memory to the canvas, and refreshes the web page according to the web page rendering data in the canvas.
[0146] 3. Virtual network communication model
[0147] The virtual network communication model refers to the communication model between the embedded browser process and the UI process of the NVR.
[0148] Exemplarily, a communication connection between the embedded browser process and the UI process of the NVR can be established through a local address (eg, 127.0.0.1), which requires good real-time performance and durability.
[0149] Exemplarily, the Websocket protocol may be used to establish a communication connection between the embedded browser process and the UI process of the NVR.
[0150] Since the embedded browser does not support the plug-in function, the display and drawing of the smart rule box corresponding to the smart event deployment area needs to rely on the UI process of the NVR.
[0151] like Figure 5As shown, the user enters the embedded browser interface to specify a channel IPC, and the user login is exempted through internal authentication. When the user enters the video-related page, a Websocket connection is established between the NVR UI process and the embedded browser process in a timely manner, and the embedded browser process sends a video area overlay request carrying the video area position and size to the NVR UI process through the Websocket connection; the NVR UI process can apply for a decoding channel to the DSP process through the Websocket connection between the NVR UI process and the DSP process, so that the video area can be overlaid in the display interface of the embedded browser, and the decoded video stream can be played.
[0152] Exemplarily, the NVR may obtain the current smart rule frame parameters of the IPC, display the corresponding smart rule frame in the video preview screen of the IPC, and modify the smart rule frame parameters according to the detected configuration instructions.
[0153] Exemplarily, when the NVR does not obtain the current smart rule frame parameters of the IPC, the smart rule frame can be drawn on the video preview screen of the IPC.
[0154] Exemplarily, the smart rule box does not belong to the drawing content of the browser. It is drawn or modified by the UI process of the NVR according to the detected smart rule box parameter configuration instructions and displayed in the video preview screen of the IPC.
[0155] For example, when a user exits the smart event defense configuration page, the Websocket protocol will be removed with instructions. The Websocket connection will always exist and will not be destroyed when entering the browser mode. However, the application and release of decoding resources and display resources corresponding to the video area are accompanied by user switching, that is, entering the smart event defense configuration interface, applying for decoding resources and display resources corresponding to the video area; exiting the smart event defense configuration interface, releasing decoding resources and display resources corresponding to the video area.
[0156] 4. Decoding process
[0157] Considering the effectiveness and low cost of NVR device memory usage, two usage scenarios are designed for normal mode and browser mode: in normal mode, NVR can support preview and playback of multiple channels, and in browser mode, it supports single-channel IPC preview for video-related configuration.
[0158] When the video preview screen needs to be displayed in browser mode, the embedded browser process initiates a request to obtain a video area for displaying the video preview screen. The UI process of the NVR needs to send the decoding channel parameters to the DSP process, and the DSP process decodes the currently configured IPC channel and plays the decoded video stream in the video area.
[0159] Exemplarily, when the NVR is in browser mode, the decoding memory of the DSP process can be used by the embedded browser process. When the embedded browser starts, it needs to borrow memory from the DSP process. The current rendering part of the memory can be borrowed from the DSP process. When borrowing memory, the NVR UI process establishes an inter-process connection with the DSP process to obtain it. When the embedded browser process exits, the borrowed memory is released and returns to the normal menu interaction page (i.e., enters normal mode).
[0160] like Figure 6 As shown, a mutually exclusive scheme is designed for the decoding interaction process: first, when entering the browser mode, when the dynamic library (the resource library that the browser depends on) is loaded, the dynamic library that the embedded browser process depends on is loaded into the memory through the hard disk (HDD), that is, in the normal mode, the dynamic library that the embedded browser process depends on is saved in the hard disk, eliminating the dynamic library from occupying memory space when it is not in use.
[0161] When the NVR runs an embedded browser, the NVR's UI process can borrow memory from the DSP process for the embedded browser process to store web page rendering data and for decoding channel resource application.
[0162] In addition, the memory mutual exclusion scheme of the decoding interaction process further expands the configuration specification of IPC. When the NVR is in normal mode, the decoding resources occupied by the browser mode are empty; when the NVR is in browser mode, the decoding resources occupied by the normal mode are empty.
[0163] Due to the dynamic nature of browser configuration, different IP addresses can be selected to access the IPC Web page. Therefore, users can also select IPCs that are not in the NVR's access list (IPCs that can be configured and managed in NVR normal mode) for configuration.
[0164] like Figure 7 As shown, the IPC configuration can be accessed through an explicit search list extension.
[0165] 5. Overall effect display
[0166] For configuration of smart event arming of embedded browser, please refer to Fig. 8A and 8D When the user enters the intelligent event deployment configuration interface in browser mode, the Fig. 8A The interface shown.
[0167] like Fig. 8A As shown, the intelligent event arming configuration interface may include an "event type" function button, a "arming area" function button, a "arming time" function button, and a "linkage mode" function button.
[0168] The user clicks the "Event Type" function button to configure the event type of intelligent event deployment, that is, to configure what type of intelligent event the IPC needs to alarm for, such as motion detection, occlusion alarm, etc.
[0169] The user clicks the "Defense Area" function button to configure the defense area (i.e. the above-mentioned intelligent rule box parameter configuration), that is, configure which area the IPC performs intelligent event detection on.
[0170] The user clicks the "Arm Time" function button to configure the arm time, that is, to configure the time at which the IPC performs intelligent event detection.
[0171] The user clicks the "Linkage Mode" function button to configure the linkage mode, that is, to configure how the IPC will be linked when a specific intelligent event is detected, such as image acquisition.
[0172] For example, Fig.8D As shown, when the user clicks the "Arm Area" function button in the intelligent event arming configuration interface, the video control device can be triggered to switch the display interface of the embedded browser to the arming area configuration interface, and its schematic diagram can be shown as follows Fig.8D shown.
[0173] like Fig.8D As shown, the NVR can overlay the video preview screen of the IPC to be configured in the blank area of the display interface of the embedded browser, and display the current smart rule box of the IPC (if any) in the video preview screen. The user can modify the position and size of the smart rule box (that is, modify the position and size of the deployment area).
[0174] When the current smart rule box of the IPC is not obtained, the user can draw a smart rule box in the video preview screen of the IPC. The NVR can determine the corresponding smart rule box parameters based on the smart rule box drawn by the user, and send the corresponding smart event deployment configuration instructions to the IPC.
[0175] The method provided by the present application is described above. The device provided by the present application is described below:
[0176] See also Fig. 9 , is a structural diagram of a device configuration apparatus provided in an embodiment of the present application, such as Fig. 9 As shown, the device configuration device may include:
[0177] A detection unit 910, used to detect control instructions;
[0178] The running unit 920 is used to run the embedded browser when the detection unit 910 detects a first control instruction; wherein the first control instruction is used to control the video control device to enter a browser mode;
[0179] The configuration unit 930 is used to access the Web page of the device to be configured through the embedded browser and perform configuration operations on the device to be configured, where the device to be configured is a device equipped with a Web service.
[0180] In some embodiments, the device to be configured is a video device to be configured, and the configuration operation includes an intelligent event arming configuration operation;
[0181] The configuration unit 930 performs intelligent event deployment configuration operations on the device to be configured, including:
[0182] When the detection unit 910 detects the second control instruction, the display interface of the embedded browser is switched to the intelligent event deployment configuration interface;
[0183] According to the configuration instruction detected by the detection unit 910 through the intelligent event arming configuration interface, the corresponding intelligent event arming configuration instruction is issued to the video device to be configured, so that the video device to be configured performs the intelligent event arming configuration operation according to the received intelligent event arming configuration instruction;
[0184] The intelligent event deployment configuration operation includes one or more of the following:
[0185] Event type configuration, deployment area configuration, deployment time configuration and linkage mode configuration.
[0186] In some embodiments, the configuration instructions include deployment area configuration instructions;
[0187] The configuration unit 930 is further configured to overlay and display a video area at a designated position of the display interface of the embedded browser, and to play the decoded bit stream of the video device to be configured in the video area;
[0188] The configuration unit 930 sends the corresponding intelligent event deployment configuration instruction to the video device to be configured according to the configuration instruction detected by the detection unit through the intelligent event deployment configuration interface, including:
[0189] According to the intelligent rule frame parameter configuration instruction detected by the detection unit in the video area, the corresponding intelligent event deployment area configuration instruction is sent to the video device to be configured, so that the video device to be configured performs the intelligent event deployment area configuration operation according to the received intelligent event deployment area configuration instruction.
[0190] In some embodiments, the configuration unit 930 overlays and displays a video area at a specified position of the display interface of the embedded browser, and plays the decoded bitstream of the video device to be configured in the video area, including:
[0191] Control the embedded browser process to send a video area overlay request to the UI process of the video control device through a websocket connection between the embedded browser process and the user interface UI process of the video control device, so that the UI process of the video control device allocates a matching video area to the embedded browser process according to the video area overlay position and the video area size carried in the video area overlay request;
[0192] And, controlling the UI process of the video control device to send a decoding resource application request to the decoding process, so that the decoding process allocates decoding resources to the embedded browser process according to the channel parameters of the video device to be configured carried in the decoding resource application request;
[0193] The video control device UI process is controlled to overlay and display the video area at a specified position of the display interface of the embedded browser, and to play the decoded bit stream of the video device to be configured in the video area; the specified position is a position that matches the overlay position of the video area.
[0194] In some embodiments, the configuration unit 930 is also used to release the display resources corresponding to the video area and the decoding resources corresponding to the video device to be configured when the detection unit 910 detects a third control instruction; wherein the third control instruction is used to control the video control device to exit the intelligent event deployment configuration interface.
[0195] In some embodiments, the configuration unit 930 is further used to obtain the current intelligent rule frame parameters of the video device to be configured;
[0196] When the current smart rule frame parameters of the video device to be configured are obtained, the smart rule frame is superimposed and displayed at the corresponding position of the video area according to the current smart rule frame parameters of the video device to be configured;
[0197] The detection unit 910 detects the intelligent rule frame parameter configuration instruction in the video area, including:
[0198] A modification instruction for current intelligent rule frame parameters of the video device to be configured is detected in the video area.
[0199] In some embodiments, the detection unit 910 is further configured to detect, in the video area, a smart rule frame drawing instruction for the video device to be configured when the current smart frame rule parameters of the video device to be configured are not obtained.
[0200] In some embodiments, decoding resources in regular mode and browser mode are mutually exclusive;
[0201] When the video control device is in the normal mode, the decoding resource occupancy of the browser mode is empty;
[0202] When the video control device is in the browser mode, the decoding resource occupancy of the normal mode is empty.
[0203] In some embodiments, the configuration unit 930 accesses a web page of a device to be configured through the embedded browser, including:
[0204] According to the address information of the device to be configured, access the Web page of the device to be configured; wherein the device to be configured is a device outside the access list of the video control device, and the address information of the device to be configured is obtained by searching.
[0205] In some embodiments, the configuration unit 930 accesses a web page of a device to be configured through the embedded browser, including:
[0206] When it is determined that the web page needs to be updated, a first bitmap memory is created according to the size of the web page, and web page rendering image data corresponding to the current web page is stored in the first bitmap memory;
[0207] Traversing the webpage rendering image data in the first bitmap memory, and updating the data in the area that needs to be updated;
[0208] Generating a canvas of the same size in a second bitmap memory according to the size of the Web page;
[0209] The data in the first bitmap memory is copied to the canvas, and the web page is refreshed according to the web page rendering image data in the canvas.
[0210] An embodiment of the present application provides an electronic device, including a processor and a memory, wherein the memory stores machine executable instructions that can be executed by the processor, and the processor is used to execute the machine executable instructions to implement the device configuration method described above.
[0211] See also Fig.10, is a schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present application. The electronic device may include a processor 1001 and a memory 1002 storing machine executable instructions. The processor 1001 and the memory 1002 may communicate via a system bus 1003. Furthermore, by reading and executing the machine executable instructions corresponding to the device configuration logic in the memory 1002, the processor 1001 may execute the device configuration method described above.
[0212] The memory 1002 mentioned herein may be any electronic, magnetic, optical or other physical storage device that may contain or store information, such as executable instructions, data, etc. For example, the machine-readable storage medium may be: RAM (RadomAccess Memory), volatile memory, non-volatile memory, flash memory, storage drive (such as hard disk drive), solid state drive, any type of storage disk (such as optical disk, DVD, etc.), or similar storage medium, or a combination thereof.
[0213] In some embodiments, a machine-readable storage medium is also provided. Fig.10 The memory 1002 in the machine readable storage medium stores machine executable instructions, and the machine executable instructions implement the device configuration method described above when executed by the processor. For example, the storage medium can be ROM, RAM, CD-ROM, magnetic tape, floppy disk, optical data storage device, etc.
[0214] The present application also provides a computer program, which is stored in a readable storage medium, such as Fig.10 The memory 1002 in the memory, and when the processor executes the computer program, it prompts the processor 1001 to execute the device configuration method described above.
[0215] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.
[0216] The above description is only a preferred embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application shall be included in the scope of protection of the present application.
Claims
1. A device configuration method, characterized in that: The method comprises: Run the embedded browser; The Web page of the device to be configured is accessed through the embedded browser, wherein the Web page of the device to be configured is accessed according to the address information of the device to be configured.
2. The method according to claim 1, characterized in that A video area is superimposed and displayed at a designated position of the display interface of the embedded browser, and the video area is used to play the decoded code stream of the video device to be configured.
3. The method according to claim 2, characterized in that The layer for playing the code stream of the video device to be configured is the video layer under the layer corresponding to the embedded browser.
4. The method according to claim 3, characterized in that Overlaying and displaying a video area in the display interface of an embedded browser includes: setting a specified transparency for an area in a layer corresponding to the embedded browser that matches the video area overlay position, so that when the decoded video stream is played in an area in the video layer that matches the video area overlay position, the video preview screen is visible to the user.
5. The method according to any one of claims 2 to 4, characterized in that: The smart rule box is displayed on the graphic component layer, and the smart rule box is obtained based on the user's configuration of the smart rule box on the video preview screen. The graphic component layer is superimposed and displayed on the web page canvas layer, and the web page canvas layer is the layer corresponding to the embedded browser.
6. The method according to claim 1, characterized in that The step of accessing the web page of the device to be configured through the embedded browser, wherein accessing the web page of the device to be configured according to the address information of the device to be configured comprises: According to the address information of the device to be configured, access the Web page of the device to be configured; wherein the device to be configured is a device outside the access list of the video control device, and the address information of the device to be configured is obtained by searching.
7. The method according to claim 1, characterized in that When a first control instruction is detected, the embedded browser is run; wherein the first control instruction is used to control the video control device to enter a browser mode, wherein the browser mode refers to a mode when the embedded browser is run; and in the browser mode, configuration operations are performed on the device to be configured.
Citation Information
Patent Citations
Intelligent network video monitoring system based on browser and working method thereof
CN102547231A
Loading method and loading device for abnormal pages in browser and client side
CN103324735A
Method and device for generating webpage
CN104951287A
Drawing method and device based on multi-process browser, equipment and storage medium
CN110083348A
Interface display method and device, electronic equipment and storage medium
CN111752661A