Camera equipment control method and device, electronic equipment and computer readable medium

By setting up packet capture control module and deploying filter module in the kernel space in the camera device, replacing packet capture tool for data processing, the problem of device memory pressure and remote detection is solved, remote packet capture and maintenance is realized, and equipment damage and performance degradation is avoided .

CN119172524AActive Publication Date: 2024-12-20SHENZHEN ADDX INNOVATION TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411185375.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-27
Publication Date
2024-12-20
Estimated Expiration
2044-08-27

AI Technical Summary

Technical Problem

During remote detection and maintenance of existing camera equipment, due to the complex functions of packet capture tools and excessive memory usage, the equipment is difficult to support the implantation and operation of packet capture tools, which leads to network problems and equipment damage.

Method used

Set up packet capture control module, file packaging module and file transfer module at the application layer of the camera device, and deploy packet capture control nodes, data filter modules and packet transmitter and receive filters in the device kernel space. These modules replace packet capture tools from the network layer Extract data, perform data filtering and packaging processing, generate encrypted files and upload them to the server for remote detection and maintenance.

Benefits of technology

It realizes remote packet capture and detection of camera equipment on the basis of reducing memory usage, avoids equipment damage, improves the operating speed and stability of the equipment, and protects the privacy of user data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119172524A_ABST
    Figure CN119172524A_ABST
Patent Text Reader

Abstract

The embodiment of the invention discloses a camera equipment control method and device, electronic equipment and a computer readable medium. A specific embodiment of the method comprises the following steps: controlling a shooting module of camera equipment to shoot a video, and controlling a receiving and sending packet filter to start a packet capture operation through a bridging link deployed on a packet capture control node in advance to obtain a video data packet; filtering the video data packet through a data filtering module to obtain a filtered video data packet, and storing the filtered video data packet into a data packet cache queue; reading the video data packet from the data packet cache queue through a packet capture control module, and writing the read video data packet into a file packaging module; carrying out packaging processing on the received video data packet through a file packaging module to obtain a video packaging file; and uploading the video packaging file to a server through a file transmission module. According to the embodiment, memory occupation can be reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] Embodiments of the present disclosure relate to the field of computer technology, and in particular to a camera device control method, apparatus, electronic device, and computer-readable medium. Background Art

[0002] In order for the user's camera to work properly and perform operations such as live broadcasting and intercom, the essence is to allow the control program running in the camera to connect normally to the control application in the manufacturer's server. Therefore, the essence of network applications is actually the communication between applications between devices. In the real world, the distance between the device and the server is often very far, and it needs to go through many relay nodes (such as Figure 1 As shown). For wireless camera devices, if they want to communicate with the server, the data packets sent out need to go through: wireless routers, operator access points, backbone networks, and peer operator access points before they can finally reach the server. And it is not just outside the device, it needs to go through multiple nodes. For the application inside the device, if it wants to send data correctly, it also needs to go through three steps: transport layer packaging, network layer packaging, and access layer packaging before the data packet can be prepared and sent out. In the receiving stage, the data can only be processed in the reverse order of the three steps, and the application can be informed that a new valid data has arrived. In the above process, if there is an error in any link, the device will have network problems and cannot be used normally. And when this problem occurs in the actual user network environment, it is even more difficult to determine the actual cause of the error. The commonly used method is: remotely control the client device to use the tcpdump (command line operation) tool to capture packets. Then upload (for example, through a post request) the captured packet file to the debugging server. Realize the capture, filtering, and analysis of the traffic in the device to facilitate the control of the camera device.

[0003] However, in practice, it is found that when the above method is used to control the camera device, the following technical problems often occur:

[0004] First, the packet capture tool has complex functions, which makes its program size too large. For low-cost devices such as cameras (such as those with less memory resources), it is difficult for the hardware to support it, and it is also difficult to embed the packet capture tool in it for operation. Secondly, the operation of the packet capture tool requires the kernel of the user's device to have a network filtering algorithm function. For network camera devices, since there is generally no such requirement in their original functions, this function is not included in the device. As a result, it is difficult to perform remote detection of the camera, and it is difficult to perform corresponding maintenance when the camera has not been detected for a long time, resulting in damage to the camera device;

[0005] Second, the packet capture tool is a complete running program. Even if it only performs simple packet capture functions, it requires a large amount of memory to complete operations such as caching and organizing data formats. If the packet capture tool is deployed to capture, filter, and analyze the traffic within the device, the memory pressure of the camera device will be increased. The increase in memory pressure will lead to a decrease in the overall system operation speed and instability.

[0006] The above information disclosed in this Background section is only for enhancement of understanding of the background of the inventive concept and therefore it may contain information that does not form the prior art that is already known in this country to a person of ordinary skill in the art. Summary of the invention

[0007] The content of this disclosure is used to introduce concepts in a brief form, which will be described in detail in the detailed implementation section below. The content of this disclosure is not intended to identify the key features or essential features of the technical solution claimed for protection, nor is it intended to limit the scope of the technical solution claimed for protection.

[0008] Some embodiments of the present disclosure propose a camera device control method, apparatus, electronic device, and computer-readable medium to solve one or more of the technical problems mentioned in the above background technology section.

[0009] In a first aspect, some embodiments of the present disclosure provide a camera device control method, the method comprising: in response to a packet capture control module receiving a packet capture instruction sent by a server, controlling a shooting module of the camera device to shoot a video, and controlling the transceiver packet filter to start a packet capture operation through a bridge link pre-deployed on the packet capture control node to obtain a video data packet, wherein the packet capture control module is deployed at an application layer of the camera device, and the transceiver packet filter is established between an access layer and a network layer of a kernel space of the device; filtering the video data packet through the data filtering module to obtain a filtered video data packet, and storing the filtered video data packet into the data packet cache queue; reading the video data packet from the data packet cache queue through the packet capture control module, and writing the read video data packet into the file packaging module; packaging the received video data packet through the file packaging module to obtain a video packaging file, wherein the video packaging file is an encrypted file; uploading the video packaging file to the server through the file transmission module, wherein the server determines whether the camera device has a fault problem through the video packaging file without decrypting the video packaging file.

[0010] In a second aspect, some embodiments of the present disclosure provide a camera device control device, the device comprising: a control shooting unit, configured to control the shooting module of the camera device to shoot video in response to the packet capture control module receiving the packet capture instruction sent by the server, and to control the above-mentioned transceiver filter to start the packet capture operation through a bridge link pre-deployed on the above-mentioned packet capture control node to obtain a video data packet, wherein the above-mentioned packet capture control module is deployed at the application layer of the camera device, and the above-mentioned transceiver filter is established between the access layer and the network layer of the device kernel space; a filtering processing unit, configured to filter the above-mentioned video data packet through the above-mentioned data filtering module to obtain a filtered video data packet, and to filter the filtered video data packet through the above-mentioned data filtering module. The filtered video data packet is stored in the above-mentioned data packet cache queue; the reading and writing unit is configured to read the video data packet from the above-mentioned data packet cache queue through the above-mentioned packet capture control module, and write the read video data packet into the above-mentioned file packaging module; the packaging processing unit is configured to package the received video data packet through the above-mentioned file packaging module to obtain a video packaging file, wherein the above-mentioned video packaging file is an encrypted file; the uploading unit is configured to upload the above-mentioned video packaging file to the above-mentioned server through the above-mentioned file transmission module, wherein the above-mentioned server does not decrypt the above-mentioned video packaging file, and the above-mentioned server determines whether the above-mentioned camera device has a fault problem through the video packaging file.

[0011] In a third aspect, some embodiments of the present disclosure provide an electronic device comprising: one or more processors; a storage device on which one or more programs are stored, and when the one or more programs are executed by the one or more processors, the one or more processors implement the method described in any implementation manner of the above-mentioned first aspect.

[0012] In a fourth aspect, some embodiments of the present disclosure provide a computer-readable medium having a computer program stored thereon, wherein when the program is executed by a processor, the method described in any implementation manner of the above-mentioned first aspect is implemented.

[0013] The above-mentioned embodiments of the present disclosure have the following beneficial effects: through the camera device control method of some embodiments of the present disclosure, the camera can be remotely detected to avoid damage to the camera device due to the lack of corresponding maintenance in time. Specifically, the reason why it is difficult to perform remote detection of the camera and control the camera is that the packet capture tool has complex functions, which makes its program volume too large, and for low-cost devices such as cameras (such as less memory resources), it is difficult for the hardware to support it, and it is also difficult to implant the packet capture tool into it for operation. Secondly, the operation of the packet capture tool requires the kernel of the user device to have a network filtering algorithm function, and for network camera devices, since there is generally no such requirement in its original functions, this function is not included in the device. Based on this, the camera device control method of some embodiments of the present disclosure, by setting a packet capture control module, a file packaging module and a file transfer module in the application layer of the camera device, so as to facilitate the sending and receiving of information such as data and instructions. Then, by deploying a packet capture control node, a data filtering module, a packet receiving and sending filter and a data packet cache queue in the device kernel space, it can be used to replace the packet capture tool to extract the required data from the network layer of the camera to the packet capture control module. Thus, the camera data can be provided to the server without deploying the packet capture tool. Specifically, first, in response to the packet capture control module receiving the packet capture instruction sent by the server, the shooting module of the camera device is controlled to shoot the video, and the above-mentioned transceiver filter is controlled to start the packet capture operation through the bridge link pre-deployed on the above-mentioned packet capture control node to obtain the video data packet. Among them, the above-mentioned packet capture control module is deployed in the application layer of the camera device, and the above-mentioned transceiver filter is established between the access layer and the network layer of the device kernel space. Then, the above-mentioned video data packet is filtered by the above-mentioned data filtering module to obtain the filtered video data packet, and the filtered video data packet is stored in the above-mentioned data packet cache queue. Afterwards, the video data packet is read from the above-mentioned data packet cache queue by the above-mentioned packet capture control module, and the read video data packet is written into the above-mentioned file packaging module. Then, the received video data packet is packaged by the above-mentioned file packaging module to obtain a video package file. Among them, the above-mentioned video package file is an encrypted file. Finally, the above-mentioned video package file is uploaded to the above-mentioned server through the above-mentioned file transfer module. Among them, the server determines whether the camera device has a fault problem through the video package file without decrypting the video package file. Here, because multiple modules are directly deployed in the kernel space, only a low code volume and memory usage can be occupied. Therefore, on the basis of reducing memory usage, the privacy of user data can be protected and the remote packet capture function of the camera device can be realized. At the same time, the camera device can also be remotely detected for maintenance of corresponding problems. In addition, damage to the camera device is avoided. BRIEF DESCRIPTION OF THE DRAWINGS

[0014] The above and other features, advantages and aspects of the embodiments of the present disclosure will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. Throughout the accompanying drawings, the same or similar reference numerals represent the same or similar elements. It should be understood that the drawings are schematic and that components and elements are not necessarily drawn to scale.

[0015] Figure 1 It is a schematic diagram of an architecture for remote packet capture in a common camera device corresponding to the camera device control method disclosed in the present invention;

[0016] Figure 2 is a flow chart of some embodiments of the camera device control method according to the present disclosure;

[0017] Figure 3 is a schematic diagram of a camera device architecture according to some embodiments of the camera device control method disclosed herein;

[0018] Figure 4 is a schematic structural diagram of some embodiments of the camera device control apparatus according to the present disclosure;

[0019] Figure 5 It is a schematic diagram of the structure of an electronic device suitable for implementing some embodiments of the present disclosure. DETAILED DESCRIPTION

[0020] Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although certain embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as being limited to the embodiments set forth herein. On the contrary, these embodiments are provided to provide a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are only for exemplary purposes and are not intended to limit the scope of protection of the present disclosure.

[0021] It should also be noted that, for ease of description, only the parts related to the invention are shown in the drawings. In the absence of conflict, the embodiments and features in the embodiments of the present disclosure can be combined with each other.

[0022] It should be noted that the concepts such as "first" and "second" mentioned in the present disclosure are only used to distinguish different devices, modules or units, and are not used to limit the order or interdependence of the functions performed by these devices, modules or units.

[0023] It should be noted that the modifications of "one" and "plurality" mentioned in the present disclosure are illustrative rather than restrictive, and those skilled in the art should understand that unless otherwise clearly indicated in the context, it should be understood as "one or more".

[0024] The names of the messages or information exchanged between multiple devices in the embodiments of the present disclosure are only used for illustrative purposes and are not used to limit the scope of these messages or information.

[0025] With regard to the collection, storage, and use of user personal information (such as data captured by a user's camera) involved in this disclosure, before performing the corresponding operations, the relevant organizations or individuals shall fulfill their obligations, including conducting personal information security impact assessments, fulfilling the obligation to inform the personal information subject, and obtaining the authorization and consent of the personal information subject in advance.

[0026] The present disclosure will be described in detail below with reference to the accompanying drawings and in conjunction with embodiments.

[0027] Figure 2 FIG. 2 shows a process 200 of some embodiments of the camera device control method according to the present disclosure. Figure 3 The camera device shown may include: a shooting module (not shown in the figure), a packet capture control module ①, a file packaging module ⑥, a file transfer module ⑦ and a device kernel space. The above-mentioned device kernel space may be configured with the following modules: a packet capture control node ②, a data filtering module ③, a transceiver filter ④ and a data packet cache queue ⑤. Here, the kernel space may be a kernel of a lightweight Linux system pre-deployed in the camera device. The shooting module may be located at the application layer for shooting images and videos. The packet capture control module may be used to receive instructions from the server and obtain data from the communication connection with the kernel space. The file packaging module is used to package the acquired data. The file transfer module is used to upload the packaged data packet to the server under the instruction of the packet capture program module. The packet capture control node (for example, through the debugfs tool) is used to bridge the communication between the packet capture control module and each module in the kernel space. The data filtering module may be used to select the required data. The transceiver filter may be used to obtain the video data captured by the camera device or the data of the camera device from the network layer. The data packet cache queue may be used to cache data packets.

[0028] The camera device control method comprises the following steps:

[0029] Step 201, in response to the packet capture control module receiving the packet capture instruction sent by the server, controls the shooting module of the camera device to shoot the video, and controls the packet transceiver filter to start the packet capture operation through the bridge link pre-deployed on the above-mentioned packet capture control node to obtain the video data packet.

[0030] In some embodiments, the execution subject of the camera device control method can control the camera device's shooting module to shoot a video in response to the packet capture control module receiving the packet capture instruction sent by the server, and control the above-mentioned transceiver filter to start the packet capture operation through the bridge link pre-deployed on the above-mentioned packet capture control node to obtain the video data packet. The above-mentioned packet capture control module is deployed in the application layer of the camera device, and the above-mentioned transceiver filter is established between the access layer and the network layer of the device kernel space.

[0031] In practice, the server may generate a packet capture instruction after receiving the shooting authorization instruction and the camera device network detection instruction from the user through the user terminal. During the video shooting process, the user may also be reminded to pay attention to user privacy. The final video file is not decrypted, and only the setting parameters during shooting are processed.

[0032] In some optional implementations of some embodiments, the execution subject controls the packet transceiver filter to start a packet capture operation to obtain a video data packet, which may include the following steps:

[0033] The packet transceiver filter is controlled to obtain the captured video data packet from the network layer of the device kernel space. After the shooting module of the camera device is controlled to shoot the video, the video data can be transmitted through the network layer of the device kernel space. The packet transceiver filter establishes a communication link with the network layer to obtain the video data packet.

[0034] Step 202: Filter the video data packet through the data filtering module to obtain a filtered video data packet, and store the filtered video data packet into a data packet cache queue.

[0035] In some embodiments, the execution subject may filter the video data packet through the data filtering module to obtain a filtered video data packet, and store the filtered video data packet into the data packet cache queue.

[0036] In some optional implementations of some embodiments, the packet capture instruction may include a packet capture address and a port number. And the execution subject filters the video data packet to obtain a filtered video data packet, which may include the following steps:

[0037] The first step is to select the video data corresponding to the above-mentioned packet capture address and port number from the above-mentioned video data packet to obtain a selected video data group. Among them, the packet capture address can be the network address of the data to be captured. The network layer in the camera device can correspond to different network addresses and port numbers for different data. Thus, the required video data can be selected by the packet capture address and port number. In addition, in addition to the video data, data from other camera devices can also be selected, for example, file format identification, timestamp accuracy value, data packet length, link type, exposure, resolution, focal length, shooting frame number, focus mode identification, white balance value, compression format and other data. The second step is to copy the selected video data in the selected video data group, and merge the copied video data into a filtered video data packet.

[0038] Step 203: Read the video data packet from the data packet buffer queue through the packet capture control module, and write the read video data packet into the file packaging module.

[0039] In some embodiments, the execution subject may read the video data packet from the data packet cache queue through the packet capture control module, and write the read video data packet into the file packaging module.

[0040] Step 204: The received video data packets are packaged by a file packaging module to obtain a video package file.

[0041] In some embodiments, the execution subject may package the received video data packets through the file packaging module to obtain a video packaging file.

[0042] In some optional implementations of some embodiments, the execution subject packages the received video data packets through the file packaging module to obtain a video packaging file, which may include the following steps:

[0043] The first step is to extract the overall information of the video data packet. The overall information includes at least one of the following: file format identification, timestamp precision value, data packet length, link type. Secondly, the overall information can be extracted from the video data packet according to the preset index position.

[0044] In the second step, the timestamp sequence corresponding to the above video data, the length included in the data and the actual length information are determined as the data packet header.

[0045] The third step is to format-code the video data of each video data packet to obtain coded data packet data, wherein the format coding may be coded according to a network protocol format.

[0046] The fourth step is to combine the above-mentioned overall information, the above-mentioned data packet header and the above-mentioned encoded data packet data into a video package file. The format of the video package file can be a pcap (packet capture) file format.

[0047] Step 205: Upload the video package file to the server through the file transfer module.

[0048] In some embodiments, the execution subject may upload the video package file to the server through the file transfer module, wherein the server may determine whether the camera device has a fault through the video package file without decrypting the video package file.

[0049] Optionally, the overall information of the video package file may also include the shooting data of the camera device when shooting the video. The shooting data may also include but is not limited to at least one of the following: exposure, resolution, focal length, shooting frame number, focus mode identifier, white balance value, compression format. And the server may determine whether the camera device has a fault problem by the following steps:

[0050] The first step is, in response to the server not receiving the video package file, determining that the camera device has a network connection failure, and sending connection failure information to the user terminal corresponding to the camera device so that the user can reconnect to the network.

[0051] The second step is, in response to determining that the server has received the video package file, obtaining the voltage value, resistance value and current value of each electrical component in the above-mentioned camera device, and obtaining a voltage value set, a resistance value set and a current value set. Among them, the electrical components may include but are not limited to at least one of the following: power supply components, video signal lines, camera components, image sensors, lenses, storage devices, power adapters, etc. The voltage value set may include continuous voltage values ​​of multiple electrical components over a period of time. The resistance value set may include continuous resistance values ​​of multiple electrical components over a period of time. The current value set may include continuous current values ​​of multiple electrical components over a period of time. Secondly, the video package file received by the server can represent the network connection.

[0052] The third step is, in response to determining that there is a voltage value, resistance value or current value greater than the corresponding preset range in the above voltage value set, the above resistance value set and the above current value set, locating the corresponding electrical component as the target electrical component, and sending the component information of the above target electrical component to the maintenance terminal for camera equipment maintenance. Among them, the presence of a voltage value, resistance value or current value greater than the corresponding preset range in the above voltage value set, the above resistance value set and the above current value set can indicate that there is an abnormality in the circuit of the electrical component. Therefore, the maintenance personnel of the maintenance terminal can be notified to perform camera maintenance.

[0053] In the fourth step, in response to determining that there is no voltage value, resistance value or current value greater than the corresponding preset range in the voltage value set, the resistance value set and the current value set, it is determined whether the compression format and focus mode identifier included in the selected video data are the preset compression format and the preset focus mode identifier. The fact that there is no voltage value, resistance value or current value greater than the corresponding preset range in the voltage value set, the resistance value set and the current value set can indicate that there is no circuit fault in each electrical component.

[0054] In step 5, in response to the above, it is determined whether the exposure, resolution, focal length, shooting frame number, and white balance value included in the selected video data are within the corresponding preset range. Here, if the exposure, resolution, focal length, shooting frame number, and white balance value are all within the corresponding preset range, it is determined that the camera device is set up properly.

[0055] In step 6, in response to at least one of the exposure, resolution, focal length, shooting frame number, and white balance value not being within the corresponding preset range, it is determined that the camera device has a setting fault, and fault information of the setting fault is sent to the user terminal or the camera device is initialized. The camera settings can be readjusted through initialization.

[0056] Optionally, the following steps may also be included:

[0057] In the first step, in response to determining that the server has received the video package file, video data packets of a preset number of frames are selected from the video package file to obtain a sequence of continuous frame video data packets.

[0058] The second step is to perform delay detection on the network of the camera device according to the above-mentioned continuous frame video data packet sequence to generate delay detection information that characterizes network delay or network normality. Among them, the delay detection is: using the timestamp corresponding to each continuous frame video data in the above-mentioned continuous frame video data packet sequence to determine the network delay duration. Specifically, first, the difference between the timestamp corresponding to each continuous frame data packet and the timestamp of the video data received by the server can be determined as the time difference. Then, the average value of each time difference can be determined as the time difference mean. Finally, the difference between the time difference mean and the preset duration can be determined as the network delay duration.

[0059] The third step is to adjust the frame rate of the camera device shooting and the bit rate of the file transfer module during the transmission process in response to determining that the delay duration included in the delay detection information is greater than the preset duration, so as to be used for data transmission during the camera device shooting process. Among them, the delay duration greater than the preset duration can indicate that there is a large delay in the network where the camera device exists. Therefore, the size of the transmitted file and the bandwidth occupied can be reduced by reducing the frame rate and the transmission bit rate. Thereby improving the transmission efficiency and reducing the delay.

[0060] The above steps 204-205 and related contents are an inventive point of the embodiment of the present disclosure, which solves the second technical problem mentioned in the background technology: "The packet capture tool is a complete running program. Even if it only performs a simple packet capture function, it also requires a large amount of memory to complete operations such as caching and organizing data formats. If the device traffic is captured, filtered, and analyzed by deploying the packet capture tool, the memory pressure of the camera device is increased, and the increase in memory pressure will cause the overall system operation speed to decrease and become unstable." The factors that cause the overall operation speed of the camera device system to decrease and become unstable are often as follows: The packet capture tool is a complete running program. Even if it only performs a simple packet capture function, it also requires a large amount of memory to complete operations such as caching and organizing data formats. If the device traffic is captured, filtered, and analyzed by deploying the packet capture tool, the memory pressure of the camera device is increased. If the above factors are solved, the memory pressure of the camera device can be reduced, and the operation speed and stability of the camera device can be improved. In order to achieve this effect, first of all, there is no need to install the packet capture tool, but the above modules are used to replace the packet capture tool to perform the packet capture operation, thereby reducing the occupation of memory resources. Secondly, by extracting the overall information of the video data, it can be used to capture the data shot by the camera device without decoding the video data on the server side. As a result, the server side can use the shooting data to remotely detect the camera device to determine whether there are abnormal problems such as hardware abnormalities, software abnormalities, network abnormalities, and setting abnormalities. Therefore, notifications can be made or the parameters of the camera device can be adjusted in a timely manner according to the abnormal problems. Furthermore, the memory pressure of the camera device can be reduced, and the operating speed and stability of the camera device can also be improved.

[0061] Optionally, the execution subject may also control the packet receiving filter to terminate the packet capturing operation and clear the data cache of the file transfer module and the device kernel space through the bridge link in response to the packet capturing control module receiving the packet capturing termination instruction issued by the server.

[0062] The above-mentioned embodiments of the present disclosure have the following beneficial effects: through the camera device control method of some embodiments of the present disclosure, the camera can be remotely detected to avoid damage to the camera device due to the lack of corresponding maintenance in time. Specifically, the reason why it is difficult to perform remote detection of the camera and control the camera is that the packet capture tool has complex functions, which makes its program volume too large, and for low-cost devices such as cameras (such as less memory resources), it is difficult for the hardware to support it, and it is also difficult to implant the packet capture tool into it for operation. Secondly, the operation of the packet capture tool requires the kernel of the user device to have a network filtering algorithm function, and for network camera devices, since there is generally no such requirement in its original functions, this function is not included in the device. Based on this, the camera device control method of some embodiments of the present disclosure, by setting a packet capture control module, a file packaging module and a file transfer module in the application layer of the camera device, so as to facilitate the sending and receiving of information such as data and instructions. Then, by deploying a packet capture control node, a data filtering module, a packet receiving and sending filter and a data packet cache queue in the device kernel space, it can be used to replace the packet capture tool to extract the required data from the network layer of the camera to the packet capture control module. Thus, the camera data can be provided to the server without deploying the packet capture tool. Specifically, first, in response to the packet capture control module receiving the packet capture instruction sent by the server, the shooting module of the camera device is controlled to shoot the video, and the above-mentioned transceiver filter is controlled to start the packet capture operation through the bridge link pre-deployed on the above-mentioned packet capture control node to obtain the video data packet. Among them, the above-mentioned packet capture control module is deployed in the application layer of the camera device, and the above-mentioned transceiver filter is established between the access layer and the network layer of the device kernel space. Then, the above-mentioned video data packet is filtered by the above-mentioned data filtering module to obtain the filtered video data packet, and the filtered video data packet is stored in the above-mentioned data packet cache queue. Afterwards, the video data packet is read from the above-mentioned data packet cache queue by the above-mentioned packet capture control module, and the read video data packet is written into the above-mentioned file packaging module. Then, the received video data packet is packaged by the above-mentioned file packaging module to obtain a video package file. Among them, the above-mentioned video package file is an encrypted file. Finally, the above-mentioned video package file is uploaded to the above-mentioned server through the above-mentioned file transfer module. Among them, the server determines whether the camera device has a fault problem through the video package file without decrypting the video package file. Here, because multiple modules are directly deployed in the kernel space, only a low code volume and memory usage can be occupied. Therefore, on the basis of reducing memory usage, the privacy of user data can be protected and the remote packet capture function of the camera device can be realized. At the same time, the camera device can also be remotely detected for maintenance of corresponding problems. In addition, damage to the camera device is avoided.

[0063] Further references Figure 4 As an implementation of the methods shown in the above figures, the present disclosure provides some embodiments of a camera device control device, and these device embodiments are Figure 1 Corresponding to the method embodiments shown, the device can be specifically applied to various electronic devices.

[0064] like Figure 4 As shown, the camera device control apparatus 400 of some embodiments includes: a control shooting unit 401, a filtering processing unit 402, a reading and writing unit 403, a packaging processing unit 404 and an uploading unit 405. The control shooting unit 401 is configured to control the shooting module of the camera device to shoot a video in response to the packet capture control module receiving the packet capture instruction sent by the server, and to control the above-mentioned transceiver filter to start the packet capture operation through the bridge link pre-deployed on the above-mentioned packet capture control node to obtain a video data packet, wherein the above-mentioned packet capture control module is deployed in the application layer of the camera device, and the above-mentioned transceiver filter is established between the access layer and the network layer of the device kernel space; the filtering processing unit 402 is configured to filter the above-mentioned video data packet through the above-mentioned data filtering module to obtain a filtered video data packet, and store the filtered video data packet in the above-mentioned data packet cache queue. The read and write unit 403 is configured to read the video data packet from the data packet cache queue through the packet capture control module, and write the read video data packet into the file packaging module; the packaging processing unit 404 is configured to package the received video data packet through the file packaging module to obtain a video packaging file, wherein the video packaging file is an encrypted file; the upload unit 405 is configured to upload the video packaging file to the server through the file transmission module, wherein the server does not decrypt the video packaging file, and the server determines whether the camera device has a fault problem through the video packaging file.

[0065] It is understood that the units described in the device 200 are similar to those described in the reference Figure 1 Therefore, the operations, features and beneficial effects described above for the method are also applicable to the device 200 and the units included therein, and will not be described in detail here.

[0066] Reference below Figure 3 , which shows a structural schematic diagram of an electronic device (eg, a computing device) 300 suitable for implementing some embodiments of the present disclosure. Figure 3 The electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.

[0067] like Figure 3As shown, the electronic device 300 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 301, which can perform various appropriate actions and processes according to a program stored in a read-only memory 302 or a program loaded from a storage device 308 into a random access memory 303. Various programs and data required for the operation of the electronic device 300 are also stored in the random access memory 303. The processing device 301, the read-only memory 302, and the random access memory 303 are connected to each other via a bus 304. An input / output interface 305 is also connected to the bus 304.

[0068] Typically, the following devices may be connected to the I / O interface 305: input devices 306 including, for example, a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; output devices 307 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; storage devices 308 including, for example, a magnetic tape, a hard disk, etc.; and communication devices 309. The communication devices 309 may allow the electronic device 300 to communicate with other devices wirelessly or by wire to exchange data. Although Figure 3 The electronic device 300 is shown with various devices, but it should be understood that it is not required to implement or possess all the devices shown. More or fewer devices may be implemented or possessed instead. Figure 3 Each block shown in the figure may represent one device, or may represent multiple devices as required.

[0069] In particular, according to some embodiments of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, some embodiments of the present disclosure include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program contains program code for executing the method shown in the flowchart. In some such embodiments, the computer program can be downloaded and installed from the network through the communication device 309, or installed from the storage device 308, or installed from the read-only memory 302. When the computer program is executed by the processing device 301, the above-mentioned functions defined in the method of some embodiments of the present disclosure are executed.

[0070] It should be noted that the computer-readable medium recorded in some embodiments of the present disclosure may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In some embodiments of the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, device or device. In some embodiments of the present disclosure, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable program code. This propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. The computer readable signal medium may also be any computer readable medium other than a computer readable storage medium, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer readable medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.

[0071] In some embodiments, the client and the server may communicate using any currently known or future developed network protocol such as HTTP (Hyper Text Transfer Protocol), and may be interconnected with any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), an internet (e.g., the Internet), and a peer-to-peer network (e.g., an ad hoc peer-to-peer network), as well as any currently known or future developed network.

[0072] The computer-readable medium may be included in the electronic device, or may exist independently without being incorporated into the electronic device. The computer-readable medium carries one or more programs. When the one or more programs are executed by the electronic device, the electronic device: in response to the packet capture control module receiving the packet capture instruction sent by the server, controls the shooting module of the camera device to shoot the video, and controls the transceiver filter to start the packet capture operation through the bridge link pre-deployed on the packet capture control node to obtain the video data packet, wherein the packet capture control module is deployed in the application layer of the camera device, and the transceiver filter is established between the access layer and the network layer of the device kernel space; the video data packet is filtered by the data filtering module to obtain the filtered video data packet, and the filtered video data packet is stored in the data packet cache queue; the video data packet is read from the data packet cache queue by the packet capture control module, and the read video data packet is written into the file packaging module; the received video data packet is packaged by the file packaging module to obtain a video package file, wherein the video package file is an encrypted file; the video package file is uploaded to the server through the file transmission module, wherein the server determines whether the camera device has a fault problem through the video package file without decrypting the video package file.

[0073] Computer program code for performing the operations of some embodiments of the present disclosure may be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages ​​such as Java, Smalltalk, C++, and conventional procedural programming languages ​​such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0074] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some implementations as replacements, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0075] The units described in some embodiments of the present disclosure may be implemented by software or by hardware. The described units may also be provided in a processor, for example, may be described as: a processor including a control shooting unit, a filtering processing unit, a reading and writing unit, a packaging processing unit and an uploading unit. The names of these units do not constitute limitations on the units themselves in certain circumstances, for example, the control shooting unit may also be described as a "unit that controls the shooting module of a camera device to shoot a video".

[0076] The functions described above herein may be performed at least in part by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), and the like.

[0077] The above descriptions are only some preferred embodiments of the present disclosure and an explanation of the technical principles used. Those skilled in the art should understand that the scope of the invention involved in the embodiments of the present disclosure is not limited to the technical solutions formed by a specific combination of the above technical features, but should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the above invention concept. For example, the above features are replaced with (but not limited to) technical features with similar functions disclosed in the embodiments of the present disclosure.

Claims

1. A camera device control method, wherein: The camera device includes: a shooting module, a packet capture control module, a file packaging module, a file transfer module and a device kernel space, wherein the device kernel space is configured with: a packet capture control node, a data filtering module, a packet transmission and reception filter and a data packet buffer queue, including: In response to the packet capture control module receiving the packet capture instruction sent by the server, the shooting module of the camera device is controlled to shoot the video, and the transceiver filter is controlled to start the packet capture operation through the bridge link pre-deployed on the packet capture control node to obtain the video data packet, wherein the packet capture control module is deployed in the application layer of the camera device, and the transceiver filter is established between the access layer and the network layer of the device kernel space; Filtering the video data packet through the data filtering module to obtain a filtered video data packet, and storing the filtered video data packet into the data packet cache queue; Reading a video data packet from the data packet cache queue through the packet capture control module, and writing the read video data packet into the file packaging module; The received video data packets are packaged by the file packaging module to obtain a video packaging file, wherein the video packaging file is an encrypted file; The video package file is uploaded to the server through the file transfer module, wherein the server determines whether the camera device has a fault problem through the video package file without decrypting the video package file.

2. The method according to claim 1, wherein: The method further comprises: In response to the packet capture control module receiving the packet capture termination instruction issued by the server, the packet transmission and reception filter is controlled to terminate the packet capture operation through the bridge link, and the data cache of the file transfer module and the device kernel space is cleared.

3. The method according to claim 1, wherein: The controlling the packet receiving and transmitting filter to start the packet capturing operation to obtain the video data packet includes: Control the packet-receiving filter to obtain the captured video data packet from the network layer of the device kernel space, wherein after controlling the shooting module of the camera device to shoot the video, the video data is transmitted through the network layer of the device kernel space, and the packet-receiving filter establishes a communication link with the network layer to obtain the video data packet.

4. The method according to claim 1, wherein: The packet capture instruction includes a packet capture address and a port number; and The filtering of the video data packet to obtain a filtered video data packet includes: The video data corresponding to the packet capture address and port number are selected from the video data packet to obtain a selected video data group; the selected video data in the selected video data group are copied, and the copied video data are merged into a filtered video data packet.

5. The method according to claim 1, wherein: The step of packaging the received video data packets to obtain a video package file includes: Extracting the overall information of the video data packet, wherein the overall information includes at least one of the following: a file format identifier, a timestamp precision value, a data packet length, and a link type; Determine a timestamp sequence corresponding to the video data, a length included in the data, and actual length information as a data packet header; Format-encode the video data of each video data packet to obtain encoded data packet data; The overall information, the data packet header and the encoded data packet data are combined into a video packaging file.

6. A camera device control device, comprising: The control shooting unit is configured to control the shooting module of the camera device to shoot a video in response to the packet capture control module receiving the packet capture instruction sent by the server, and control the packet transceiver filter to start the packet capture operation through the bridge link pre-deployed on the packet capture control node to obtain the video data packet, wherein the packet capture control module is deployed in the application layer of the camera device, and the packet transceiver filter is established between the access layer and the network layer of the device kernel space; A filtering processing unit, configured to filter the video data packet through the data filtering module to obtain a filtered video data packet, and store the filtered video data packet into the data packet cache queue; a reading and writing unit, configured to read the video data packet from the data packet cache queue through the packet capture control module, and write the read video data packet into the file packaging module; A packaging processing unit is configured to package the received video data packets through the file packaging module to obtain a video packaging file, wherein the video packaging file is an encrypted file; The uploading unit is configured to upload the video package file to the server through the file transfer module, wherein the server does not decrypt the video package file, and the server determines whether the camera device has a fault problem through the video package file.

7. An electronic device comprising: one or more processors; a storage device having one or more programs stored thereon, When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 5.

8. A computer readable medium having a computer program stored thereon, wherein: When the computer program is executed by a processor, the method according to any one of claims 1 to 5 is implemented.

Citation Information

Patent Citations

  • Data packet capturing method, device and equipment and computer readable medium

    CN115002203A

  • Network packet capture method, device, equipment and storage medium

    CN118075218A