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

By setting up packet capture control module and kernel space module in the camera device, replacing the traditional packet capture tool, the problem that camera devices are difficult to support complex packet capture tools is solved, remote detection and maintenance is realized, memory usage is reduced, and the device's running speed and stability is improved.

CN119172524BActive Publication Date: 2025-07-01SHENZHEN 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
Patents(China)
Current Assignee / Owner
Filing Date
2024-08-27
Publication Date
2025-07-01
Estimated Expiration
2044-08-27

AI Technical Summary

Technical Problem

In the prior art, camera equipment is difficult to support complex packet capture tools, resulting in the inability to conduct remote detection and maintenance, which may lead to equipment damage. At the same time, the operation of the packet capture tool requires a lot of memory, which increases the memory pressure of the camera device, resulting in reduced system operation speed and unstable.

Method used

By setting up the packet capture control module, file packaging module and file transfer module at the application layer of the camera device, and deploying the packet capture control node, data filter module, packet sending and receiving filters and packet cache queues in the device kernel space, instead of the packet capture tool to extract data from the network layer of the camera, realizing the capture, filtering and uploading of video data.

Benefits of technology

Remote packet capture and detection of camera equipment is realized, avoiding damage to the equipment due to failure to maintain in time, reducing memory usage, improving the operating speed and stability of the equipment, and protecting the privacy of user data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119172524B_ABST
    Figure CN119172524B_ABST
Patent Text Reader

Abstract

Embodiments of the present disclosure disclose a camera device control method, apparatus, electronic device, and computer-readable medium. A specific implementation of the method includes: controlling a shooting module of the camera device to perform video shooting, and controlling a packet capture filter to start a packet capture operation through a bridging link pre-deployed on a packet capture control node to obtain video data packets; filtering the video data packets through a data filtering module to obtain filtered video data packets, and storing the filtered video data packets in a data packet cache queue; reading the video data packets from the data packet cache queue through a packet capture control module, and writing the read video data packets to a file packaging module; performing a packaging process on the received video data packets through the file packaging module to obtain a video packaging file; and uploading the video packaging file to a server through a file transmission module. This implementation can reduce memory occupancy.
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 technologies, and particularly to a method and apparatus for controlling a camera device, an electronic device, and a computer-readable medium. Background Art

[0002] In order to enable a user's camera to work properly and perform operations such as live streaming and intercom, the essence is to enable the control program running in the camera to be properly connected to the control application in the manufacturer's server. Therefore, the essence of network applications is actually the communication between applications of devices. In a real environment, the distance between a device and a server is often very long, and it needs to go through many relay nodes (as shown in Figure 1 ). For a wireless camera device, to communicate with a server, the data packet sent needs to go through: a wireless router, an operator access point, a backbone network, and a peer operator access point before finally reaching the server. Moreover, not only outside the device, but also inside the device, for an application to correctly send data, it also needs to go through three steps: transport layer packaging, network layer packaging, and access layer packaging, before finally preparing the data packet and sending it out. And in the receiving stage, it also needs to go through three steps in reverse order to finally process the data and inform the application that a new valid data has arrived. If an error occurs in any of the above processes, it will cause network problems for the device and it cannot be used normally. And when this problem occurs in an 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 the captured packet file (for example, in the form of a post request) to a debugging server. To achieve the capture, filtering, and analysis of the traffic inside the device, so as to facilitate the control of the camera device.

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

[0004] First, the capture tool has complex functions, which makes its program volume too large. For a low-cost device like a camera (such as having less memory resources), the hardware is difficult to support, and it is also difficult to implant the capture tool to run in it. Secondly, the operation of the capture tool requires the kernel of the user device to have a network filtering algorithm function. For a network camera device, since such a function is generally not required in its original functions, this function is not included in the device. As a result, it is difficult to perform remote detection of the camera, so that 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 when performing a simple packet capture function, it requires a large amount of memory to complete operations such as caching and organizing data formats. If the device internal traffic is captured, filtered, and analyzed by deploying the packet capture tool, it increases the memory pressure on the camera device, and the increase in memory pressure will lead to a decrease in the overall running speed and instability of the system.

[0006] The above information disclosed in this background art section is only used to enhance the understanding of the background of the inventive concept, and thus, it may include information that does not form the prior art known to those of ordinary skill in the art in this country. Summary of the Invention

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

[0008] Some embodiments of this 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 art section.

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

[0010] Second aspect, some embodiments of the present disclosure provide a camera device control apparatus, the apparatus comprising: a control shooting unit configured to, in response to a packet capture instruction sent by a server received by a packet capture control module, control a shooting module of the camera device to perform video shooting, and control the above-mentioned packet sending and receiving filter to start a packet capture operation through a bridging link pre-deployed on the above-mentioned packet capture control node to obtain video data packets, wherein the above-mentioned packet capture control module is deployed at the application layer of the camera device, and the above-mentioned packet sending and receiving filter is established between the access layer and the network layer in the device kernel space; a filtering processing unit configured to perform filtering processing on the above-mentioned video data packets through the above-mentioned data filtering module to obtain filtered video data packets, and store the filtered video data packets in the above-mentioned data packet cache queue; a reading and writing unit configured to read video data packets from the above-mentioned data packet cache queue through the above-mentioned packet capture control module, and write the read video data packets into the above-mentioned file packaging module; a packaging processing unit configured to perform packaging processing on the received video data packets through the above-mentioned file packaging module to obtain a video packaging file, wherein the above-mentioned video packaging file is an encrypted file; an uploading unit 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 there is a fault problem with the above-mentioned camera device through the video packaging file.

[0011] Third aspect, some embodiments of the present disclosure provide an electronic device, comprising: one or more processors; a storage device having stored thereon one or more programs, which when executed by the one or more processors cause the one or more processors to implement the method described in any implementation manner of the above first aspect.

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

[0013] The above-mentioned various embodiments of the present disclosure have the following beneficial effects: Through the camera device control method of some embodiments of the present disclosure, remote detection of the camera can be performed to avoid damage to the camera device caused by failure to perform corresponding maintenance in time. Specifically, the reasons that make it difficult to perform remote detection of the camera and thus difficult to control the camera are as follows: The packet capture tool has complex functions, resulting in an overly large program size. For low-cost devices such as cameras (with limited memory resources), the hardware is difficult to support, and it is also difficult to implant the packet capture tool to run therein. Secondly, the operation of the packet capture tool requires the kernel of the user device to have a network filtering algorithm function. For network camera devices, since such a requirement is generally not included in their original functions, this function is not included in the device. Based on this, in the camera device control method of some embodiments of the present disclosure, a packet capture control module, a file packaging module, and a file transmission module are set in the application layer of the camera device to facilitate the sending and receiving of data, instructions, and other information. Then, a packet capture control node, a data filtering module, a packet sending and receiving filter, and a packet cache queue are deployed in the device kernel space, which can be used to extract the required data from the network layer of the camera for the packet capture control module instead of the packet capture tool. Thus, 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 a packet capture instruction sent by the server, the shooting module of the camera device is controlled to perform video shooting, and the packet sending and receiving filter is controlled to start the packet capture operation through the bridging link pre-deployed on the packet capture control node to obtain video data packets. Among them, the packet capture control module is deployed in the application layer of the camera device, and the packet sending and receiving filter is established between the access layer and the network layer of the device kernel space. Then, the above-mentioned video data packets are filtered by the data filtering module to obtain filtered video data packets, and the filtered video data packets are stored in the above-mentioned packet cache queue. After that, the packet capture control module reads the video data packets from the above-mentioned packet cache queue and writes the read video data packets into the above-mentioned file packaging module. Then, the received video data packets are packaged by the above-mentioned file packaging module to obtain a video packaged file. Among them, the above-mentioned video packaged file is an encrypted file. Finally, the above-mentioned video packaged file is uploaded to the above-mentioned server through the above-mentioned file transmission module. Among them, the server determines whether there are any fault problems with the above-mentioned camera device through the video packaged file without decrypting the video packaged file. Here, because multiple modules are directly deployed in the kernel space, it can only occupy a relatively low code volume and memory occupancy. Thus, on the basis of reducing memory occupancy, 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 corresponding problem maintenance. Furthermore, damage to the camera device can be avoided. Description of the Drawings

[0014] In combination with the accompanying drawings and with reference to the following specific embodiments, the above and other features, advantages and aspects of the various embodiments of the present disclosure will become more apparent. Throughout the drawings, the same or similar reference numerals denote the same or similar elements. It should be understood that the drawings are schematic and the elements and elements are not necessarily drawn to scale.

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

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

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

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

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

[0020] The embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although some embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as limited to the embodiments set forth herein. On the contrary, these embodiments are provided to more thoroughly and completely understand the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are only for exemplary purposes and are not used to limit the protection scope of the present disclosure.

[0021] In addition, it should be noted that, for the sake of convenience of description, only the parts related to the relevant invention are shown in the drawings. Without conflict, the embodiments in the present disclosure and the features in the embodiments 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 relationship of the functions performed by these devices, modules or units.

[0023] It should be noted that the modifications of "one" and "multiple" mentioned in the present disclosure are illustrative rather than restrictive. Those skilled in the art should understand that, unless otherwise clearly stated 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 for illustrative purposes only and are not used to limit the scope of these messages or information.

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

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

[0027] Figure 2 Flow 200 of some embodiments of the camera device control method according to the present disclosure is shown. Among them, as Figure 3 shown, the camera device may include: a shooting module (not shown in the figure), a packet capture control module ①, a file packaging module ⑥, a file transmission module ⑦, and a device kernel space. The above device kernel space may be configured with the following modules: a packet capture control node ②, a data filtering module ③, a packet sending and receiving filter ④, and a packet buffer queue ⑤. Here, the kernel space may be the kernel of a lightweight Linux system pre-deployed in the camera device. The shooting module may be located in 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 obtained data. The file transmission module is used to upload the packaged data packets 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 packet sending and receiving 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 packet buffer queue may be used to cache data packets.

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

[0029] Step 201, in response to the packet capture control module receiving a packet capture instruction sent by the server, control the shooting module of the camera device to perform video shooting, and control the packet sending and receiving filter to start the packet capture operation through the bridging link pre-deployed on the above packet capture control node to obtain video data packets.

[0030] In some embodiments, the execution subject of the camera device control method may, in response to the packet capture control module receiving a packet capture instruction sent by the server, control the shooting module of the camera device to perform video shooting, and control the above packet receiving and sending filter to start a packet capture operation through a bridging link pre-deployed on the above packet capture control node to obtain video data packets. Among them, the above packet capture control module is deployed at the application layer of the camera device, and the above packet receiving and sending filter is established between the access layer and the network layer in the device kernel space.

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

[0032] In some optional implementation manners of some embodiments, the above execution subject controlling the above packet receiving and sending filter to start a packet capture operation to obtain video data packets may include the following steps:

[0033] Control the above packet receiving and sending filter to obtain the shot video data packets from the network layer of the device kernel space. Among them, after controlling the shooting module of the camera device to perform video shooting, the video data can be transmitted through the network layer of the device kernel space. The above packet receiving and sending filter establishes a communication link with the network layer to obtain video data packets.

[0034] Step 202, filter the video data packets through the data filtering module to obtain filtered video data packets, and store the filtered video data packets in the data packet cache queue.

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

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

[0037] First step: Select the video data corresponding to the above-mentioned packet capture address and port number from the above video data packets to obtain the 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 through the packet capture address and port number. In addition to video data, other data of the camera device can also be selected, such as data like file format identifier, timestamp precision value, data packet length, link type, exposure, resolution, focal length, shooting frame rate, focus mode identifier, white balance value, compression format, etc. Second step: Copy the selected video data in the selected video data group, and merge the copied video data into the filtered video data packet.

[0038] Step 203: 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 above file packaging module.

[0039] In some embodiments, the above-mentioned execution entity can 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.

[0040] Step 204: Perform packaging processing on the received video data packet through the file packaging module to obtain a video packaging file.

[0041] In some embodiments, the above-mentioned execution entity can perform packaging processing on the received video data packet through the above-mentioned file packaging module to obtain a video packaging file.

[0042] In some optional implementation manners of some embodiments, the above-mentioned execution entity performs packaging processing on the received video data packet through the above-mentioned file packaging module to obtain a video packaging file, which may include the following steps:

[0043] First step: Extract the overall information of the above video data packet. Among them, the above overall information includes at least one of the following: file format identifier, 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] Second step: Determine the timestamp sequence corresponding to the above video data, the length included in the data, and the actual length information as the data packet header.

[0045] Third step: Perform format encoding on the video data of each video data packet to obtain the encoded data packet data. Among them, the format encoding can be encoded according to the network protocol format.

[0046] Fourthly, combine the above-mentioned overall information, the above-mentioned data packet header, and the above-mentioned encoded data packet data into a video packaging file. Among them, the format of the video packaging file can be the pcap (packet capture) file format.

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

[0048] In some embodiments, the above-mentioned execution entity can upload the above-mentioned video packaging file to the above-mentioned server through the above-mentioned file transfer module. Among them, the above-mentioned server can determine whether there is a fault problem with the above-mentioned camera device through the video packaging file without decrypting the above-mentioned video packaging file.

[0049] Optionally, the overall information of the above-mentioned video packaging file may further include shooting data when the camera device shoots a video. The shooting data may further include, but is not limited to, at least one of the following: exposure, resolution, focal length, shooting frame rate, focus mode identifier, white balance value, compression format. And the above-mentioned server can determine whether there is a fault problem with the above-mentioned camera device through the following steps:

[0050] First step, in response to the above-mentioned server not receiving the video packaging file, determine that there is a network connection fault with the above-mentioned camera device, and send the connection fault information to the user terminal corresponding to the above-mentioned camera device for the user to re-establish a network connection.

[0051] Second step, in response to determining that the server has received the video packaging file, obtain the voltage values, resistance values, and current values of each power-consuming component in the above-mentioned camera device to obtain a voltage value set, a resistance value set, and a current value set. Among them, the power-consuming components may include, but are not limited to, at least one of the following: power supply component, video signal line, camera component, image sensor, lens, storage device, power adapter, etc. The voltage value set may include continuous voltage values of multiple power-consuming components over a period of time. The resistance value set may include continuous resistance values of multiple power-consuming components over a period of time. The current value set may include continuous current values of multiple power-consuming components over a period of time. Secondly, the server receiving the video packaging file may indicate that the network connection is normal.

[0052] Thirdly, in response to determining that there is a voltage value, a resistance value, or a 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, locate the corresponding electrical component as the target electrical component, and send the component information of the above target electrical component to the maintenance terminal for camera device maintenance. Among them, the existence of a voltage value, a resistance value, or a 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] Fourthly, in response to determining that there is no 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, determine whether the compression format and the focus mode identifier included in the above selected video data are the preset compression format and the preset focus mode identifier. Among them, the fact that there is no 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 no circuit fault in each electrical component.

[0054] Fifthly, in response to this, determine whether the exposure, resolution, focal length, number of frames captured, and white balance value included in the above selected video data are within the corresponding preset ranges. Here, if the exposure, resolution, focal length, number of frames captured, and white balance value are all within the corresponding preset ranges, it is determined that there is no fault in the settings of the camera device.

[0055] Sixthly, in response to at least one of the exposure, resolution, focal length, number of frames captured, and white balance value not being within the corresponding preset range, determine that there is a setting fault in the above camera device, and send the fault information of the setting fault to the user terminal or perform setting initialization on the camera device. Among them, various settings of the camera can be readjusted through initialization.

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

[0057] First, in response to determining that the server has received the video packaging file, select video data packets with a preset number of frames from the above video packaging file to obtain a sequence of continuous-frame video data packets.

[0058] Second, based on the above sequence of consecutive frame video data packets, perform a latency detection on the network of the above camera device to generate latency detection information indicating network latency or normal network conditions. Among them, the latency detection is: determining the network latency duration using the timestamps corresponding to each consecutive frame video data in the above sequence of consecutive frame video data packets. Specifically, first, the difference between the timestamp corresponding to each consecutive frame data packet and the timestamp when the server receives the video data can be determined as the time difference. Then, the average value of each time difference can be determined as the mean time difference. Finally, the difference between the mean time difference and a preset duration can be determined as the network latency duration.

[0059] Third, in response to determining that the latency duration included in the latency detection information is greater than the preset duration, adjust the frame rate of the above camera device and the bit rate during the transmission of the file transfer module for data transmission during the shooting process of the camera device. Among them, the latency duration being greater than the preset duration can indicate that there is a relatively large latency in the network of the camera device. Therefore, by reducing the frame rate and transmission bit rate, the size of the transmitted file and the bandwidth occupancy can be reduced. Thereby improving the transmission efficiency and reducing the latency.

[0060] The above steps 204-205 and their related content are an inventive point of the embodiments of the present disclosure, which solve the second technical problem mentioned in the background art: "The packet capture tool is a complete running program. Even if it only performs a simple packet capture function, 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 inside the device, it increases the memory pressure on the camera device, and the increase in memory pressure will lead to a decrease in the overall running speed and instability of the system." The factors that lead to a decrease in the overall running speed and instability of the camera device system are often as follows: The packet capture tool is a complete running program. Even if it only performs a simple packet capture function, 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 inside the device, it increases the memory pressure on the camera device. If the above factors are solved, the memory pressure on the camera device can be reduced, and the running speed and stability of the camera device can be improved. To achieve this effect, first, instead of installing a packet capture tool, the above-mentioned modules are used to replace the packet capture tool to perform packet capture operations, thereby reducing the occupation of memory resources. Second, by extracting the overall information of the video data, it can be used to capture the data captured by the camera device without decoding the video data on the server side. Thus, the server can use the captured 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, the parameters of the camera device can be notified or adjusted in a timely manner according to the abnormal problems. Furthermore, the memory pressure on the camera device can be reduced, and the running speed and stability of the camera device can also be improved.

[0061] Optionally, the above-mentioned execution entity can also respond to the termination packet capture instruction sent by the server received by the packet capture control module, and through the above-mentioned bridging link, control the packet transceiver filter to terminate the packet capture operation, and clear the data caches of the file transfer module and the device kernel space.

[0062] The above-mentioned various embodiments of the present disclosure have the following beneficial effects: Through the camera device control method of some embodiments of the present disclosure, remote detection of the camera can be performed to avoid damage to the camera device caused by failure to perform corresponding maintenance in time. Specifically, the reasons that make it difficult to perform remote detection of the camera and thus difficult to control the camera are as follows: The packet capture tool has complex functions, resulting in an overly large program size. For low-cost devices such as cameras (with limited memory resources), the hardware is difficult to support, and it is also difficult to implant the packet capture tool to run in them. Secondly, the operation of the packet capture tool requires the kernel of the user device to have a network filtering algorithm function. For network camera devices, since such a requirement is generally not included in their 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 sets up a packet capture control module, a file packaging module, and a file transmission module in the application layer of the camera device 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 sending and receiving filter, and a packet cache queue in the device kernel space, it can be used to extract the required data from the network layer of the camera for the packet capture control module instead of the packet capture tool. Thus, 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 a packet capture instruction sent by the server, control the shooting module of the camera device to perform video shooting, and control the above-mentioned packet sending and receiving filter to start the packet capture operation through the bridging link previously deployed on the above-mentioned packet capture control node to obtain video data packets. Among them, the above-mentioned packet capture control module is deployed in the application layer of the camera device, and the above-mentioned packet sending and receiving filter is established between the access layer and the network layer of the device kernel space. Then, filter the above-mentioned video data packets through the above-mentioned data filtering module to obtain filtered video data packets, and store the filtered video data packets in the above-mentioned packet cache queue. After that, read the video data packets from the above-mentioned packet cache queue through the above-mentioned packet capture control module, and write the read video data packets into the above-mentioned file packaging module. Next, perform packaging processing on the received video data packets through the above-mentioned file packaging module to obtain a video packaging file. Among them, the above-mentioned video packaging file is an encrypted file. Finally, upload the above-mentioned video packaging file to the above-mentioned server through the above-mentioned file transmission module. Among them, the above-mentioned server determines whether there are any fault problems with the above-mentioned camera device through the video packaging file without decrypting the video packaging file. Here, because multiple modules are directly deployed in the kernel space, it can only occupy a relatively low code volume and memory occupancy. Thus, on the basis of reducing memory occupancy, 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, remote detection of the camera device can also be performed for corresponding problem maintenance. Furthermore, damage to the camera device can be avoided.

[0063] Further reference is made to Figure 4 which, as an implementation of the methods shown in the above figures, the present disclosure provides some embodiments of a camera device control apparatus, and these apparatus embodiments correspond to Figure 1 the method embodiments shown, and the apparatus can be specifically applied to various electronic devices.

[0064] As shown in Figure 4 some embodiments of the camera device control apparatus 400 include: 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. Among them, the control shooting unit 401 is configured to, in response to the packet capture control module receiving a packet capture instruction sent by the server, control the shooting module of the camera device to perform video shooting, and control the above-mentioned packet transceiver filter to start a packet capture operation through a bridging link pre-deployed on the above-mentioned packet capture control node to obtain video data packets. Among them, the above-mentioned packet capture control module is deployed in the application layer of the camera device, and the above-mentioned packet 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 perform filtering processing on the above-mentioned video data packets through the above-mentioned data filtering module to obtain filtered video data packets, and store the filtered video data packets in the above-mentioned data packet cache queue; the reading and writing unit 403 is configured to read video data packets from the above-mentioned data packet cache queue through the above-mentioned packet capture control module, and write the read video data packets into the above-mentioned file packaging module; the packaging processing unit 404 is configured to perform packaging processing on the received video data packets through the above-mentioned file packaging module to obtain a video packaging file, where the above-mentioned video packaging file is an encrypted file; the uploading unit 405 is configured to upload the above-mentioned video packaging file to the above-mentioned server through the above-mentioned file transmission module, where the above-mentioned server does not decrypt the above-mentioned video packaging file, and the above-mentioned server determines whether there is a fault problem with the above-mentioned camera device through the video packaging file.

[0065] It can be understood that the various units described in the apparatus 200 correspond to the respective steps in the method described with reference to Figure 1 Accordingly, the operations, features, and beneficial effects described above for the method also apply to the apparatus 200 and the units included therein, and will not be elaborated herein.

[0066] Next, reference is made to Figure 3 which shows a schematic structural diagram of an electronic device (e.g., 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 impose any limitation on the functions and usage scope of the embodiments of the present disclosure.

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

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

[0069] In particular, according to some embodiments of the present disclosure, the processes described above with reference to the flowcharts may be implemented as computer software programs. 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 codes for performing the methods shown in the flowcharts. In such some embodiments, the computer program may 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 methods of some embodiments of the present disclosure are executed.

[0070] It should be noted that the computer-readable media described in some embodiments of the present disclosure may be a computer-readable signal medium, a computer-readable storage medium, or any combination of the two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the above. More specific examples of the computer-readable storage medium may include, but are not limited to: an electrical connection having 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, the computer-readable storage medium may be any tangible medium that contains or stores a program, which can be used by or in conjunction with an instruction execution system, apparatus, or device. In some embodiments of the present disclosure, the computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries computer-readable program code. Such a propagated data signal may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. The computer-readable signal medium may also be any computer-readable medium other than the computer-readable storage medium, which can send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium may be transmitted by any appropriate 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 can communicate using any currently known or future-developed network protocol such as HTTP (Hyper Text Transfer Protocol), and can be interconnected with digital data communication in any form or medium (e.g., a communication network). Examples of communication networks include local area networks ("LANs"), wide area networks ("WANs"), the Internet (e.g., the Internet), and end-to-end networks (e.g., ad hoc end-to-end networks), as well as any currently known or future-developed networks.

[0072] The above computer-readable medium may be included in the above electronic device; or it may exist independently and not be assembled into the electronic device. The above computer-readable medium carries one or more programs. When the above one or more programs are executed by the electronic device, the electronic device is caused to: in response to the packet capture control module receiving a packet capture instruction sent by the server, control the shooting module of the camera device to perform video shooting, and control the above packet sending and receiving filter to start a packet capture operation through a bridging link deployed in advance on the above packet capture control node to obtain video data packets. Among them, the above packet capture control module is deployed at the application layer of the camera device, and the above packet sending and receiving filter is established between the access layer and the network layer in the device kernel space; filter the above video data packets through the above data filtering module to obtain filtered video data packets, and store the filtered video data packets in the above data packet cache queue; read the video data packets from the above data packet cache queue through the above packet capture control module, and write the read video data packets into the above file packaging module; perform a packaging process on the received video data packets through the above file packaging module to obtain a video packaging file, where the above video packaging file is an encrypted file; upload the above video packaging file to the above server through the above file transmission module, where the above server determines whether there is a fault problem with the above camera device through the video packaging file without decrypting the video packaging 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 combinations thereof. The above programming languages include object-oriented programming languages - such as Java, Smalltalk, C++; and also include conventional procedural programming languages - such as the "C" language or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, executed as a stand-alone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network - including a local area network (LAN) or a wide area network (WAN) - or may be connected to an external computer (for example, by using an Internet service provider to connect through the Internet).

[0074] The flowcharts and block diagrams in the accompanying drawings illustrate the possible architectures, functions, and operations of systems, methods, and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagram may represent a module, a segment of a program, or a portion of code that contains one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions noted in the blocks may occur in an order different from that noted in the accompanying drawings. For example, two consecutive blocks shown may actually be executed substantially in parallel, or they may sometimes be executed in the reverse order, depending on the functions involved. It should also be noted that each block in the block diagram and / or flowchart, and combinations of blocks in the block diagram and / or flowchart, can be implemented by a dedicated hardware-based system that performs the specified functions or operations, or by a combination of dedicated hardware and computer instructions.

[0075] The units described in some embodiments of the present disclosure can be implemented in software or in hardware. The described units can also be provided in a processor. For example, it can be described as: a processor includes a control shooting unit, a filtering processing unit, a reading and writing unit, a packing processing unit, and an uploading unit. Among them, the names of these units do not constitute a limitation on the unit itself in some cases. For example, the control shooting unit can also be described as "the unit that controls the shooting module of the camera device to perform video shooting".

[0076] The functions described above can be performed at least in part by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that can be used include: Field Programmable Gate Arrays (FPGAs), Application Specific Integrated Circuits (ASICs), Application Specific Standard Products (ASSPs), Systems on Chip (SOCs), Complex Programmable Logic Devices (CPLDs), and so on.

[0077] The above description is only some preferred embodiments of the present disclosure and an explanation of the applied technical principles. 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 the 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 inventive concept. For example, technical solutions formed by mutually replacing the above features with (but not limited to) technical features having 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 sending and receiving 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; 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.

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. A camera device control device, applied to the method according to any one of claims 1 to 4, the 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.

6. 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 4.

7. 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 4 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