Data transmission method and device, electronic equipment and storage medium
By dynamically determining the data transmission path between network cameras, base stations and routers, the problem of insufficient stability and redundancy of network camera network data transmission in the prior art is solved, and a more efficient data transmission and video surveillance system is realized. reliability.
Patent Information
- Application Number
- CN202310678662.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-06-08
- Publication Date
- 2024-12-10
AI Technical Summary
In the existing security monitoring industry, the network camera network has low data transmission stability and redundancy, making it difficult to meet the data transmission needs in complex scenarios.
By dynamically determining the data transmission path between the network camera, base station and router, dynamically adjusting it according to the data transmission bandwidth and signal strength to ensure the stability and redundancy of data transmission.
It improves the redundancy of network camera network and the stability of data transmission, adapts to data transmission needs in different scenarios, and enhances the reliability of the video surveillance system.
Smart Images

Figure CN119110367A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a data transmission method, device, electronic device and storage medium. Background Art
[0002] With the rapid development of the security monitoring industry, various types of equipment in the security field are also undergoing updates and iterations. Different from previous analog cameras, the current IPC (IP Camera) already has extremely powerful functions and effects. With the development of network technology, its application field is becoming more and more extensive. In the prior art, the network between the base station and the IPC (IP Camera) usually adopts a star topology, that is, with the base station as the center, multiple IPCs access the base station through WIFI (Wireless Fidelity). In addition, in some solutions, the network camera is used as a relay device to transmit the data collected by other network cameras to the network video recorder through the relay network camera.
[0003] However, the data transmission stability and redundancy of current networks are low. Summary of the invention
[0004] In view of this, in order to solve some or all of the above technical problems, the embodiments of the present application provide a data transmission method, device, electronic device and storage medium.
[0005] In a first aspect, an embodiment of the present application provides a data transmission method, the method comprising:
[0006] Determine a network device set corresponding to a network camera in the network camera set; wherein the network device set corresponding to the network camera includes: other network cameras in the network camera set except the network camera, a base station used for the network camera to transmit data, and a router used for the network camera to transmit data;
[0007] Determine the target device corresponding to the network camera from the network device set corresponding to the network camera;
[0008] The data collected by the network camera is transmitted through the target device corresponding to the network camera.
[0009] In a possible implementation, when the network camera is in dual network card mode, the network camera uses the first transmission mode or the second transmission mode for data transmission; the first transmission mode indicates that the intermediate device for transmitting the data collected by the network camera is a base station; the second transmission mode indicates that the intermediate device for transmitting the data collected by the network camera is a router; and
[0010] The step of determining a target device corresponding to the network camera from a set of network devices corresponding to the network camera includes:
[0011] Determine the data transmission bandwidth groups corresponding to each topology of the network camera set; wherein the topology indicates the target transmission mode of each network camera in the network camera set, and the target transmission mode is the first transmission mode or the second transmission mode;
[0012] Based on the data transmission bandwidth groups respectively corresponding to the various topological modes, a target device corresponding to the network camera is determined from a set of network devices corresponding to the network camera.
[0013] In a possible implementation, determining the target device corresponding to the network camera from the set of network devices corresponding to the network camera based on the data transmission bandwidth groups corresponding to the respective topological modes includes:
[0014] Determine a statistical value of a data transmission bandwidth group corresponding to a topology in each of the topologies, wherein each data transmission bandwidth group corresponds to a statistical value, and the statistical value includes a mean and / or a variance;
[0015] Based on the determined statistical value, a target device corresponding to the network camera is determined from a set of network devices corresponding to the network camera.
[0016] In a possible implementation manner, determining the statistical value of the data transmission bandwidth group corresponding to the topology in each topology includes:
[0017] Determine respectively the mean value of the data transmission bandwidth group corresponding to the topology in each topology;
[0018] Selecting a target number of topology modes from the various topology modes in descending order of mean values to obtain a topology mode set;
[0019] Determine the variance of the data transmission bandwidth group corresponding to each topology in the topology set; and
[0020] The step of determining a target device corresponding to the network camera from a set of network devices corresponding to the network camera based on the determined statistical value includes:
[0021] Determine a target transmission mode indicated by a topology mode corresponding to the determined minimum variance;
[0022] Determine an intermediate device represented by the determined target transmission mode, and obtain the target intermediate device;
[0023] Based on the target intermediate device, a target device corresponding to the network camera is determined from a set of network devices corresponding to the network camera.
[0024] In a possible implementation, determining the target device corresponding to the network camera from the set of network devices corresponding to the network camera includes:
[0025] Determine the data transmission bandwidth of the network camera in the network camera set when the network camera uses an intermediate device to transmit data, and obtain a first bandwidth, wherein the intermediate device is a base station or a router;
[0026] Based on the first bandwidth, a target device corresponding to the network camera is determined from a set of network devices corresponding to the network camera.
[0027] In a possible implementation, determining the target device corresponding to the network camera from the set of network devices corresponding to the network camera includes:
[0028] Determine the signal strength of an intermediate device used to transmit data of the network cameras in the network camera set to obtain a first strength, wherein the intermediate device is a base station or a router;
[0029] Based on the first strength, a target device corresponding to the network camera is determined from a set of network devices corresponding to the network camera.
[0030] In a possible implementation, determining the target device corresponding to the network camera from the set of network devices corresponding to the network camera includes:
[0031] Determine a data transmission bandwidth and a signal strength for data transmission between a network camera in the network camera set and an intermediate device, and obtain a second bandwidth and a second strength, wherein the intermediate device is a base station or a router;
[0032] When the second bandwidth is greater than or equal to a second bandwidth threshold, or the second strength is greater than or equal to a second strength threshold, determining the intermediate device as a target device corresponding to the network camera;
[0033] When the second bandwidth is smaller than the second bandwidth threshold and the second strength is smaller than the second strength threshold, a target device corresponding to the network camera is determined from other network cameras in the network camera set except the network camera.
[0034] In a possible implementation, determining the target device corresponding to the network camera from the set of network devices corresponding to the network camera includes:
[0035] Determine a target network camera from network cameras other than the network camera in the network camera set;
[0036] Determine the target network camera as the target device corresponding to the network camera;
[0037] The target network camera meets at least one of the following conditions:
[0038] The signal strength of the target network camera is greater than a third strength threshold;
[0039] The target network camera is not currently determined as a target device;
[0040] The data transmission bandwidth of the target network camera is greater than a third bandwidth threshold.
[0041] In a possible implementation, the method is performed when at least one of the following conditions is met:
[0042] The duration during which the data transmission bandwidth of the network cameras in the network camera set is less than the fourth bandwidth threshold is greater than the preset first duration;
[0043] The time difference between the last time the target device corresponding to the network camera was determined and the current time is greater than the preset second time length;
[0044] An instruction for determining a target device corresponding to the network camera is received.
[0045] In a second aspect, an embodiment of the present application provides a data transmission device, the device comprising:
[0046] A first determining unit is used to determine a network device set corresponding to a network camera in the network camera set; wherein the network device set corresponding to the network camera includes: other network cameras in the network camera set except the network camera, a base station used for the network camera to transmit data, and a router used for the network camera to transmit data;
[0047] A second determining unit, used to determine a target device corresponding to the network camera from a set of network devices corresponding to the network camera;
[0048] The transmission unit is used to transmit the data collected by the network camera through the target device corresponding to the network camera.
[0049] In a possible implementation, when the network camera is in dual network card mode, the network camera uses the first transmission mode or the second transmission mode for data transmission; the first transmission mode indicates that the intermediate device for transmitting the data collected by the network camera is a base station; the second transmission mode indicates that the intermediate device for transmitting the data collected by the network camera is a router; and
[0050] The step of determining a target device corresponding to the network camera from a set of network devices corresponding to the network camera includes:
[0051] Determine the data transmission bandwidth groups corresponding to each topology of the network camera set; wherein the topology indicates the target transmission mode of each network camera in the network camera set, and the target transmission mode is the first transmission mode or the second transmission mode;
[0052] Based on the data transmission bandwidth groups respectively corresponding to the various topological modes, a target device corresponding to the network camera is determined from a set of network devices corresponding to the network camera.
[0053] In a possible implementation, determining the target device corresponding to the network camera from the set of network devices corresponding to the network camera based on the data transmission bandwidth groups corresponding to the respective topological modes includes:
[0054] Determine a statistical value of a data transmission bandwidth group corresponding to a topology in each of the topologies, wherein each data transmission bandwidth group corresponds to a statistical value, and the statistical value includes a mean and / or a variance;
[0055] Based on the determined statistical value, a target device corresponding to the network camera is determined from a set of network devices corresponding to the network camera.
[0056] In a possible implementation manner, determining the statistical value of the data transmission bandwidth group corresponding to the topology in each topology includes:
[0057] Determine respectively the mean value of the data transmission bandwidth group corresponding to the topology in each topology;
[0058] Selecting a target number of topology modes from the various topology modes in descending order of mean values to obtain a topology mode set;
[0059] Determine the variance of the data transmission bandwidth group corresponding to each topology in the topology set; and
[0060] The step of determining a target device corresponding to the network camera from a set of network devices corresponding to the network camera based on the determined statistical value includes:
[0061] Determine a target transmission mode indicated by a topology mode corresponding to the determined minimum variance;
[0062] Determine an intermediate device represented by the determined target transmission mode, and obtain the target intermediate device;
[0063] Based on the target intermediate device, a target device corresponding to the network camera is determined from a set of network devices corresponding to the network camera.
[0064] In a possible implementation, determining the target device corresponding to the network camera from the set of network devices corresponding to the network camera includes:
[0065] Determine the data transmission bandwidth of the network camera in the network camera set when the network camera uses an intermediate device to transmit data, and obtain a first bandwidth, wherein the intermediate device is a base station or a router;
[0066] Based on the first bandwidth, a target device corresponding to the network camera is determined from a set of network devices corresponding to the network camera.
[0067] In a possible implementation, determining the target device corresponding to the network camera from the set of network devices corresponding to the network camera includes:
[0068] Determine the signal strength of an intermediate device used to transmit data of the network cameras in the network camera set to obtain a first strength, wherein the intermediate device is a base station or a router;
[0069] Based on the first strength, a target device corresponding to the network camera is determined from a set of network devices corresponding to the network camera.
[0070] In a possible implementation, determining the target device corresponding to the network camera from the set of network devices corresponding to the network camera includes:
[0071] Determine a data transmission bandwidth and a signal strength for data transmission between a network camera in the network camera set and an intermediate device, and obtain a second bandwidth and a second strength, wherein the intermediate device is a base station or a router;
[0072] When the second bandwidth is greater than or equal to a second bandwidth threshold, or the second strength is greater than or equal to a second strength threshold, determining the intermediate device as a target device corresponding to the network camera;
[0073] When the second bandwidth is smaller than the second bandwidth threshold and the second strength is smaller than the second strength threshold, a target device corresponding to the network camera is determined from other network cameras in the network camera set except the network camera.
[0074] In a possible implementation, determining the target device corresponding to the network camera from the set of network devices corresponding to the network camera includes:
[0075] Determine a target network camera from network cameras other than the network camera in the network camera set;
[0076] Determine the target network camera as the target device corresponding to the network camera;
[0077] The target network camera meets at least one of the following conditions:
[0078] The signal strength of the target network camera is greater than a third strength threshold;
[0079] The target network camera is not currently determined as a target device;
[0080] The data transmission bandwidth of the target network camera is greater than a third bandwidth threshold.
[0081] In a possible implementation, the method is performed when at least one of the following conditions is met:
[0082] The duration during which the data transmission bandwidth of the network cameras in the network camera set is less than the fourth bandwidth threshold is greater than the preset first duration;
[0083] The time difference between the last time the target device corresponding to the network camera was determined and the current time is greater than the preset second time length;
[0084] An instruction for determining a target device corresponding to the network camera is received.
[0085] In a third aspect, an embodiment of the present application provides an electronic device, including:
[0086] Memory for storing computer programs;
[0087] The processor is used to execute the computer program stored in the memory, and when the computer program is executed, the method of any embodiment of the data transmission method of the first aspect of the present application is implemented.
[0088] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the method of any embodiment of the data transmission method of the first aspect described above is implemented.
[0089] In a fifth aspect, an embodiment of the present application provides a computer program, which includes a computer-readable code. When the computer-readable code runs on a device, the processor in the device implements a method as in any embodiment of the data transmission method of the first aspect above.
[0090] The data transmission method provided in the embodiment of the present application can determine the network device set corresponding to the network camera in the network camera set; wherein the network device set corresponding to the network camera includes: other network cameras in the network camera set except the network camera, a base station for transmitting data from the network camera, and a router for transmitting data from the network camera. After that, the target device corresponding to the network camera is determined from the network device set corresponding to the network camera, and then the data collected by the network camera is transmitted through the target device corresponding to the network camera. Therefore, the method does not solidify a single type of device as a relay device, but dynamically determines the network device used to transmit the data collected by the network camera from the three types of devices, namely, network cameras, base stations and routers, and uses it as a relay device. The above three types of devices may be selected as relay devices in different scenarios, and different network cameras can use different types of devices as relay devices, and then transmit data through the relay device. Compared with the scheme of multiple IPCs accessing the base station through WIFI with the base station as the center, and the scheme of using the network camera as a relay device to transmit the data collected by other network cameras to the network video recorder, the method can improve the redundancy of the network camera network, which helps to improve the stability of data transmission using the network camera network. BRIEF DESCRIPTION OF THE DRAWINGS
[0091] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and, together with the description, serve to explain the principles of the invention.
[0092] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0093] One or more embodiments are exemplarily described by pictures in the corresponding drawings, and these exemplified descriptions do not constitute limitations on the embodiments. Elements with the same reference numerals in the drawings represent similar elements, and unless otherwise stated, the figures in the drawings do not constitute proportional limitations.
[0094] Figure 1 A flowchart of a data transmission method provided in an embodiment of the present application;
[0095] Figure 2 A flowchart of another data transmission method provided in an embodiment of the present application;
[0096] Figure 3A A system architecture diagram of a data transmission method provided in an embodiment of the present application;
[0097] Figure 3B A schematic diagram of a topological connection in a data transmission method provided in an embodiment of the present application;
[0098] Figure 3C A schematic diagram of a method for determining a target device in a data transmission method provided in an embodiment of the present application;
[0099] Figure 4 A schematic diagram of the structure of a data transmission device provided in an embodiment of the present application;
[0100] Figure 5 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0101] Various exemplary embodiments of the present application will now be described in detail with reference to the accompanying drawings. Obviously, the described embodiments are part of the embodiments of the present application, rather than all of the embodiments. It should be noted that unless otherwise specifically stated, the relative arrangement of the components and steps, the numerical expressions and the numerical values described in these embodiments do not limit the scope of the present application.
[0102] Those skilled in the art will understand that the terms "first" and "second" in the embodiments of the present application are only used to distinguish between different steps, devices, modules and other objects, and do not represent any specific technical meanings, nor do they indicate the logical order between them.
[0103] It should also be understood that in this embodiment, “plurality” may refer to two or more than two, and “at least one” may refer to one, two or more than two.
[0104] It should also be understood that any component, data or structure mentioned in the embodiments of the present application can generally be understood as one or more, unless explicitly limited or otherwise indicated in the context.
[0105] In addition, the term "and / or" in this application is only a description of the association relationship of associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in this application generally indicates that the associated objects before and after are in an "or" relationship.
[0106] It should also be understood that the description of the various embodiments in this application focuses on the differences between the various embodiments, and the same or similar aspects thereof can be referenced to each other, and for the sake of brevity, they will not be described one by one.
[0107] The following description of at least one exemplary embodiment is merely illustrative in nature and is in no way intended to limit the present application, its application, or uses.
[0108] Technologies, methods, and equipment known to ordinary technicians in the relevant art may not be discussed in detail, but where appropriate, the above-mentioned technologies, methods, and equipment should be considered as part of the specification.
[0109] It should be noted that like reference numerals and letters refer to similar items in the following figures, and therefore, once an item is defined in one figure, it need not be further discussed in subsequent figures.
[0110] It should be noted that, in the absence of conflict, the embodiments in this application and the features in the embodiments can be combined with each other. To facilitate the understanding of the embodiments of the present application, the present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments. Obviously, the described embodiments are part of the embodiments of the present application, rather than all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of this application.
[0111] In order to solve the technical problems of low data transmission stability and redundancy in the network in the prior art, the present application provides a data transmission method, which improves the redundancy of network camera networking and helps to improve the stability of data transmission using network camera networking.
[0112] Figure 1A flow chart of a data transmission method provided for an embodiment of the present application. The method can be applied to one or more electronic devices such as a base station, an IPC, a router, a smart phone, a laptop computer, a desktop computer, a portable computer, a server, etc. In addition, the execution subject of the method can be hardware or software. When the above-mentioned execution subject is hardware, the execution subject can be one or more of the above-mentioned electronic devices. For example, a single electronic device can execute the method, or a plurality of electronic devices can cooperate with each other to execute the method. When the above-mentioned execution subject is software, the method can be implemented as multiple software or software modules, or as a single software or software module. It is not specifically limited here.
[0113] like Figure 1 As shown, the method specifically includes:
[0114] Step 101, determine the network device set corresponding to the network camera in the network camera set; wherein the network device set corresponding to the network camera includes: other network cameras in the network camera set except the network camera, a base station used for the network camera to transmit data, and a router used for the network camera to transmit data.
[0115] In this embodiment, the network camera set may include at least two network cameras.
[0116] Here, the base station and the router can respectively provide a network for data transmission for each network camera in the network camera set. For example, each network camera in the network camera set can transmit the data it collects through the base station. Alternatively, each network camera in the network camera set can transmit the data it collects through the router. Alternatively, some network cameras in the network camera set can transmit the data they collect through the base station, and another part of the network cameras can transmit the data they collect through the router.
[0117] In addition, the base station used for any two or more network cameras in the network camera set to transmit data can be the same base station or different base stations. The router used for any two or more network cameras in the network camera set to transmit data can be the same router or different routers.
[0118] The data transmitted by the network camera may include audio and video data collected by the network camera.
[0119] In some cases, the base station and the router may be in the same local area network.
[0120] As an example, if the network camera set includes network camera 1 and network camera 2, then the network device set corresponding to network camera 1 may include: network camera 2, a base station for network camera 1 to transmit data, and a router for network camera 1 to transmit data; the network device set corresponding to network camera 2 may include: network camera 1, a base station for network camera 2 to transmit data, and a router for network camera 2 to transmit data.
[0121] Step 102: Determine a target device corresponding to the network camera from a set of network devices corresponding to the network camera.
[0122] In this embodiment, the target device for transmitting the data collected by the network camera can be randomly determined from the network device set corresponding to the network camera. Alternatively, the target device for transmitting the data collected by the network camera can be determined from the network device set corresponding to the network camera according to a certain strategy. Please refer to the following description for details, which will not be repeated here.
[0123] The target device corresponding to the network camera is used to transmit the data collected by the network camera.
[0124] Here, the target device corresponding to the network camera may include at least one of the following: other network cameras in the network camera set except the network camera, a base station used for the network camera to transmit data, and a router used for the network camera to transmit data.
[0125] Step 103: Transmitting the data collected by the network camera through the target device corresponding to the network camera.
[0126] In this embodiment, the data collected by the network camera may be audio and video data collected by the network camera.
[0127] In practice, after collecting data, the network camera can send the collected data to the Internet through the target device corresponding to the network camera.
[0128] As an example, if the network camera set includes network camera 1, network camera 2 and network camera 3, and the target device corresponding to network camera 1 is a base station, the target device corresponding to network camera 2 is a router, and the target device corresponding to network camera 3 is network camera 1, then the data collected by network camera 1 can be sent to the Internet through the base station, for example, network camera 1 sends the collected data to the base station, and then the base station sends the data to the Internet; the data collected by network camera 2 can be first transmitted back to the base station through the router for data processing, and then the base station transmits the data to the Internet, for example, network camera 2 sends the collected data to the router, and then the router sends the data to the base station for data processing, and then the base station transmits the data to the Internet; the data collected by network camera 3 can be sent to the Internet through network camera 1, that is, network camera 3 sends the collected data to network camera 1, and then network camera 1 sends the data to the base station, and then the base station sends the data to the Internet.
[0129] In some optional implementations of this embodiment, the following method (including step 1 and step 2) may be used to perform step 102, so as to determine the target device corresponding to the network camera from the set of network devices corresponding to the network camera:
[0130] Step 1: determining the data transmission bandwidth of a network camera in the network camera set when the network camera uses an intermediate device to transmit data, and obtaining a first bandwidth.
[0131] The intermediate device is a base station or a router.
[0132] The first bandwidth mentioned above may be: the data transmission bandwidth of the network camera when the network camera uses an intermediate device to transmit data.
[0133] As a first example, each network camera in the network camera set can independently determine the first bandwidth. For example, for each network camera in the network camera set, the data of the network camera can be transmitted through a router and a base station respectively, so as to obtain the data transmission bandwidth of the network camera when the network camera uses an intermediate device (i.e., a router and a base station) to transmit data, thereby obtaining the first bandwidth.
[0134] In addition, in the case of multi-channel data transmission, the data transmission of each network camera in the network camera set may affect each other. Therefore, the impact of the data transmission of each network camera in the network camera set can be considered as a whole. As a second example, each network camera in the network camera set can turn on the dual network card (station) mode. Among them, the dual network card mode means that a single network camera can be connected to two hotspots (such as a base station hotspot and a router hotspot) at the same time. Thus, each network camera can be connected to the router and the base station at the same time, and all connections can be detected at this time. Assuming that there are N network cameras connected to the router and the base station at the same time, each network camera can transmit the data it collects through the base station or the router, that is, there are 2 possibilities, then there are 2 to the power of N (referred to as m) possibilities. Each possibility sends 1-2 seconds of 5Mbps (Million bits per second, millions of bits per second) of detection data, and a total of m groups of data transmission bandwidths will be obtained, that is, the first bandwidth. For example, there are a total of 2 to the power of 4, or 16 possible choices for four network cameras. The bandwidths of the four connection paths under each choice {(A1, B1, C1, D1), (A2, B2, C2, D2) ... (A16, B16, C16, D16)} can be measured to obtain the first bandwidth.
[0135] Step 2: Based on the first bandwidth, determine the target device corresponding to the network camera from the set of network devices corresponding to the network camera.
[0136] As an example, when the first bandwidth is determined using the method described in the first example above, the first bandwidth of the network camera when a router and a base station are used to transmit the data collected by the network camera respectively can be compared, so that the intermediate device (such as a router or a base station) corresponding to the larger first bandwidth can be determined as the target device corresponding to the network camera.
[0137] As another example, when the first bandwidth is determined using the method described in the second example above, the first bandwidths corresponding to various connection methods can be compared to determine the target connection method, and then the intermediate device (such as a router or base station) corresponding to the network camera under the target connection method can be determined as the target device corresponding to the network camera.
[0138] Among them, the above-mentioned target connection mode can represent that the sum of each data transmission bandwidth included in the first bandwidth is the largest. Or, the target connection mode can also represent the connection mode with the smallest variance of the corresponding data transmission bandwidth among the connection modes with the larger mean values of each data transmission bandwidth included in the first bandwidth. For example, for the above-mentioned first bandwidth {(A1, B1, C1, D1), (A2, B2, C2, D2)... (A16, B16, C16, D16)}, the average value of each group can be determined (for example, the average value of A1, B1, C1, D1, the average value of A2, B2, C2, D2... the average value of A16, B16, C16, D16). The larger the average value, the greater the overall load. Take the four groups of data with the largest value of 16 / 4=4, and then take the group with the smallest variance among the four groups of data. Such a topological connection has a larger overall load and is more balanced between each path. Use this group of data as the optimal connection to obtain the target connection mode.
[0139] As a third example, when the first bandwidth is greater than the first bandwidth threshold, a base station or router used to transmit data collected by the network camera can be determined as the target device corresponding to the network camera. When the first bandwidth is less than or equal to the first bandwidth threshold, other network cameras in the network camera set (such as any network camera or a network camera that meets the preset conditions) other than the network camera can be determined as the target device corresponding to the network camera.
[0140] It can be understood that in the above optional implementation method, the target device corresponding to the network camera is determined by determining the data transmission bandwidth of the network camera when the network camera uses an intermediate device to transmit data. In this way, during the data transmission process of the network cameras in the network camera set, the bandwidth load can be taken into account, thereby improving the stability of data transmission using the network camera network.
[0141] In some optional implementations of this embodiment, the following method (including the first step and the second step) may be used to perform the above step 102, so as to determine the target device corresponding to the network camera from the set of network devices corresponding to the network camera:
[0142] In the first step, a signal strength of an intermediate device used to transmit data of a network camera in the network camera set is determined to obtain a first strength.
[0143] The intermediate device is a base station or a router.
[0144] The first strength may be the signal strength of an intermediate device (such as a base station or a router) used to transmit data of the network cameras in the network camera set.
[0145] As a first example, for each network camera in the network camera set, the data of the network camera can be transmitted through a router and a base station respectively, so as to obtain the signal strength of the intermediate device (i.e., the router and the base station) used to transmit the data of the network camera when the network camera uses the intermediate device to transmit the data, and obtain the first strength. In this way, the first strength corresponding to each network camera in the network camera set can be obtained.
[0146] As a second example, the first intensity corresponding to only some of the network cameras in the network camera set (for example, network cameras whose data transmission bandwidth for transmitting their collected data through base stations and / or routers is less than a preset threshold) may be determined.
[0147] In addition, the first strength corresponding to each network camera can be determined independently. For example, for each network camera, the first strength of the base station and the router is determined separately when the base station and the router are used to transmit the data collected by the network camera. Alternatively, the first strength corresponding to each network camera can also be considered as a whole. For example, assuming that there are N network cameras connected to the router and the base station at the same time, and each device can be connected to the base station and the router at the same time, there are 2 to the power of N (denoted as m) possibilities. And because each network camera has two network cards to connect, there are a total of m possibilities. Therefore, the first strength corresponding to each of the above m possibilities can be determined.
[0148] In a second step, based on the first strength, a target device corresponding to the network camera is determined from a set of network devices corresponding to the network camera.
[0149] As an example, if the first strength is greater than a preset threshold, then a base station or router used to transmit data collected by the network camera can be determined as the target device corresponding to the network camera. If the first strength is less than or equal to the preset threshold, then other network cameras in the network camera set except the network camera (for example, any network camera or the network camera that meets the preset conditions) can be determined as the target device corresponding to the network camera.
[0150] It can be understood that in the above optional implementation method, the target device corresponding to the network camera is determined by determining the signal strength of the intermediate device when the network camera uses the intermediate device to transmit data. In this way, during the data transmission process of the network cameras in the network camera set, the signal strength of the base station and the router can be taken into account, thereby improving the stability of data transmission using the network camera networking.
[0151] In some optional implementations of this embodiment, the following method (including the first step and the second step) may be used to perform the above step 102, so as to determine the target device corresponding to the network camera from the set of network devices corresponding to the network camera:
[0152] The first step is to determine the data transmission bandwidth and signal strength of the network cameras in the network camera set and the intermediate device for data transmission, and obtain a second bandwidth and a second strength.
[0153] The intermediate device is a base station or a router.
[0154] Here, the second bandwidth may be a data transmission bandwidth for data transmission between the network camera and the intermediate device. The second strength may be a signal strength of the intermediate device when the network camera and the intermediate device are transmitting data.
[0155] Here, the execution method of the above-mentioned first step can refer to the above-mentioned steps one and one, and will not be repeated here.
[0156] The second step is to determine the intermediate device (for example, a base station or a router used to transmit data collected by the network camera when the above conditions (i.e., the second bandwidth is greater than or equal to the second bandwidth threshold, or the second strength is greater than or equal to the second strength threshold)) as the target device corresponding to the network camera when the second bandwidth is greater than or equal to the second bandwidth threshold, or the second strength is greater than or equal to the second strength threshold) when the second bandwidth is less than the second bandwidth threshold, and the second strength is less than the second strength threshold, determine the target device corresponding to the network camera from other network cameras in the network camera set except the network camera (for example, any network camera except the network camera, or network cameras that meet the preset conditions among other network cameras except the network camera).
[0157] It can be understood that in the above optional implementation method, the target device corresponding to the network camera is determined by determining the data transmission bandwidth of the network camera and the signal strength of the intermediate device when the network camera uses the intermediate device to transmit data. In this way, in the process of data transmission by the network cameras in the network camera set, the bandwidth load and the signal strength of the base station and the router can be taken into account, thereby further improving the stability of data transmission using the network camera networking.
[0158] In some optional implementations of this embodiment, or in some application scenarios of the above optional implementations, the above step 102 may be performed in the following manner to determine the target device corresponding to the network camera from the set of network devices corresponding to the network camera:
[0159] First, a target network camera is determined from network cameras other than the network camera in the network camera set.
[0160] Afterwards, the target network camera is determined as the target device corresponding to the network camera.
[0161] The target network camera meets at least one of the following conditions:
[0162] Condition 1: The signal strength of the target network camera is greater than a third strength threshold.
[0163] Condition 2: the target network camera is not currently determined as a target device.
[0164] Condition three: the data transmission bandwidth of the target network camera is greater than a third bandwidth threshold.
[0165] It can be understood that in the above optional implementation, a network camera that meets at least one of the above conditions can be determined as a target device corresponding to another network camera, so that the stability of data transmission using network camera networking can be further improved.
[0166] In some optional implementations of this embodiment, the method is performed when at least one of the following conditions is met:
[0167] Condition 1: The duration during which the data transmission bandwidth of the network cameras in the network camera set is less than the fourth bandwidth threshold is greater than the preset first duration.
[0168] Condition 2: The time difference between the last time the target device corresponding to the network camera was determined and the current time is greater than a preset second time length.
[0169] Condition three: receiving an instruction for determining a target device corresponding to the network camera.
[0170] It can be understood that in the above optional implementation method, at least one of the above conditions can be used as a trigger condition for executing the above steps 101-103, and then the device used to transmit the data collected by the network camera can be re-determined from the network camera, base station and router, and then data transmission is performed through the device, so as to further improve the stability of data transmission using the network camera network.
[0171] The data transmission method provided in the embodiment of the present application can determine the network device set corresponding to the network camera in the network camera set; wherein the network device set corresponding to the network camera includes: other network cameras in the network camera set except the network camera, a base station for transmitting data from the network camera, and a router for transmitting data from the network camera. After that, the target device corresponding to the network camera is determined from the network device set corresponding to the network camera, and then the data collected by the network camera is transmitted through the target device corresponding to the network camera. Therefore, the method does not solidify a single type of device as a relay device, but dynamically determines the network device used to transmit the data collected by the network camera from the three types of devices, namely, network cameras, base stations and routers, and uses it as a relay device. The above three types of devices may be selected as relay devices in different scenarios, and different network cameras can use different types of devices as relay devices, and then transmit data through the relay device. Compared with the scheme of multiple IPCs accessing the base station through WIFI with the base station as the center, and the scheme of using the network camera as a relay device to transmit the data collected by other network cameras to the network video recorder, the method can improve the redundancy of the network camera network, which helps to improve the stability of data transmission using the network camera network.
[0172] Figure 2 A flow chart of another data transmission method provided in an embodiment of the present application. Figure 2 As shown, the method specifically includes:
[0173] Step 201, determining a network device set corresponding to a network camera in a network camera set; wherein the network device set corresponding to the network camera includes: other network cameras in the network camera set except the network camera, a base station for transmitting data by the network camera, and a router for transmitting data by the network camera; when the network camera is in a dual network card mode, the network camera adopts a first transmission mode or a second transmission mode for data transmission; the first transmission mode indicates that an intermediate device for transmitting data collected by the network camera is a base station; the second transmission mode indicates that an intermediate device for transmitting data collected by the network camera is a router.
[0174] In this embodiment, the dual network card mode, that is, the dual station mode, means that the network camera can be connected to two hotspots at the same time, for example, the network camera can be connected to the base station and the router at the same time. However, although the network camera can be connected to the base station and the router at the same time, when performing data transmission, the network camera can only transmit the collected data through one of the base station and the router.
[0175] In addition, step 201 and Figure 1Step 101 in the corresponding embodiment is basically the same and will not be described again here.
[0176] Step 202, determining the data transmission bandwidth groups corresponding to the various topological modes of the network camera set; wherein the topological mode indicates the target transmission mode of each network camera in the network camera set, and the target transmission mode is the first transmission mode or the second transmission mode.
[0177] In this embodiment, the number of topological modes of the network camera set can be determined based on the number of network cameras in the network camera set. For example, assuming that there are N network cameras in the network camera set, and the N network cameras are connected to the router and the base station at the same time, each network camera can transmit the data it collects through the base station or the router, that is, there are 2 possibilities, then there are 2 to the power of N (represented as m) possibilities.
[0178] Each topology may correspond to a data transmission bandwidth group. The number of data transmission bandwidths included in each data transmission bandwidth group may be equal to the number of network cameras included in the network camera set. For example, if there are 4 network cameras, there are a total of 2 to the power of 4, that is, 16 possible selections (that is, 16 topologies), and the bandwidths of the four connection paths under each selection group can be measured {(A1, B1, C1, D1), (A2, B2, C2, D2)...(A16, B16, C16, D16)}. Among them, A1, A2...A16, B1, B2...B16, C1, C2...C16, D1, D2...D16, respectively represent data transmission bandwidths.
[0179] Step 203 : Based on the data transmission bandwidth groups corresponding to the various topological modes, a target device corresponding to the network camera is determined from a set of network devices corresponding to the network camera.
[0180] The target device corresponding to the network camera is used to transmit the data collected by the network camera.
[0181] In this embodiment, the above step 203 may be performed in a variety of ways.
[0182] As an example, the sum of the data transmission bandwidth groups corresponding to each topology mode may be determined first, and then, based on the determined sum, the base station or the router may be determined as the target device corresponding to the network camera.
[0183] In some optional implementations of this embodiment, the above step 203 may also be performed in the following manner, so as to determine the target device corresponding to the network camera from the set of network devices corresponding to the network camera based on the data transmission bandwidth groups corresponding to the various topological modes:
[0184] First, determine the statistical value of the data transmission bandwidth group corresponding to the topology in each topology.
[0185] Each data transmission bandwidth group corresponds to a statistical value, and the statistical value includes a mean value and / or a variance.
[0186] Here, at least one of the mean and variance of the data transmission bandwidth group corresponding to each topology may be determined, or at least one of the mean and variance of the data transmission bandwidth group corresponding to some topologies may be determined.
[0187] As an example, if there are 16 topologies, {(A1, B1, C1, D1), (A2, B2, C2, D2)...(A16, B16, C16, D16)}, then the average values of An, Bn, Cn, and Dn can be calculated, as well as the variances of An, Bn, Cn, and Dn, where n represents any integer from 1 to 16.
[0188] Afterwards, based on the determined statistical value, a target device corresponding to the network camera is determined from a set of network devices corresponding to the network camera.
[0189] Here, a variety of methods may be used to determine the target device corresponding to the network camera from the set of network devices corresponding to the network camera based on the determined statistical value.
[0190] As an example, the topology corresponding to the average value greater than the preset first value may be determined first, then the target transmission mode indicated by the topology may be determined, and then the intermediate device represented by the target transmission mode may be determined as the target device corresponding to the network camera.
[0191] As another example, a topology corresponding to a variance smaller than a preset second value may be first determined, a target transmission mode indicated by the topology may be determined, and an intermediate device represented by the target transmission mode may be determined as a target device corresponding to the network camera.
[0192] As another example, a topology corresponding to a variance greater than a preset first value and less than a preset second value may be first determined, and then a target transmission mode indicated by the topology may be determined, and then an intermediate device represented by the target transmission mode may be determined as a target device corresponding to the network camera.
[0193] It can be understood that in the above optional implementation method, the target device corresponding to the network camera can be determined by calculating the statistical value of the data transmission bandwidth group, so that the total bandwidth load of data transmission and the load balancing between each network camera can be taken into account, thereby further improving the stability of data transmission using network camera networking.
[0194] In some application scenarios of the above optional implementations, the following methods may be used to determine the statistical value of the data transmission bandwidth group corresponding to the topology in each topology:
[0195] First, the average values of the data transmission bandwidth groups corresponding to the topology modes in the various topology modes are determined respectively.
[0196] Afterwards, a target number of topology modes are selected from the topology modes in descending order of mean values to obtain a topology mode set.
[0197] The target number may be a predetermined value or a value determined based on the cardinality of the network camera set.
[0198] Afterwards, the variance of the data transmission bandwidth group corresponding to each topology in the topology set is determined.
[0199] On this basis, the following method can be used to determine the target device corresponding to the network camera from the set of network devices corresponding to the network camera based on the determined statistical value:
[0200] First, a target transmission mode indicated by the topology mode corresponding to the determined minimum variance is determined.
[0201] Afterwards, the intermediate device represented by the determined target transmission mode is determined to obtain the target intermediate device.
[0202] Then, based on the target intermediate device, a target device corresponding to the network camera is determined from a set of network devices corresponding to the network camera.
[0203] As an example, if the data transmission bandwidth of the network camera transmitting the collected data through the target intermediate device is less than the preset bandwidth threshold, then the other network cameras in the network camera set except the network camera can be determined as the target device corresponding to the network camera. If the data transmission bandwidth of the network camera transmitting the collected data through the target intermediate device is greater than or equal to the preset bandwidth threshold, then the target intermediate device can be determined as the target device corresponding to the network camera.
[0204] As another example, if the signal strength of the target intermediate device is less than a preset strength threshold when the network camera transmits the collected data through the target intermediate device, then the other network cameras in the network camera set except the network camera can be determined as the target device corresponding to the network camera. If the signal strength of the target intermediate device is greater than or equal to the preset strength threshold when the network camera transmits the collected data through the target intermediate device, then the target intermediate device can be determined as the target device corresponding to the network camera.
[0205] It can be understood that in the above application scenario, we can first select a topology with a larger mean of the target number to ensure a larger overall load, and then select a topology with the smallest variance to ensure the load balancing of each network camera, thereby further improving the stability of data transmission using network camera networking.
[0206] Step 204: Transmit the data collected by the network camera through the target device corresponding to the network camera.
[0207] In this embodiment, step 204 and Figure 1 Step 103 in the corresponding embodiment is basically the same and will not be described again here.
[0208] It should be noted that, in addition to the above contents, this embodiment may also include Figure 1 The corresponding technical features described in the corresponding embodiments are realized Figure 1 For details on the technical effects of the data transmission method shown, please refer to Figure 1 For the sake of brevity, the relevant description is not repeated here.
[0209] The data transmission method provided in the embodiment of the present application determines the target device corresponding to the network camera based on the data transmission bandwidth groups corresponding to each topology mode. In this way, the data transmission performance of each network camera can be considered as a whole, thereby improving the stability of data transmission as a whole.
[0210] The following is an illustrative description of the embodiments of the present application, but it should be noted that the embodiments of the present application may have the features described below, but the following description does not constitute a limitation on the scope of protection of the embodiments of the present application.
[0211] The current IPC networking mode usually cannot meet the security needs of more and more users in buildings, from near to far, blind spots, and multi-channel stable coverage. In view of this, this solution explores the actual network status of the user's home, utilizes the user's home router and each IPC itself to participate in the networking, and cooperates with the IPC dual-station mode allocation algorithm to further optimize the transmission distance, transmission stability, and transmission path number of the wireless video surveillance set.
[0212] In this embodiment, HOMEBASE represents a base station, where the base station is the camera access point and data processing center of the home security camera management system. For example, the above base station can be a wireless video surveillance kit base station. ROUTER represents a router, such as a home router. Single station mode means that the IPC is connected to only one hotspot. Dual station mode means that the IPC can connect to two hotspots at the same time. Repeater mode: means that the IPC can be a WIFI hotspot and a WIFI client at the same time. WIFI AP is also a WIFI hotspot.
[0213] In this solution, HOMEBASE, routers, multiple IPCs, and IPC repeaters are used for networking. Among them, WIFI4 can be used between HOMEBASE and multiple IPCs. 4-way IPC supports approximately 50 meters (that is, the distance between the IPC and the base station) 4K (that is, the resolution of the IPC). After adding the router to the network, the IPC can be directly connected to the home router, and then connected to the base station through Ethernet. In addition, more than 4-way IPC 50 meters 4K can be expanded, and a total of 8 channels of 50 meters 4K video can be simultaneously streamed. Combined with the IPC's own cascade expansion distance and dual-station allocation algorithm, it can achieve a better distance and bandwidth video surveillance effect under the current hardware conditions.
[0214] Specifically, if Figure 3A As shown, Figure 3A A system architecture diagram of a data transmission method provided in an embodiment of the present application.
[0215] like Figure 3AAs shown in the figure, this solution uses HOMEBASE, routers, multiple IPCs (that is, the above-mentioned network camera collection, including 5 IPCs in the figure), and IPC repeaters for networking. Among them, WIFI4 is used between HOMEBASE and multiple IPCs, and 4-way IPC supports approximately 50 meters 4K. After adding the router networking, the IPC can be directly connected to the home router, and then connected to the base station through Ethernet. In theory, it can be expanded to more than 4 IPCs 50 meters 4K, and a total of 8 channels of 50 meters 4K video can be simultaneously streamed. Combined with the cascade extension distance of the IPC itself and the dual-station allocation algorithm, it can achieve a better video surveillance effect in terms of distance and bandwidth under the current hardware conditions.
[0216] Figure 3A In the example, each IPC may include two network cards (eg, virtual network cards sta1 and sta2). The architecture shown in 3A may transmit video data (ie, data collected by the network camera) through one of three channels.
[0217] Path 1: It consists of the paths shown by reference numerals 10, 20, and 30. The IPC connects to the WIFI of the base station and then reaches the audio and video processing module. After the audio and video processing module completes the processing, it is connected to the router through Ethernet and goes out to the Internet.
[0218] Path 2: It consists of the paths shown by reference numerals 20, 30 and 40. The IPC connects to the router's WIFI, then to the Ethernet port of the HOMEBASE via Ethernet, and then to the audio and video processing module. After the audio and video processing module completes the processing, it is connected to the router via Ethernet to the Internet.
[0219] Path 3 is IPC5 connected to an IPC1 acting as a repeater (as shown by label 50), and IPC1 is then connected to the WIFI of ROUTER or HOMEBASE to transmit video (corresponding to the above-mentioned path 1 or path 2).
[0220] Among them, the above IPC supports repeater mode and dual station mode.
[0221] In addition, the base station can support: mdns (Multicast DNS) discovery protocol and detection bandwidth and allocation algorithm.
[0222] Among them, mdns discovery protocol: HOMEBASE and ROUTER are in the same LAN, HOMEBASE broadcasts its own IP (Internet Protocol) address through the mdns protocol, and IPC can successfully discover the IP of HOMEBASE, so that IPC can connect to the home router and then connect to HOMEBASE through Ethernet.
[0223] The bandwidth detection and allocation algorithm is as follows:
[0224] like Figure 3C As shown, Figure 3C A schematic diagram of a method for determining a target device in a data transmission method provided in an embodiment of the present application.
[0225] In the first step, each IPC turns on the dual-station mode and can be connected to the router and the base station at the same time. At this time, you can try to detect all connections. Assuming that there are N devices connected to the router and the base station at the same time, each device can transmit data through the base station or router at the same time, that is, there are 2 possibilities, then there are 2N possibilities (denoted as m). Because each IPC has two sta (network cards) to connect, there are a total of m possibilities. Each possibility sends 1-2 seconds of 5Mbps data detection, and a total of m groups of possible connection data will be obtained. Then the mean is calculated, and the data groups (that is, the above data transmission bandwidth groups) before the mean are taken to calculate the variance. The connection corresponding to the group of data with the smallest variance is selected as the optimal topology (that is, the topology corresponding to the above minimum variance), so as to select the overall optimal connection topology. For example, 4 IPCs have a total of 24 = 16 possible choices, such as Figure 3B As shown, Figure 3B A schematic diagram of a topological connection in a data transmission method provided in an embodiment of the present application. Figure 3B In the figure, number 60 indicates a possible connection, number 70 indicates another possible connection. There may be 16 groups of such connections in total. Each group sends 5Mbps data for 1-2 seconds. The bandwidth of the four connection paths selected by each group can be measured {(A1, B1, C1, D1), (A2, B2, C2, D2)... (A16, B16, C16, D16)}, and then the average value of each group is calculated. The larger the average value, the greater the overall load. The four groups of data with the largest value of 16 / 4=4 are selected, and then the group with the smallest variance is selected from the four groups of data. This topology connection has a larger overall load and is more balanced between each path. Use this group of data as the optimal connection.
[0226] In the second step, if there is an IPC with a bandwidth less than 30Kbps in the optimal connection in the first step, the IPC with a bandwidth less than 30Kbps is recorded as IPC_A. After that, each IPC starts the repeater mode and searches for the signal strength of the base station, router and all IPCs except itself (that is, other network cameras in the above-mentioned network camera set except this network camera) at the same time, and obtains the signal strength graph and summarizes it back to the base station. At this time, all IPCs will have signal graphs corresponding to all other hotspots. If the RSSI (Received Signal Strength Indicator) of the router or base station currently connected to IPC_A is found to be <-80 (that is, the second strength is less than the second strength threshold), select the IPC list that meets the following conditions (1. The signal strength of the IPC relative to other IPCs acting as candidate repeaters is >-30, that is, the signal strength of the target network camera mentioned above is greater than the third strength threshold. 2. The IPC acting as a candidate repeater itself is not accessed as a repeater by other IPCs, that is, the target network camera is not currently determined as a target device. 3. The current bandwidth of the candidate repeater IPC is greater than 3Mbps, that is, the data transmission bandwidth of the target network camera is greater than the third bandwidth threshold). Select (for example, randomly select) one of the IPCs acting as repeaters that meets the conditions as the hotspot access of IPC_A.
[0227] In addition, during the outflow process of the networking system, the outflow data of each channel is detected. If a certain outflow is lower than 30kbps for a period of time (that is, the data transmission bandwidth of the network camera in the above-mentioned network camera set is less than the fourth bandwidth threshold for a period longer than the preset first period), and the network has not been optimized for a relatively long time recently (that is, the time difference between the time when the target device corresponding to the network camera was determined last time and the current time is greater than the preset second period), a push can be given to the user. Let the user trigger the bandwidth detection and allocation algorithm. When receiving the instruction for determining the target device corresponding to the network camera, the first and second steps are executed.
[0228] It should be noted that, in addition to the contents recorded above, this embodiment may also include the technical features described in the above embodiments, so as to achieve the technical effects of the data transmission method shown above. Please refer to the above description for details. For the sake of brevity, it will not be repeated here.
[0229] The data transmission method provided in the embodiment of the present application can effectively improve the connection transmission distance, data transmission stability, wireless coverage area of the video surveillance system and be applicable to more scenarios by accessing router networking and dual-station detection allocation algorithm. The new connection topology is expanded by accessing the router, increasing the stability and redundancy of the system connection bandwidth.
[0230] Figure 4 A schematic diagram of the structure of a data transmission device provided in an embodiment of the present application. Specifically comprising:
[0231] The first determining unit 401 is used to determine a network device set corresponding to a network camera in the network camera set; wherein the network device set corresponding to the network camera includes: other network cameras in the network camera set except the network camera, a base station for the network camera to transmit data, and a router for the network camera to transmit data;
[0232] The second determining unit 402 is used to determine the target device corresponding to the network camera from the set of network devices corresponding to the network camera;
[0233] The transmission unit 403 is used to transmit the data collected by the network camera through the target device corresponding to the network camera.
[0234] In a possible implementation, when the network camera is in dual network card mode, the network camera uses the first transmission mode or the second transmission mode for data transmission; the first transmission mode indicates that the intermediate device for transmitting the data collected by the network camera is a base station; the second transmission mode indicates that the intermediate device for transmitting the data collected by the network camera is a router; and
[0235] The step of determining a target device corresponding to the network camera from a set of network devices corresponding to the network camera includes:
[0236] Determine the data transmission bandwidth groups corresponding to each topology of the network camera set; wherein the topology indicates the target transmission mode of each network camera in the network camera set, and the target transmission mode is the first transmission mode or the second transmission mode;
[0237] Based on the data transmission bandwidth groups respectively corresponding to the various topological modes, a target device corresponding to the network camera is determined from a set of network devices corresponding to the network camera.
[0238] In a possible implementation, determining the target device corresponding to the network camera from the set of network devices corresponding to the network camera based on the data transmission bandwidth groups corresponding to the respective topological modes includes:
[0239] Determine a statistical value of a data transmission bandwidth group corresponding to a topology in each of the topologies, wherein each data transmission bandwidth group corresponds to a statistical value, and the statistical value includes a mean and / or a variance;
[0240] Based on the determined statistical value, a target device corresponding to the network camera is determined from a set of network devices corresponding to the network camera.
[0241] In a possible implementation manner, determining the statistical value of the data transmission bandwidth group corresponding to the topology in each topology includes:
[0242] Determine respectively the mean value of the data transmission bandwidth group corresponding to the topology in each topology;
[0243] Selecting a target number of topology modes from the various topology modes in descending order of mean values to obtain a topology mode set;
[0244] Determine the variance of the data transmission bandwidth group corresponding to each topology in the topology set; and
[0245] The step of determining a target device corresponding to the network camera from a set of network devices corresponding to the network camera based on the determined statistical value includes:
[0246] Determine a target transmission mode indicated by a topology mode corresponding to the determined minimum variance;
[0247] Determine an intermediate device represented by the determined target transmission mode, and obtain the target intermediate device;
[0248] Based on the target intermediate device, a target device corresponding to the network camera is determined from a set of network devices corresponding to the network camera.
[0249] In a possible implementation, determining the target device corresponding to the network camera from the set of network devices corresponding to the network camera includes:
[0250] Determine the data transmission bandwidth of the network camera in the network camera set when the network camera uses an intermediate device to transmit data, and obtain a first bandwidth, wherein the intermediate device is a base station or a router;
[0251] Based on the first bandwidth, a target device corresponding to the network camera is determined from a set of network devices corresponding to the network camera.
[0252] In a possible implementation, determining the target device corresponding to the network camera from the set of network devices corresponding to the network camera includes:
[0253] Determine the signal strength of an intermediate device used to transmit data of the network cameras in the network camera set to obtain a first strength, wherein the intermediate device is a base station or a router;
[0254] Based on the first strength, a target device corresponding to the network camera is determined from a set of network devices corresponding to the network camera.
[0255] In a possible implementation, determining the target device corresponding to the network camera from the set of network devices corresponding to the network camera includes:
[0256] Determine a data transmission bandwidth and a signal strength for data transmission between a network camera in the network camera set and an intermediate device, and obtain a second bandwidth and a second strength, wherein the intermediate device is a base station or a router;
[0257] When the second bandwidth is greater than or equal to a second bandwidth threshold, or the second strength is greater than or equal to a second strength threshold, determining the intermediate device as a target device corresponding to the network camera;
[0258] When the second bandwidth is smaller than the second bandwidth threshold and the second strength is smaller than the second strength threshold, a target device corresponding to the network camera is determined from other network cameras in the network camera set except the network camera.
[0259] In a possible implementation, determining the target device corresponding to the network camera from the set of network devices corresponding to the network camera includes:
[0260] Determine a target network camera from network cameras other than the network camera in the network camera set;
[0261] Determine the target network camera as the target device corresponding to the network camera;
[0262] The target network camera meets at least one of the following conditions:
[0263] The signal strength of the target network camera is greater than a third strength threshold;
[0264] The target network camera is not currently determined as a target device;
[0265] The data transmission bandwidth of the target network camera is greater than a third bandwidth threshold.
[0266] In a possible implementation, the method is performed when at least one of the following conditions is met:
[0267] The duration during which the data transmission bandwidth of the network cameras in the network camera set is less than the fourth bandwidth threshold is greater than the preset first duration;
[0268] The time difference between the last time the target device corresponding to the network camera was determined and the current time is greater than the preset second time length;
[0269] An instruction for determining a target device corresponding to the network camera is received.
[0270] The data transmission device provided in this embodiment may be as follows Figure 4 The data transmission device shown in can execute all the steps of the above-mentioned data transmission methods, thereby realizing the technical effects of the above-mentioned data transmission methods. For details, please refer to the above-mentioned relevant description. For the sake of brevity, it will not be repeated here.
[0271] Figure 5 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application, Figure 5 The electronic device 500 shown includes: at least one processor 501, a memory 502, at least one network interface 504 and other user interfaces 503. The various components in the electronic device 500 are coupled together via a bus system 505. It is understood that the bus system 505 is used to achieve connection and communication between these components. In addition to the data bus, the bus system 505 also includes a power bus, a control bus and a status signal bus. However, for the sake of clarity, the bus system 505 is not shown in FIG. Figure 5 Various buses are labeled as bus system 505 .
[0272] The user interface 503 may include a display, a keyboard, or a pointing device (eg, a mouse, a trackball, a touch pad, or a touch screen).
[0273] It can be understood that the memory 502 in the embodiment of the present application can be a volatile memory or a non-volatile memory, or can include both volatile and non-volatile memories. Among them, the non-volatile memory can be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory can be a random access memory (RAM), which is used as an external cache. By way of example but not limitation, many forms of RAM are available, such as static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDRSDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM) and direct RAM bus random access memory (DRRAM). The memory 502 described herein is intended to include, but is not limited to, these and any other suitable types of memory.
[0274] In some implementations, the memory 502 stores the following elements, executable units or data structures, or a subset thereof, or an extended set thereof: an operating system 5021 and an application program 5022 .
[0275] Among them, the operating system 5021 includes various system programs, such as a framework layer, a core library layer, a driver layer, etc., which are used to implement various basic services and process hardware-based tasks. The application 5022 includes various application programs, such as a media player (Media Player), a browser (Browser), etc., which are used to implement various application services. The program for implementing the method of the embodiment of the present application can be included in the application 5022.
[0276] In this embodiment, by calling the program or instruction stored in the memory 502, specifically, the program or instruction stored in the application 5022, the processor 501 is used to execute the method steps provided by each method embodiment, for example, including:
[0277] Determine a network device set corresponding to a network camera in the network camera set; wherein the network device set corresponding to the network camera includes: other network cameras in the network camera set except the network camera, a base station used for the network camera to transmit data, and a router used for the network camera to transmit data;
[0278] Determine a target device corresponding to the network camera from a set of network devices corresponding to the network camera;
[0279] The data collected by the network camera is transmitted through the target device corresponding to the network camera.
[0280] The method disclosed in the above embodiment of the present application can be applied to the processor 501, or implemented by the processor 501. The processor 501 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by the hardware integrated logic circuit or software instructions in the processor 501. The above processor 501 can be a general processor, a digital signal processor (Digital Signal Processor, DSP), an application specific integrated circuit (Application Specific Integrated Circuit, ASIC), a field programmable gate array (Field Programmable Gate Array, FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The methods, steps and logic block diagrams disclosed in the embodiments of the present application can be implemented or executed. The general processor can be a microprocessor or the processor can also be any conventional processor, etc. The steps of the method disclosed in the embodiment of the present application can be directly embodied as a hardware decoding processor to execute, or the hardware and software units in the decoding processor can be executed. The software unit can be located in a mature storage medium in the field such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory or an electrically erasable programmable memory, a register, etc. The storage medium is located in the memory 502, and the processor 501 reads the information in the memory 502 and completes the steps of the above method in combination with its hardware.
[0281] It is understood that the embodiments described herein may be implemented in hardware, software, firmware, middleware, microcode, or a combination thereof. For hardware implementation, the processing unit may be implemented in one or more application specific integrated circuits (ASIC), digital signal processors (DSP), digital signal processing devices (DSPDevice, DSPD), programmable logic devices (PLD), field programmable gate arrays (FPGA), general purpose processors, controllers, microcontrollers, microprocessors, other electronic units for performing the above functions of the present application, or a combination thereof.
[0282] For software implementation, the technology described above in this article can be implemented by a unit that performs the functions described above in this article. The software code can be stored in a memory and executed by a processor. The memory can be implemented in the processor or outside the processor.
[0283] The electronic device provided in this embodiment may be Figure 5 The electronic device shown in can execute all the steps of the above-mentioned data transmission methods, thereby realizing the technical effects of the above-mentioned data transmission methods. For details, please refer to the above-mentioned relevant description. For the sake of brevity, it will not be repeated here.
[0284] The embodiment of the present application also provides a storage medium (computer-readable storage medium). The storage medium here stores one or more programs. The storage medium may include a volatile memory, such as a random access memory; the memory may also include a non-volatile memory, such as a read-only memory, a flash memory, a hard disk or a solid-state drive; the memory may also include a combination of the above-mentioned types of memory.
[0285] When one or more programs in the storage medium can be executed by one or more processors, the data transmission method executed on the electronic device side can be implemented.
[0286] The processor is used to execute the data transmission program stored in the memory to implement the following steps of the data transmission method performed on the electronic device side:
[0287] Determine a network device set corresponding to a network camera in the network camera set; wherein the network device set corresponding to the network camera includes: other network cameras in the network camera set except the network camera, a base station used for the network camera to transmit data, and a router used for the network camera to transmit data;
[0288] Determine a target device corresponding to the network camera from a set of network devices corresponding to the network camera;
[0289] The data collected by the network camera is transmitted through the target device corresponding to the network camera.
[0290] The professionals should also be further aware that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented with electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in terms of function in the above description. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0291] The steps of the method or algorithm described in conjunction with the embodiments disclosed herein may be implemented using hardware, a software module executed by a processor, or a combination of the two. The software module may be placed in a random access memory (RAM), a memory, a read-only memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
[0292] It should be understood that the terms used herein are only for the purpose of describing specific example embodiments and are not intended to be limiting. Unless the context clearly indicates otherwise, the singular forms "one", "an" and "said" as used herein may also be meant to include plural forms. The terms "include", "comprise", "contain", and "have" are inclusive, and therefore specify the existence of stated features, steps, operations, elements and / or parts, but do not exclude the existence or addition of one or more other features, steps, operations, elements, parts, and / or combinations thereof. The method steps, processes, and operations described herein are not interpreted as necessarily requiring them to be performed in the specific order described or illustrated, unless the execution order is clearly indicated. It should also be understood that additional or alternative steps may be used.
[0293] The foregoing is merely a specific embodiment of the present invention, which enables those skilled in the art to understand or implement the present invention. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but rather to the widest scope consistent with the principles and novel features claimed herein.
Claims
1. A data transmission method, characterized in that: The method comprises: Determine a network device set corresponding to a network camera in the network camera set; wherein the network device set corresponding to the network camera includes: other network cameras in the network camera set except the network camera, a base station used for the network camera to transmit data, and a router used for the network camera to transmit data; Determine a target device corresponding to the network camera from a set of network devices corresponding to the network camera; The data collected by the network camera is transmitted through the target device corresponding to the network camera.
2. The method according to claim 1, characterized in that When the network camera is in dual network card mode, the network camera uses the first transmission mode or the second transmission mode for data transmission; the first transmission mode indicates that the intermediate device for transmitting the data collected by the network camera is a base station; the second transmission mode indicates that the intermediate device for transmitting the data collected by the network camera is a router; as well as The step of determining a target device corresponding to the network camera from a set of network devices corresponding to the network camera includes: Determine the data transmission bandwidth groups corresponding to each topology of the network camera set; wherein the topology indicates the target transmission mode of each network camera in the network camera set, and the target transmission mode is the first transmission mode or the second transmission mode; Based on the data transmission bandwidth groups respectively corresponding to the various topological modes, a target device corresponding to the network camera is determined from a set of network devices corresponding to the network camera.
3. The method according to claim 2, characterized in that The determining, based on the data transmission bandwidth groups respectively corresponding to the various topological modes, from the set of network devices corresponding to the network camera, a target device corresponding to the network camera comprises: Determine a statistical value of a data transmission bandwidth group corresponding to a topology in each of the topologies, wherein each data transmission bandwidth group corresponds to a statistical value, and the statistical value includes a mean and / or a variance; Based on the determined statistical value, a target device corresponding to the network camera is determined from a set of network devices corresponding to the network camera.
4. The method according to claim 3, characterized in that The determining of the statistical value of the data transmission bandwidth group corresponding to the topology in each topology includes: Determine respectively the mean value of the data transmission bandwidth group corresponding to the topology in each topology; Selecting a target number of topology modes from the various topology modes in descending order of mean values to obtain a topology mode set; Determine the variance of the data transmission bandwidth group corresponding to each topology in the topology set; and The step of determining a target device corresponding to the network camera from a set of network devices corresponding to the network camera based on the determined statistical value includes: Determine a target transmission mode indicated by a topology mode corresponding to the determined minimum variance; Determine an intermediate device represented by the determined target transmission mode, and obtain the target intermediate device; Based on the target intermediate device, a target device corresponding to the network camera is determined from a set of network devices corresponding to the network camera.
5. The method according to claim 1, characterized in that The step of determining a target device corresponding to the network camera from a set of network devices corresponding to the network camera includes: Determine the data transmission bandwidth of the network camera in the network camera set when the network camera uses an intermediate device to transmit data, and obtain a first bandwidth, wherein the intermediate device is a base station or a router; Based on the first bandwidth, a target device corresponding to the network camera is determined from a set of network devices corresponding to the network camera.
6. The method according to claim 1, characterized in that The step of determining a target device corresponding to the network camera from a set of network devices corresponding to the network camera includes: Determine the signal strength of an intermediate device used to transmit data of the network cameras in the network camera set to obtain a first strength, wherein the intermediate device is a base station or a router; Based on the first strength, a target device corresponding to the network camera is determined from a set of network devices corresponding to the network camera.
7. The method according to claim 1, characterized in that The step of determining a target device corresponding to the network camera from a set of network devices corresponding to the network camera includes: Determine a data transmission bandwidth and a signal strength for data transmission between network cameras in the network camera set and an intermediate device to obtain a second bandwidth and a second strength, wherein the intermediate device is a base station or a router; When the second bandwidth is greater than or equal to a second bandwidth threshold, or the second strength is greater than or equal to a second strength threshold, determining the intermediate device as a target device corresponding to the network camera; When the second bandwidth is smaller than the second bandwidth threshold and the second strength is smaller than the second strength threshold, a target device corresponding to the network camera is determined from other network cameras in the network camera set except the network camera.
8. The method according to claim 1, characterized in that The step of determining a target device corresponding to the network camera from a set of network devices corresponding to the network camera includes: Determine a target network camera from network cameras other than the network camera in the network camera set; Determine the target network camera as the target device corresponding to the network camera; The target network camera meets at least one of the following conditions: The signal strength of the target network camera is greater than a third strength threshold; The target network camera is not currently determined as a target device; The data transmission bandwidth of the target network camera is greater than a third bandwidth threshold.
9. The method according to any one of claims 1 to 8, characterized in that: The method is performed when at least one of the following conditions is met: The duration during which the data transmission bandwidth of the network cameras in the network camera set is less than the fourth bandwidth threshold is greater than the preset first duration; The time difference between the last time the target device corresponding to the network camera was determined and the current time is greater than the preset second time length; An instruction for determining a target device corresponding to the network camera is received.
10. A data transmission device, characterized in that: The device comprises: A first determining unit is used to determine a network device set corresponding to a network camera in the network camera set; wherein the network device set corresponding to the network camera includes: other network cameras in the network camera set except the network camera, a base station used for the network camera to transmit data, and a router used for the network camera to transmit data; A second determining unit, used to determine a target device corresponding to the network camera from a set of network devices corresponding to the network camera; The transmission unit is used to transmit the data collected by the network camera through the target device corresponding to the network camera.
11. An electronic device, characterized in that: include: Memory for storing computer programs; A processor, configured to execute a computer program stored in the memory, and when the computer program is executed, implement the method described in any one of claims 1 to 9.
12. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method described in any one of claims 1 to 9 is implemented.
