Data uploading method and device, electronic equipment and storage medium
By finding a second device that meets the transmission conditions in the network of the smart device and establishing a second network, the monitoring data is transmitted to the second device, the problem of slow data upload speed in the signal attenuation environment of the smart device is solved, and timely uploading and efficient transmission of the monitoring data is realized.
Patent Information
- Application Number
- CN202411781121.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-05
- Publication Date
- 2025-03-07
AI Technical Summary
When smart devices are far away from the signal source, signal attenuation problems will occur, resulting in slow data upload speed and inability to upload monitoring data in time.
When a target event is detected, the monitoring data is obtained, and the second device that meets the transmission conditions is found in the network established by the first device and the server, a second network is established, the monitoring data is transmitted to the second device, and the data is uploaded to the server using the second device.
By using the second device as data transfer, we ensure that the monitoring data can be uploaded in time, improve data transmission efficiency, and meet users' real-time monitoring needs.
Smart Images

Figure CN119584336A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology. Specifically, the present application relates to a data uploading method, device, electronic device, storage medium and computer program product. Background Art
[0002] With the rapid development of Internet of Things technology, more and more smart devices are entering people's lives. People deploy various types of smart devices in the space, and use smart devices to monitor the space, so as to understand the status of the space in real time.
[0003] Specifically, after the smart device detects an event in the space, it will collect monitoring data and upload it to the server. The server will then send a notification to the user via the wide area network. Then, the user will be able to view the event using a smartphone.
[0004] However, some smart devices are placed far away from the signal source, which may cause signal attenuation. Then, the data upload speed of the smart device will be affected, which will cause users to be unable to understand the status of the space in a timely manner.
[0005] From the above, we can see that the slow data upload speed of smart devices has become a problem that needs to be solved urgently. Summary of the invention
[0006] The present application provides a data uploading method, device, electronic device and storage medium, which can solve the problem of slow data uploading speed of smart devices in related technologies. The technical solution is as follows:
[0007] According to one aspect of the present application, a data uploading method includes: when a target event is detected to be triggered, obtaining monitoring data of the target event; the monitoring data is used to describe the target event monitored by a first device; detecting whether the network status of the first network meets the transmission conditions of the monitoring data; the first network is a network established by the first device and a server; if not, searching for a second device in the first network; the second device is a device that meets the transmission conditions of the monitoring data; establishing a second network between the first device and the second device, and transmitting the monitoring data to the second device through the second network, and uploading the monitoring data to the server using the second device.
[0008] According to one aspect of the present application, a data uploading device includes: a data acquisition module, which is used to acquire monitoring data of the target event when a target event is detected to be triggered; the monitoring data is used to describe the target event monitored by a first device; a network detection module, which is used to detect whether the network status of the first network meets the transmission conditions of the monitoring data; the first network is a network established by the first device and a server; a device search module, which is used to search for a second device in the first network if the conditions are not met; the second device is a device that meets the transmission conditions of the monitoring data; a data transmission module, which is used to establish a second network between the first device and the second device, and transmit the monitoring data to the second device through the second network, and use the second device to upload the monitoring data to the server.
[0009] In an exemplary embodiment, the data acquisition module is also used to acquire the working data of the first device; the working data is data generated when the first device is working; based on the working data, it is detected whether the target event is triggered; if so, it is requested to record the monitoring data of the target event.
[0010] In an exemplary embodiment, the network detection module is also used to detect the network quality between the first device and the server; the network quality includes one or more of network transmission rate, network signal strength, and network transmission delay; if one of the network transmission rate, network signal strength, and network delay in the network quality exceeds a set threshold, it is determined that the network condition is detected to not meet the transmission condition.
[0011] In an exemplary embodiment, the first network also includes at least one smart device; the device search module is also used to detect the network quality between each of the smart devices and the first device, and / or the network quality between each of the smart devices and the server, and select the smart device whose network quality meets the set conditions as the second device.
[0012] In an exemplary embodiment, the data transmission module is also used to perform network preprocessing on each intelligent device under the first network so that the network quality of the first device and the second device meets the set conditions; create a network between the first device and the second device, and configure transmission rules to obtain the second network.
[0013] In an exemplary embodiment, the data transmission module is further used to adjust the network bandwidth of each of the smart devices to reduce the network bandwidth allocated to other smart devices except the first device and the second device to increase the network bandwidth of the first device and the second device.
[0014] In an exemplary embodiment, the data transmission module is also used to configure priorities for different target events, so that when there are monitoring data corresponding to multiple target events, the corresponding monitoring data is uploaded to the server in the order of the priorities of each target event.
[0015] In an exemplary embodiment, the data uploading device is also used to store the monitoring data in the first device if the second device is not found, until the network condition of the first network meets the transmission conditions, and control the first device to upload the monitoring data to the server through the first network.
[0016] In an exemplary embodiment, the data uploading device is also used to store the monitoring data in the first device if it is detected that the second device fails to upload the monitoring data, until the network condition of the first network meets the transmission condition, and control the first device to upload the monitoring data to the server through the first network.
[0017] In an exemplary embodiment, the data uploading device is also used to store the monitoring data in the first device if it is detected that the second device fails to upload the monitoring data, and to search the first network again for a third device that meets the transmission conditions of the monitoring data; if the third device is found again, a second network is established between the first device and the third device, and the monitoring data is transmitted to the third device via the second network, and the monitoring data is uploaded to the server using the third device.
[0018] In an exemplary embodiment, the data uploading device is further configured to stop data transmission to the second device if it is detected that the second device successfully uploads the monitoring data.
[0019] In an exemplary embodiment, the data uploading device is further used to control the first device to upload the monitoring data to the server through the first network if it is detected that the network status meets the transmission condition.
[0020] According to one aspect of the present application, a data uploading system comprises a first device, a second device, a server and a network device; the first device is used to obtain monitoring data of the target event when a target event is detected to be triggered; the monitoring data is used to describe the target event monitored by the first device; it is detected whether the network status of the first network meets the transmission conditions of the monitoring data; the first network is a network established by the first device and the server; if not, a second device is searched in the first network; the second device is a device that meets the transmission conditions of the monitoring data; a second network is established between the first device and the second device, and the monitoring data is transmitted to the second device through the second network, and the monitoring data is uploaded to the server by the second device; the second device is used to receive the monitoring data transmitted by the first device and upload the monitoring data to the server; the server is used to receive the monitoring data uploaded by the first device or the second device; the network device is used to establish a network connection between the first device and the server, and between the second device and the server.
[0021] In an exemplary embodiment, the first device is a smart door lock, and the second device is another smart device different from the smart door lock.
[0022] According to one aspect of the present application, an electronic device includes at least one processor and at least one memory, wherein the memory stores a computer program, and when the computer program is executed by the processor, the data uploading method as described above is implemented.
[0023] According to one aspect of the present application, a storage medium stores a computer program thereon, and when the computer program is executed by one or more processors, the data uploading method as described above is implemented.
[0024] According to one aspect of the present application, a computer program product includes a computer program, and when the computer program is executed by one or more processors, the data uploading method as described above is implemented.
[0025] The beneficial effects of the technical solution provided by this application are:
[0026] In the above technical solution, when the network condition between the first device and the server does not meet the transmission conditions of the monitoring data, the second device is searched in the first network, and a network connection is established between the first device and the second device, so that the second device is used as a data transfer, and the monitoring data is uploaded to the server via the second device, thereby ensuring the efficiency of data transmission and avoiding data transmission obstacles caused by poor network conditions between the first device and the server, thereby ensuring that the monitoring data can be uploaded in time, thereby meeting the user's real-time monitoring needs and facilitating the user to handle sudden target events in a timely manner. BRIEF DESCRIPTION OF THE DRAWINGS
[0027] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the drawings required for use in the description of the embodiments of the present application. Obviously, the drawings described below are only some embodiments of the present application, and those skilled in the art can obtain other drawings based on these drawings without creative work.
[0028] Figure 1 It is a schematic diagram of the implementation environment involved in this application;
[0029] Figure 2 is a hardware structure diagram of an electronic device according to an exemplary embodiment;
[0030] Figure 3 is a flow chart of a data uploading method according to an exemplary embodiment;
[0031] Figure 4 yes Figure 2 A flowchart of step 330 in one embodiment corresponding to the embodiment;
[0032] Figure 5 yes Figure 2 A flowchart of step 370 in one embodiment corresponding to the embodiment;
[0033] Figure 6 It is a schematic diagram of a specific implementation of a data uploading method in an application scenario;
[0034] Figure 7 yes Figure 6 A schematic diagram of the network topology involved in the application scenario;
[0035] Figure 8 is a structural block diagram of a data uploading device according to an exemplary embodiment;
[0036] Fig. 9 It is a structural block diagram of an electronic device according to an exemplary embodiment. DETAILED DESCRIPTION
[0037] The embodiments of the present application are described in detail below, and examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present application, and cannot be interpreted as limiting the present application.
[0038] It will be understood by those skilled in the art that, unless expressly stated, the singular forms "one", "said", and "the" used herein may also include plural forms. It should be further understood that the term "comprising" used in the specification of the present disclosure refers to the presence of the features, integers, steps, operations, elements, and / or components, but does not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and / or groups thereof. It should be understood that when we refer to an element as being "connected" or "coupled" to another element, it may be directly connected or coupled to the other element, or there may be intermediate elements. In addition, the "connection" or "coupling" used herein may include wireless connection or wireless coupling. The term "and / or" used herein includes all or any unit and all combinations of one or more associated listed items.
[0039] As mentioned earlier, some smart devices are placed far away from the signal source, which may cause signal attenuation.
[0040] For example, if the smart device is a smart door lock, it has its own Wi-Fi module with networking function. The Wi-Fi bandwidth is generally 2.4GHz. At the same time, the smart door lock is generally installed at the gate. The distance between the router and the smart door lock is remote and needs to pass through the wall. When the router signal is transmitted to the smart door lock, it has actually been severely attenuated.
[0041] In addition, the smart door lock uploads a video clip every 3 seconds (when the transmission rate is 1.2Mbps, the amount of data transmitted after 3 seconds is approximately 460.8KB), and the interval timeout for the best user experience is set to 60s, which means that 23KB / s needs to be guaranteed.
[0042] In other words, the system needs to upload the video clip to the server within 60 seconds to ensure that users can view the video of the target event within a reasonable time. In order to complete the data transmission within 60 seconds, a stable transmission rate of at least 23KB / s is required. However, in a weak network environment, it is difficult to maintain a transmission rate of 23KB / s.
[0043] As can be seen from the above, the related technology still has the defect of slow data upload speed of smart devices.
[0044] To this end, the data upload method provided in the present application can effectively improve the efficiency of data uploading. Accordingly, the data upload method is suitable for a data uploading device, which can be deployed in an electronic device, and the electronic device can also be an electronic device with a central control function, for example, the electronic device includes a gateway, etc.; the electronic device can also be a smart door lock.
[0045] In order to make the objectives, technical solutions and advantages of the present application clearer, the implementation methods of the present application will be further described in detail below with reference to the accompanying drawings.
[0046] Figure 1 Schematic diagram of an implementation environment involved in a method for uploading data. The implementation environment at least includes a user terminal 110, a smart device 130, a server 170, and a network device. Figure 1 In the embodiment, the network devices include a gateway 150 and a router 190, which is not specifically limited herein.
[0047] Among them, the user terminal 110, which can also be considered as a user end or terminal, can deploy (also understood as install) the client associated with the smart device 130. This user terminal 110 can be an electronic device such as a smart phone, a tablet computer, a laptop computer, a desktop computer, a smart control panel, other devices with display and control functions, etc., which are not limited here.
[0048] Among them, the client is associated with the smart device 130, which essentially means that the user registers an account in the client and configures the smart device 130 in the client. For example, the configuration includes adding a device identifier to the smart device 130, so that when the client is run in the user terminal 110, it can provide the user with functions such as device display and device control of the smart device 130. This client can be in the form of an application or a web page. Accordingly, the interface for device display on the client can be in the form of a program window or a web page, which is not limited here.
[0049] The smart device 130 is deployed in the gateway 150, and communicates with the gateway 150 through its own configured communication module, and is then controlled by the gateway 150. It should be understood that the smart device 130 generally refers to one of the multiple smart devices 130, and the embodiment of the present application only takes the smart device 130 as an example, that is, the embodiment of the present application does not limit the number and device type of smart devices deployed in the gateway 150. In an application scenario, the smart device 130 accesses the gateway 150 through a local area network, and is thus deployed in the gateway 150. The process of the smart device 130 accessing the gateway 150 through the local area network includes: the gateway 150 first establishes a local area network, and the smart device 130 joins the local area network established by the gateway 150 by connecting to the gateway 150. This local area network includes, but is not limited to: ZIGBEE or Bluetooth. Among them, the smart device 130 can be a smart printer, a smart fax machine, a smart camera, a smart air conditioner, a smart door lock, a smart light, or a human body sensor equipped with a communication module, a door and window sensor, a temperature and humidity sensor, a water immersion sensor, a natural gas alarm, a smoke alarm, a wall switch, a wall socket, a wireless switch, a wireless wall sticker switch, a magic cube controller, a curtain motor, a millimeter wave radar, etc.
[0050] The interaction between the user terminal 110 and the smart device 130 can be achieved through a local area network or a wide area network. In one application scenario, the user terminal 110 establishes a communication connection between the router 190 and the gateway 150 in a wired or wireless manner. For example, the wired or wireless manner includes but is not limited to WIFI, so that the user terminal 110 and the gateway 150 are deployed in the same local area network, so that the user terminal 110 can interact with the smart device 130 through the local area network path. In another application scenario, the user terminal 110 establishes a communication connection between the server 170 and the gateway 150 in a wired or wireless manner. For example, the wired or wireless manner includes but is not limited to 2G, 3G, 4G, 5G, WIFI, etc., so that the user terminal 110 and the gateway 150 are deployed in the same wide area network, so that the user terminal 110 can interact with the smart device 130 through the wide area network path.
[0051] The server end 170 may also be considered as a cloud, a cloud platform, a platform end, a service end, etc. The server end 170 may be a server, a server cluster consisting of multiple servers, or a cloud computing center consisting of multiple servers, so as to better provide background services to a large number of user terminals 110. For example, the background service includes a data upload service.
[0052] In one application scenario, a data upload system is provided, which includes a first device, a second device, a server, and a network device; the first device and the second device may be different smart devices 130, the server may be a server 170, and the network device may be a gateway 150 or a router 190. Specifically, the first device is used to obtain monitoring data of a target event when a target event is detected to be triggered; the monitoring data is used to describe the target event monitored by the first device; it is detected whether the network status of the first network meets the transmission conditions of the monitoring data; the first network is a network established by the first device and the server; if not, the second device is searched in the first network; the second device is a device that meets the transmission conditions of the monitoring data; a second network is established between the first device and the second device, and the monitoring data is transmitted to the second device through the second network, and the monitoring data is uploaded to the server by the second device; the second device is used to receive the monitoring data transmitted by the first device and upload the monitoring data to the server; the server is used to receive the monitoring data uploaded by the first device or the second device; the network device is used to establish a network connection between the first device and the server, and between the second device and the server.
[0053] In a possible implementation, the first device is a smart door lock, and the second device is another smart device different from the smart door lock. If the first network between the smart door lock and the server does not meet the transmission conditions of the monitoring data, the second device is searched in the first network, and the second device is a smart device 130 that meets the transmission conditions of the monitoring data. Then, a second network is established between the smart door lock and the second device, and the smart door lock is controlled to transmit the monitoring data to the second device through the second network, and then uploaded to the server 170 through the second device. Among them, the smart doorbell can integrate modules such as camera module, wireless module, infrared sensor module, doorbell module, door lock vibration sensor module, etc., which are not limited here.
[0054] Through the above process, when the first network between the smart door lock and the server does not meet the transmission conditions for the monitoring data, a second network can be established between other smart devices that meet the transmission conditions and the smart door lock, so that other smart devices can be used as data transfer, and the monitoring data can be uploaded to the server via other smart devices, thereby ensuring the efficiency of data transmission and avoiding data transmission obstacles caused by poor network conditions between the smart door lock and the server, thereby ensuring that the monitoring data can be uploaded in a timely manner, thereby meeting the user's real-time monitoring needs and facilitating the user to handle sudden target events in a timely manner.
[0055] See also Figure 2 , Figure 2 is a hardware structure diagram of an electronic device according to an exemplary embodiment. The electronic device can be applied to Figure 1 The gateway 150 in the illustrated implementation environment may also be a smart door lock.
[0056] It should be noted that the electronic device is only an example adapted to the present application and cannot be considered to provide any limitation on the scope of use of the present application. The electronic device cannot be interpreted as requiring dependence on or having Figure 2 One or more components of exemplary electronic device 200 are shown.
[0057] The hardware structure of the electronic device 200 may vary greatly due to different configurations or performances, such as Figure 2 As shown, the electronic device 200 includes: a power supply 210 , an interface 230 , at least one memory 250 , and at least one central processing unit (CPU) 270 .
[0058] Specifically, the power supply 210 is used to provide operating voltage for each hardware device on the electronic device 200 .
[0059] The interface 230 includes at least one wired or wireless network interface 231 for interacting with external devices. Figure 1 The interaction between the gateway 130 and the smart device 130 in the implementation environment is shown.
[0060] Of course, in other examples adapted by the present application, the interface 230 may further include at least one serial-to-parallel conversion interface 233, at least one input-output interface 235, and at least one USB interface 237, etc. Figure 2 As shown, this is not intended to be a specific limitation.
[0061] The memory 250 is a carrier for storing resources, which may be a read-only memory, a random access memory, a disk or an optical disk, etc. The resources stored thereon include an operating system 251, an application 253 and data 255, etc. The storage method may be temporary storage or permanent storage.
[0062] Among them, the operating system 251 is used to manage and control various hardware devices and application programs 253 on the electronic device 200 to enable the central processor 270 to calculate and process the massive data 255 in the memory 250. It can be WindowsServerTM, Mac OS XTM, UnixTM, LinuxTM, FreeBSDTM, etc.
[0063] The application program 253 is a computer program formed by computer-readable instructions based on the operating system 251 to complete at least one specific task, and may include at least one module ( Figure 2 Each module may include corresponding computer-readable instructions. For example, the data uploading device may be regarded as an application 253 deployed in the electronic device 200.
[0064] The data 255 may be photos, pictures, etc. stored in a disk, or monitoring data, etc. stored in the memory 250 .
[0065] The central processor 270 may include one or more processors and is configured to communicate with the memory 250 through at least one communication bus to read the computer program stored in the memory 250, thereby realizing the operation and processing of the mass data 255 in the memory 250. For example, the data uploading method is completed by the central processor 270 reading the application program 253 stored in the memory 250.
[0066] In addition, the present application can also be implemented through hardware circuits or hardware circuits combined with software. Therefore, the implementation of the present application is not limited to any specific hardware circuits, software, or a combination of the two.
[0067] See also Figure 3 The present application embodiment provides a data uploading method, which is applicable to an electronic device, for example, the electronic device may be Figure 1 The gateway 150 in the implementation environment is shown, and can also be a smart door lock. The hardware structure of the electronic device can be as follows Figure 2 shown.
[0068] In the following method embodiments, for ease of description, the execution subject of each step of the method is taken as an electronic device as an example for illustration, but this does not constitute a specific limitation.
[0069] like Figure 3 As shown, the method may include the following steps:
[0070] Step 310: When a target event is detected to be triggered, monitoring data of the target event is obtained.
[0071] Among them, the monitoring data is used to describe the target event monitored by the first device. The form of the monitoring data is related to the function of the first device. If the first device has an image acquisition function, then the monitoring data of the first device can be a video or an image, which is not specifically limited here.
[0072] The target event may be an event set for a specific situation, such as a visitor event, for example, someone staying, ringing the doorbell, and other visitor-related events; or a security event, for example, lock picking, and other security-related events.
[0073] It should be noted that the first device can be used to monitor the scene. When the first device detects that a target event occurs in the scene, the scene can be collected through the first device to obtain monitoring data related to the target event.
[0074] For example, if the target event includes lock picking, and the first device is a smart door lock, when the first device detects the lock picking behavior, the camera module can be called to shoot the lock picking behavior, thereby obtaining relevant video data.
[0075] Step 330: Detect whether the network status of the first network meets the transmission conditions of the monitoring data.
[0076] The first network is a network established between the first device and the server, and the first device is an intelligent device having a function of monitoring target events.
[0077] In a possible implementation, the first device monitors a target event and generates monitoring data of the target event.
[0078] First of all, it should be noted that the setting of target events is to effectively trigger monitoring and data collection in specific situations, so as to quickly respond to target events and meet user needs, for example, notifying users to handle target events, controlling the execution of automated control solutions, etc.
[0079] Then, in order to respond quickly to the target event, it is necessary to provide timely feedback to the user after obtaining the target event. Therefore, the first device can be controlled to upload the monitoring data to the server through the first network, so that the server transmits the monitoring data to the user terminal, so that the user can view the target event through the user terminal, thereby helping the user to handle the target event in a timely manner.
[0080] Regarding the transmission conditions, it refers to the conditions for judging whether the network conditions can smoothly upload the monitoring data to the server. Specifically, the transmission conditions can be whether the network connection between the first device and the server is established normally. If the network connection is not established or interrupted, the monitoring data cannot be transmitted. It can also be the transmission speed of the first network. Through the transmission speed test, it is ensured that the transmission speed supports the uploading of the monitoring data. It can also be the network delay. The network delay between the first device and the server is measured to ensure that the network delay is within an acceptable range. It can also be whether the network is stable, whether the data packet loss rate is too high, and other conditions, which are not specifically limited here.
[0081] It should be noted that by judging whether the network status meets the transmission conditions, it is easy to meet the user's real-time monitoring needs. It can be understood that if the target event indicates that someone has picked the lock, the user needs to be reminded in time to protect the user's property safety and personal safety.
[0082] Then, due to the abnormality of the network condition between the first device and the server, the monitoring data cannot be uploaded to the server in time, and thus cannot be responded in time.
[0083] In order to avoid the monitoring data being unable to be uploaded to the server in a timely manner, before preparing to upload the monitoring data, it is possible to detect whether the network conditions between the first device and the server meet the transmission conditions of the monitoring data. If the transmission conditions of the monitoring data are met, it indicates that the network conditions are normal, and the monitoring data can be uploaded to the server through the first device via the first network.
[0084] If the transmission conditions of the monitoring data cannot be met, the inventors found that although the first network is a network established by the first device and the server, the server can also establish connections with different smart devices to form an interconnected Internet of Things, that is, the first network can be an Internet of Things, and there can be multiple smart devices under the Internet of Things. Then, if there are multiple smart devices (such as smart door locks, smart TVs, smart fish tanks, smart cameras, etc.) connected to the first network, when the first device collects the target event, it can use other smart devices to work together to help the first device maintain data transmission, thereby ensuring that the monitoring data is uploaded to the server in a timely manner.
[0085] In one possible implementation, if any one of the network conditions of the first device (such as a smart door lock) signal scan (<-90db), heartbeat delay time (>3S), and uplink transmission rate (<1K) occurs, it is deemed that the transmission conditions of the monitoring data cannot be met.
[0086] Therefore, when the network condition does not meet the transmission conditions of the monitoring data, a smart device that can assist the first device in uploading the monitoring data can be searched for under the first network.
[0087] Specifically, step 350 is executed to search for a second device in the first network, wherein the second device is a device that meets the transmission conditions of the monitoring data.
[0088] It is understood that the second device has the ability to smoothly upload the monitoring data to the server to meet the user's real-time monitoring needs. In other words, the second device can refer to a device whose network conditions such as network connection status, network bandwidth, network delay, and connection stability meet the transmission conditions of the monitoring data.
[0089] Step 370: establish a second network between the first device and the second device, transmit the monitoring data to the second device via the second network, and upload the monitoring data to the server using the second device.
[0090] The second network refers to a network connection between the first device and the second device, and is used for the first device to transmit the monitoring data to the second device when the first device cannot directly upload the monitoring data to the server.
[0091] In one possible implementation, the network connection between the first device and the second device may be achieved through a local area network (eg, Wi-Fi, Bluetooth) or other short-range communication methods.
[0092] First of all, it should be noted that the first network relies on external Internet connection. Different from the first network, the second network belongs to the local network, that is, data is transmitted between devices in the same local area network or short-distance network. The data transmission of the local network does not rely on the external Internet connection. When the external network signal is poor or unstable, data can be transmitted between smart devices in the local network. In addition, the data transmission speed of the local network is faster. In the environment of Wi-Fi or other short-distance high-bandwidth connections (such as Bluetooth), data can be transmitted to another smart device in almost real time, thereby reducing delays.
[0093] That is to say, although the network condition between the first device and the server is poor, it will not affect the data transmission between the first device and the second device. Therefore, the first device can transmit the monitoring data to the second device through the second network. Further, as mentioned above, if the network condition between the second device and the server meets the transmission conditions of the monitoring data, then the second device can be used to quickly upload the received monitoring data to the server, and the server can transmit the monitoring data to the user terminal, so that the user can handle the target event in a timely manner.
[0094] It is also noted that, although the first network may include the first device and the second device, the network conditions between the first device and the server and the network conditions between the second device and the server are not the same. The reasons for the difference in network conditions may be physical interference, network protocol and technology differences, bandwidth differences, etc.
[0095] For example, when there is a wall obstacle between the first device and the network device (for example, a router), interference in the physical environment may cause the network quality between the first device and the server to be lower than that of the second device; for another example, the traffic generated by other smart devices in the first network may cause bandwidth congestion. At a certain moment, the bandwidth of the first device may be occupied by other smart devices, while the second device is idle. It should be noted that the above scheme is only an exemplary description and does not constitute a limitation of the present invention.
[0096] It is further explained that, since the second network can support high-speed transmission network transmission rate, when the first device transmits the monitoring data to the second device, it can take advantage of the high-speed transmission of the second network and the good network condition between the second device and the server. When the second device starts to receive some monitoring data, it can immediately upload the received monitoring data fragments to the server, instead of waiting until all monitoring data are received before starting to upload. This method greatly shortens the overall delay of data upload, allowing monitoring data to reach the server faster, further meeting the user's real-time monitoring needs.
[0097] Therefore, when the network condition between the first device and the server is not good, the second device with better network condition can be used as a relay for data transmission to upload the monitoring data to the server through the second device.
[0098] Through the above process, when the network condition between the first device and the server does not meet the transmission conditions of the monitoring data, the second device is searched in the first network, and a network connection is established between the first device and the second device, so that the second device is used as a data transfer, and the monitoring data is uploaded to the server via the second device, thereby ensuring the efficiency of data transmission and avoiding data transmission obstacles caused by poor network conditions between the first device and the server, thereby ensuring that the monitoring data can be uploaded in time, thereby meeting the user's real-time monitoring needs and facilitating the user to handle sudden target events in a timely manner.
[0099] In an exemplary embodiment, the method may further include the following steps: if it is detected that the network condition meets the transmission condition, controlling the first device to upload the monitoring data to the server through the first network.
[0100] It can be understood that if the network conditions between the first device and the server meet the transmission conditions of the monitoring data, then there is no need to search for the second device in the first network. The monitoring data can be directly uploaded to the server using the first device, saving data transfer time, thereby meeting the user's real-time monitoring needs.
[0101] In an exemplary embodiment, the method may further include the following steps: if the second device is not found in the first network, storing the monitoring data in the first device until the network condition of the first network meets the transmission conditions, and controlling the first device to upload the monitoring data to the server through the first network.
[0102] It should be noted that when it is detected that the network conditions between the first device and the server do not meet the transmission conditions of the monitoring data, and no second device that meets the transmission conditions of the monitoring data is found in the first network, the first device can temporarily store the monitoring data in the local storage space to avoid data loss.
[0103] After temporarily storing the monitoring data in the local storage space, the network status of the first network may be detected periodically or intermittently until the network status meets the transmission conditions of the monitoring data. When it is detected that the network status meets the transmission conditions of the monitoring data, the first device may automatically upload the previously stored monitoring data to the server via the first network.
[0104] Through the above process, it is ensured that when the network condition of the first network is poor and there is no suitable second device, the monitoring data can still be properly saved and automatically uploaded after the network condition is restored, thereby avoiding data loss due to network instability.
[0105] In an exemplary embodiment, the method may further include the following steps: if it is detected that the second device fails to upload the monitoring data, the monitoring data is stored in the first device until the network status of the first network meets the transmission conditions, and the first device is controlled to upload the monitoring data to the server through the first network.
[0106] It is understandable that if the second device cannot successfully upload the monitoring data to the server, then in order to avoid the loss of the monitoring data, the first device may temporarily store the monitoring data in a local storage space to avoid data loss.
[0107] It should be noted that storing the monitoring data in the first device can ensure data integrity. On the one hand, the first device may not have fully transmitted the monitoring data to the second device; on the other hand, the second device may be a relay device with a relatively simple function, lacking sufficient storage space and; in addition, concentrating the detection data storage responsibility on the first device can simplify the data management process and avoid additional data synchronization steps between devices, thereby improving the efficiency and stability of data transmission. It should be noted that the above reasons are only provided for exemplary explanation and do not constitute a limitation of the present invention.
[0108] Through the above process, when the second device fails to upload monitoring data, the monitoring data is stored in the first device and uploaded when the network status of the first network meets the transmission conditions, thereby improving data management capabilities and ensuring the integrity of the monitoring data.
[0109] In an exemplary embodiment, the method may further include the following steps: if it is detected that the second device fails to upload the monitoring data, the monitoring data is stored in the first device, and a third device that meets the transmission conditions of the monitoring data is searched again in the first network; if the third device is found again, a second network is established between the first device and the third device, and the monitoring data is transmitted to the third device via the second network, and the monitoring data is uploaded to the server using the third device.
[0110] First of all, it should be noted that there can be multiple smart devices in the first network, that is, there can be multiple smart devices that meet the transmission conditions of the monitoring data. The third device is different from the second device, and is also a smart device that meets the transmission conditions of the monitoring data, and has the ability to smoothly upload the monitoring data to the server.
[0111] Then, after the second device fails to upload the monitoring data, it can search for a smart device that meets the transmission conditions of the monitoring data in the first network again, thereby determining the third device, and establishing a second network between the first device and the second device. The third device with better network conditions can be used as a relay for data transmission, so that the monitoring data can be uploaded to the server through the first network using the third device.
[0112] Through the above process, when the second device fails to upload monitoring data, the third device is used as a data transfer to upload the monitoring data to the server via the third device, thereby ensuring that the monitoring data can be uploaded in time and improving the robustness of data upload.
[0113] In an exemplary embodiment, the method may further include the following step: if it is detected that the second device successfully uploads the monitoring data, stopping the data transmission to the second device.
[0114] Specifically, after the second device successfully uploads the monitoring data, it can feed back a response signal to the first device, indicating that the first device has completed the data upload task and prompting the first device to end and stop data transmission.
[0115] It is understandable that if the first device stops the data transmission immediately after completing the transmission of monitoring data to the second device, it may cause the first device to not know whether the monitoring data has been successfully transmitted to the server. In case some monitoring data is lost or the monitoring data upload fails in the middle, the first device will not discover the above problem.
[0116] Then, through the response signal sent by the second device, the first device can know that the detection data has been completely uploaded and can safely stop transmission. In addition, the response mechanism can also prevent the first device from repeatedly trying to retransmit data (loop transmission) when the network conditions are not ideal, thereby reducing network burden and redundant operations.
[0117] It should be noted that after the data transmission is completed, the second network (i.e., the network connection between the first device and the second device) can be processed in two ways. The first is to disconnect the second network to save resources, and the second is to maintain the second network for subsequent transmission. No specific limitation is made here.
[0118] In one possible implementation, after the data transmission task is completed and the second device feeds back a successful response, the second network is disconnected to release occupied network resources and device power consumption, thereby extending the battery life of the first device.
[0119] In another possible implementation, if the first device is in a scenario where monitoring is frequently triggered, the connection to the second network can be maintained to reduce the delay in reconnection the next time transmission is required. It can be understood that, while maintaining the connection, the first device can immediately start data transmission the next time the target event is triggered without re-establishing the connection, which is suitable for monitoring scenarios with strong real-time requirements.
[0120] In another possible implementation, a holding time may be set for the second network. For example, if no new target event is triggered within 5 minutes after the data transmission is completed, the connection is automatically disconnected, thereby taking into account both real-time performance and resource management.
[0121] Through the above process, the response signal sent by the second device after completing the data upload task can enable the first device to end the data transmission at an appropriate time, which not only ensures the integrity of the data upload, but also avoids unnecessary data retransmission.
[0122] In an exemplary embodiment, step 310 may further include the following steps: acquiring working data of the first device, and detecting whether the target event is triggered based on the working data; if yes, requesting to record monitoring data of the target event.
[0123] The working data is data generated when the first device is working. It can be understood that the first device can generate a series of working data when working, such as sensor data, device status data, etc. The content of the working data is related to the function of the first device.
[0124] Then, the working data can be analyzed to identify whether the target event is triggered. For example, if the first device is a smart door lock, the vibration sensor data can be used to detect whether there is any prying behavior, or the infrared sensor data can be used to determine whether someone is staying at the door, and the status data of the doorbell being clicked can be used to determine whether someone is ringing the doorbell.
[0125] Furthermore, if the working data indicates that the target event has been triggered, the first device may start recording monitoring data related to the target event. For example, the camera of the smart door lock may start shooting video, and the microphone may record sound.
[0126] Under the effect of the above-mentioned embodiment, it is possible to determine whether a target event is triggered by analyzing the working data. Once it is determined that the target event is triggered, a request is made to record the monitoring data related to the event, so that the monitoring data can be quickly recorded when the target event occurs, so as to provide detailed data support for subsequent event processing, for example, an automated control scheme with the target event as the trigger condition, which allows users to check the triggering status of the target event in a timely manner, etc.
[0127] See also Figure 4 In an exemplary embodiment, step 330 may further include the following steps:
[0128] Step 331: Detect the network quality between the first device and the server.
[0129] The network quality includes one or more of the network transmission rate, network signal strength, and network transmission delay.
[0130] Regarding the network transmission rate, it is understood that if the network data transmitted from the first device to the server is too slow, the monitoring data cannot be uploaded to the server in time. Similarly, if the network signal strength is too weak or the network transmission delay is too high, then the transmission rate of the network data transmitted from the first device to the server will also be affected, resulting in the inability to upload the monitoring data to the server in time.
[0131] In addition, network transmission rate, network signal strength, and network transmission delay will all affect the data packet loss rate. The data packet loss rate refers to the proportion of data packets lost during the transmission process.
[0132] Specifically, a network transmission rate that is too slow, a network signal strength that is too weak, or a network transmission delay that is too high may all cause an increase in the data packet loss rate. A high packet loss rate will affect the integrity of the monitoring data. Data packets lost during data transmission cannot be received and decoded normally by the receiver, and the data content will be missing or damaged.
[0133] Step 333: If one of the network transmission rate, network signal strength, and network delay in the network quality exceeds a set threshold, it is determined that the network condition does not meet the transmission condition.
[0134] The threshold is set to determine whether the network status of the first network meets the transmission condition. The threshold can be set according to the actual network status and the demand for data transmission. If the real-time requirement for data transmission is high, the threshold can be set to high network rate, strong network signal strength, and low network delay respectively.
[0135] It can be understood that in order to improve the efficiency of data transmission and ensure the integrity of data transmission, if one of the network speed, network signal strength, and network delay in the network quality exceeds the set threshold, it indicates that the network status between the first device and the server is not good, that is, the transmission conditions of the monitoring data are not met.
[0136] Through the above process, when one of the network transmission rate, network signal strength, and network delay between the first device and the server exceeds the set threshold, it is determined that the network condition does not meet the transmission conditions, so as to change the data transmission strategy in time to ensure data transmission efficiency and integrity.
[0137] In an exemplary embodiment, step 350 may also include the following steps: the first network also includes at least one smart device; searching for a second device in the first network includes: detecting the network quality between each smart device and the first device, and / or detecting the network quality between each smart device and the server, and selecting a smart device whose network quality meets the set conditions as the second device.
[0138] As mentioned above, the server can also be connected to multiple smart devices, that is, the first network also includes at least one smart device, so it is possible to search for a smart device that meets the transmission conditions of the monitoring data.
[0139] First, it should be noted that the transmission task of the second device includes: receiving the monitoring data transmitted by the first device and uploading the monitoring data to the server. In other words, it is necessary to ensure data transmission between the first device and the second device, and data uploading between the second device and the server.
[0140] Based on this, the network quality between each smart device and the first device, and the network quality between each smart device and the server are detected. Specifically, it can include detecting the network rate, network signal strength, network delay, etc., so as to select a second device from each smart device that can ensure the reception of the monitoring data transmitted by the first device and can stably upload the monitoring data to the server.
[0141] It should be noted that the network quality is also related to the physical distance between devices. In one possible implementation, a smart device that is physically closest to the first device and has the same network bandwidth as the second device is searched in the first network.
[0142] Furthermore, in order to avoid abnormalities in the selected second device, multiple smart devices whose network quality meets the set conditions can be selected as the second devices. In subsequent data transmission and upload tasks, the second device with the best data transmission and upload task performance can be selected to perform the task according to actual conditions.
[0143] In one possible implementation, the device with the best network signal strength between the smart devices and the server is selected as one of the second devices, the device with the closest physical distance to the first device is selected as one of the second devices, and the device with the closest physical distance to the network device is selected as one of the second devices.
[0144] Through the above process, by detecting the network quality between each smart device and the first device, and between each smart device and the server, it is ensured that the selected second device can smoothly receive and upload monitoring data to achieve stability and integrity of data transmission, thereby meeting real-time monitoring needs.
[0145] See also Figure 5 In an exemplary embodiment, step 370 may include the following steps:
[0146] Step 371: Perform network preprocessing on each smart device in the first network so that the network quality of the first device and the second device meets the set conditions.
[0147] First of all, if there are multiple smart devices under the first network, then these smart devices may occupy the network resources of the first network, causing the network resources of the first device and the second device to be squeezed, thereby reducing the network quality of the first device and the second device.
[0148] Then, in order to improve the network quality of the first device and the second device, the network resource occupancy of each smart device can be monitored, and the network resource allocation of each smart device can be dynamically adjusted to ensure that the data transmission between the first device and the second device remains stable.
[0149] Specifically, network preprocessing may include dynamically managing the network bandwidth of the first network, and preferentially allocating network bandwidth to the first device and the second device to avoid insufficient network bandwidth for the first device and the second device due to other smart devices that do not participate in the task of monitoring resource transmission occupying network resources at the same time.
[0150] In addition, network preprocessing may also include selecting a channel with less interference by analyzing the network environment to avoid concentrating the first device and the second device on a channel with more interference; it may also include updating the network modules of the first device and the second device to ensure that they use the latest network communication modules and support more efficient protocols (such as Wi-Fi 6), etc., which are not limited here.
[0151] Step 373: Create a network between the first device and the second device, and configure transmission rules to obtain a second network.
[0152] First of all, it should be noted that the network creation between the first device and the second device can achieve network connection between the two through short-distance transmission methods such as Wi-Fi, Bluetooth, Zigbee, etc.
[0153] Regarding the transmission rules, they are rules for determining the transmission order of different monitoring data. Specifically, the transmission rules can be configured based on the importance of different monitoring data, and can also be configured according to the size of different monitoring data. It should be noted that the above scheme is only an exemplary description and does not constitute a limitation to the present invention.
[0154] It can be understood that reasonable transmission rules can effectively and efficiently transmit monitoring data, ensuring that important and urgent monitoring data can be transmitted first.
[0155] In one possible implementation, the transmission rules are configured according to the size of the monitoring data. For example, if the monitoring data is a video, the priority of data transmission can be dynamically adjusted according to the length of the video recording. If the video file is large, you can choose to upload it in segments. If it is a shorter video, you can choose to upload it directly to ensure timeliness.
[0156] In one possible implementation, transmission rules are configured according to network conditions. For example, if the monitoring data is video, if the network bandwidth is sufficient, you can choose to upload high-quality, high-definition videos. If the bandwidth is low, choose to compress the video file, or give priority to uploading shorter videos.
[0157] For example, the upload frequency can be adjusted dynamically according to the network conditions. When the network bandwidth fluctuates greatly, video clips can be uploaded at longer time intervals, and the video clips can be further divided into smaller clips and transmitted in batches. In this way, even in a weak network environment, the amount of data uploaded each time is relatively small, and the probability of successful upload will be higher, allowing the system to upload as many small clips as possible in a short time (for example, 60 seconds).
[0158] In the above process, through network preprocessing, it can be ensured that the network quality between the first device and the second device meets the set conditions, thereby ensuring that the monitoring data is stably transmitted to the server, and by reasonably configuring transmission rules for the second network, it can be ensured that the data transmission between the first device and the second device is efficient and reliable.
[0159] In an exemplary embodiment, the method may further include the following steps: adjusting the network bandwidth of each smart device to reduce the network bandwidth allocated to other smart devices except the first device and the second device to increase the network bandwidth of the first device and the second device.
[0160] First of all, in order to ensure the real-time transmission requirements of monitoring data, it is necessary to preferentially allocate network bandwidth to the first device and the second device in the first network, and reduce the network bandwidth allocated to other smart devices except the first device and the second device.
[0161] Specifically, a network bandwidth cap can be set for other smart devices to prevent other smart devices from occupying too much network bandwidth when uploading or downloading data. The setting of the network bandwidth cap can ensure that the first device and the second device have a higher network bandwidth utilization rate.
[0162] Of course, in order to reduce the impact on other smart devices, the bandwidth allocation of each smart device can be adjusted in real time according to the current needs and task priorities of the first network. For example, when a target event is detected, a higher bandwidth is automatically allocated to the first device and the second device to support the transmission of monitoring data; for another example, a traffic monitoring tool is used to monitor the network bandwidth usage of the first device and the second device in real time. If the network bandwidth is found to be insufficient, the network bandwidth of other smart devices can be released first.
[0163] Through the above method, it is ensured that the first device and the second device can obtain preferential and stable network bandwidth allocation in the first network, meet the demand for real-time transmission of monitoring data, and improve user experience.
[0164] In an exemplary embodiment, the method may further include the following steps: configuring priorities for different target events so that when there are monitoring data corresponding to multiple target events, the corresponding monitoring data is uploaded to the server in the order of priority of each target event.
[0165] First of all, it should be noted that the priority refers to the order in which the monitoring data corresponding to different target events are uploaded to the server. It can be understood that if there are multiple target events, the monitoring data corresponding to the target event with a high priority will be uploaded to the server first.
[0166] The order of priority can be configured based on multiple factors to determine how to effectively and efficiently upload video and monitoring data, including the importance of the target event, the size of the monitoring data, network conditions, etc.
[0167] In a possible implementation, the target events can be sorted according to their importance. The target events can be sorted according to their security levels. The higher the security level, the higher the priority. For example, lock picking events should be transmitted first and have the highest priority because they may involve security risks. Stay events, if there are visitors who stay for a long time or stay abnormally, have a secondary priority and have a lower priority than lock picking events. Doorbell events usually do not have urgent security, so they have the lowest priority and can be uploaded later.
[0168] Of course, different factors can also be considered. Specifically, during the data transmission process, priority should be given to uploading monitoring data of high-priority target events, and the upload strategy should be dynamically adjusted according to network conditions. For example, when the network delay is high, priority should be given to uploading events that are urgently needed in a short period of time (such as lock picking events) to avoid long waiting times and delayed uploads.
[0169] Through the coordination of the above-mentioned embodiments, by comprehensively considering the importance of the event and the network conditions and rationally configuring the priority, it can be ensured that the monitoring data corresponding to the target event can be uploaded between the first device and the second device according to the priority, which not only improves the user experience, but also ensures that important target events are responded to in a timely manner.
[0170] Figure 6 This is a schematic diagram of a specific implementation of a data uploading method in an application scenario, wherein the application scenario is a smart home scenario.
[0171] Figure 7 A schematic diagram of the network topology in the application scenario is shown in FIG. Figure 7 As shown, the application scenario includes smart door locks, gateways, and smart devices such as smart speakers, smart lights, smart control panels, and second devices, wherein the smart door locks, smart speakers, smart lights, smart control panels, and second devices are connected to the wide area network through the gateway, i.e., the first network. A network is established between the smart door lock and the second device, i.e., the second network.
[0172] Now combined Figure 7 The network topology of Figure 6 The data upload method is described as follows: Figure 6 As shown:
[0173] Through step 801, the smart door lock detects that a target event is triggered and obtains a video corresponding to the target event.
[0174] Specifically, if the smart door lock detects a lock prying event at the door (smart door lock hardware switch detection), someone lingers (smart door lock passive sensor detection such as sensor, radar), or rings the doorbell (clicks the smart door lock doorbell), it is considered that the target event is triggered and video recording is started.
[0175] Through step 803, the data transmission mode is determined in combination with the network status of the smart door lock in the first network.
[0176] The smart door lock device self-checks to confirm the network signal or network delay of the first network with the cloud itself, and then selects the corresponding upload mode based on the priority of the video.
[0177] Through step 805, if the network condition meets the transmission conditions of the video, the direct transmission mode is selected, and the smart door lock uploads the video to the cloud through the first network.
[0178] Among them, the self-test results show that the first network environment is very good, the network delay is low, and the smart door lock can upload the video directly to the cloud.
[0179] Through step 807, if the network condition does not meet the video transmission condition, the transparent transmission mode is selected to search for the second device in the first network.
[0180] If the self-test result shows that the network delay is large or the network signal is not good, the transparent transmission mode is selected, and the smart device that best builds the second network is determined according to the network signal strength. This smart device is the second device. For example, the smart device that is physically closest to the smart door lock and has the same network bandwidth is selected as the second device.
[0181] Through step 809, a second network is established between the first device and the second device, and the first device is controlled to transmit the video to the second device, and the second device is used to upload the video to the cloud through the first network.
[0182] Regarding establishing a second network between the first device and the second device, the following steps are specifically included: first, according to the tasks of the second device and other smart devices, the network bandwidth speed of other smart devices is lowered, and the optimized network bandwidth is given to the second network to be built, wherein the total number of devices in the second network does not exceed 5, and the second network includes a smart door lock, a router, and 1-3 other smart devices with strong signals (which may include a smart device with the best network signal, a smart device closest to the smart door lock, and a smart device closest to the router)
[0183] When establishing the second network, it is also necessary to perform network preprocessing on each smart device under the first network so that the network quality of the smart door lock and the second device meets the set conditions; create a network between the smart door lock and the second device, and configure the transmission rules to obtain the second network.
[0184] Network preprocessing includes the following steps: Setting the characteristics of the second network: The design of the second network takes into account the special needs of smart door locks and other smart devices under the gateway. The second network adopts a dedicated network topology, optimal bandwidth, high priority and other strategies to ensure stable connection, low latency and security between the smart door lock and the second device.
[0185] The transmission rule configuration includes the following steps: based on the importance of the target event, for example, sorting by security level: lock picking event > loitering event > doorbell event; based on the user's video recording needs, for example, sorting by video recording duration: short videos are uploaded directly first, long videos are uploaded in segments, and the previous or key parts of the video are uploaded first; and network conditions, for example, when the network conditions are poor, a bandwidth allocation strategy is adopted to ensure that high-priority videos can be uploaded first, and secondary events are queued according to the network conditions.
[0186] Through step 811, if the second device completes uploading, a response signal is sent to the smart door lock to make the smart door lock stop video transmission.
[0187] Specifically, after the second device successfully uploads, the second device feeds back a response signal to the smart door lock device, and the smart door lock ends the transmission. If the second device fails to upload, it is saved locally to the smart door lock and waits for the smart door lock device to self-check that the network quality is good before uploading again.
[0188] In this application scenario, the smart door lock and the smart device form a local area network (i.e., the second network) and implement the corresponding video transmission. This does not add any additional cost, but can prompt the success rate of video upload, avoid interference from the environment and the network speed itself, and shorten the waiting delay time. In addition, video transmission is only started when the target event occurs, reducing the standby power consumption in the idle state. In addition, when transmitting between the smart door lock and the smart device, the use of low-power protocols can significantly reduce transmission energy consumption and improve the overall battery life of the product.
[0189] It should be understood that, although the steps in the flowchart of the accompanying drawings are displayed in sequence as indicated by the arrows, these steps are not necessarily executed in sequence in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least a part of the steps in the flowchart of the accompanying drawings may include multiple sub-steps or multiple stages, and these sub-steps or stages are not necessarily executed at the same time, but can be executed at different times, and their execution order is not necessarily sequential, but can be executed in turn or alternately with other steps or at least a part of the sub-steps or stages of other steps.
[0190] The following is an embodiment of the device of the present application, which can be used to execute the data uploading method involved in the present application. For details not disclosed in the embodiment of the device of the present application, please refer to the method embodiment of the data uploading method involved in the present application.
[0191] See also Fig. 9 In an embodiment of the present application, a data uploading device 900 is provided, including but not limited to: a data acquisition module 910, a network detection module 930, a device search module 950, and a data transmission module 970.
[0192] The data acquisition module 910 is used to acquire monitoring data of the target event when a target event is detected to be triggered; the monitoring data is used to describe the target event monitored by the first device.
[0193] The network detection module 930 is used to detect whether the network status of the first network meets the transmission conditions of the monitoring data; the first network is a network established by the first device and the server.
[0194] The device search module 950 is used to search for a second device in the first network if the conditions are not met; the second device is a device that meets the transmission conditions of the monitoring data.
[0195] The data transmission module 970 is used to establish a second network between the first device and the second device, transmit the monitoring data to the second device through the second network, and upload the monitoring data to the server by using the second device.
[0196] In an exemplary embodiment, the data acquisition module 910 is also used to acquire the working data of the first device; the working data is the data generated when the first device is working; based on the working data, it is detected whether the target event is triggered; if so, it is requested to record the monitoring data of the target event.
[0197] In an exemplary embodiment, the network detection module 930 is also used to detect the network quality between the first device and the server; the network quality includes one or more of the network transmission rate, network signal strength, and network transmission delay; if one of the network transmission rate, network signal strength, and network delay in the network quality exceeds a set threshold, it is determined that the network condition is detected to not meet the transmission conditions.
[0198] In an exemplary embodiment, the first network also includes at least one smart device; the device search module 950 is also used to detect the network quality between each smart device and the first device, and / or the network quality between each smart device and the server, and select a smart device whose network quality meets the set conditions as the second device.
[0199] In an exemplary embodiment, the data transmission module 970 is also used to perform network preprocessing on each intelligent device under the first network so that the network quality of the first device and the second device meets the set conditions; create a network between the first device and the second device, and configure transmission rules to obtain a second network.
[0200] In an exemplary embodiment, the data transmission module 970 is further configured to adjust the network bandwidth of each smart device to increase the network bandwidth of the first device and the second device.
[0201] In an exemplary embodiment, the data transmission module 970 is also used to configure priorities for different target events, so that when there are monitoring data corresponding to multiple target events, the corresponding monitoring data is uploaded to the server in the order of the priority of each target event.
[0202] In an exemplary embodiment, the data uploading device 900 is also used to store the monitoring data in the first device if the second device is not found, until the network status of the first network meets the transmission conditions, and control the first device to upload the monitoring data to the server through the first network.
[0203] In an exemplary embodiment, the data uploading device 900 is also used to store the monitoring data in the first device if it is detected that the second device fails to upload the monitoring data, until the network status of the first network meets the transmission conditions, and control the first device to upload the monitoring data to the server through the first network.
[0204] In an exemplary embodiment, the data uploading device 900 is also used to store the monitoring data in the first device if it is detected that the second device fails to upload the monitoring data, and to search again in the first network for a third device that meets the transmission conditions of the monitoring data; if the third device is found again, a second network is established between the first device and the third device, and the monitoring data is transmitted to the third device via the second network, and the monitoring data is uploaded to the server using the third device.
[0205] In an exemplary embodiment, the data uploading device 900 is further configured to stop transmitting data to the second device if it is detected that the second device has successfully uploaded the monitoring data.
[0206] In an exemplary embodiment, the data uploading device 900 is further configured to control the first device to upload the monitoring data to the server through the first network if it is detected that the network status satisfies the transmission condition.
[0207] It should be noted that the data upload device provided in the above embodiment only uses the division of the above-mentioned functional modules as an example when uploading data. In actual applications, the above-mentioned functions can be assigned to different functional modules as needed, that is, the internal structure of the data upload device will be divided into different functional modules to complete all or part of the functions described above.
[0208] In addition, the data uploading device and the data uploading method provided in the above embodiments belong to the same concept, and the specific manner in which each module performs the operation has been described in detail in the method embodiment and will not be repeated here.
[0209] See also Fig. 9 In an embodiment of the present application, an electronic device 4000 is provided, and the electronic device 4000 may include: a gateway and a smart door lock.
[0210] exist Fig. 9 In the embodiment, the electronic device 4000 includes at least one processor 4001 and at least one memory 4003.
[0211] The data interaction between the processor 4001 and the memory 4003 can be realized through at least one communication bus 4002. The communication bus 4002 may include a path for transmitting data between the processor 4001 and the memory 4003. The communication bus 4002 may be a PCI (Peripheral Component Interconnect) bus or an EISA (Extended Industry Standard Architecture) bus, etc. The communication bus 4002 may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus.
[0212] Optionally, the electronic device 4000 may further include a transceiver 4004, which may be used for data interaction between the electronic device and other electronic devices, such as data transmission and / or data reception. It should be noted that in actual applications, the transceiver 4004 is not limited to one, and the structure of the electronic device 4000 does not constitute a limitation on the embodiments of the present application.
[0213] Processor 4001 may be a CPU (Central Processing Unit), a general-purpose processor, a DSP (Digital Signal Processor), an ASIC (Application Specific Integrated Circuit), an FPGA (Field Programmable Gate Array) or other programmable logic devices, transistor logic devices, hardware components or any combination thereof. It may implement or execute various exemplary logic blocks, modules and circuits described in conjunction with the disclosure of this application. Processor 4001 may also be a combination that implements computing functions, such as a combination of one or more microprocessors, a combination of a DSP and a microprocessor, etc.
[0214] The memory 4003 can be a ROM (Read Only Memory) or other types of static storage devices that can store static information and instructions, a RAM (Random Access Memory) or other types of dynamic storage devices that can store information and instructions, or an EEPROM (Electrically Erasable Programmable Read Only Memory), a CD-ROM (Compact Disc Read Only Memory) or other optical disk storage, optical disk storage (including compressed optical disk, laser disk, optical disk, digital versatile disk, Blu-ray disk, etc.), a magnetic disk storage medium or other magnetic storage device, or any other medium that can be used to carry or store a computer program in the form of instructions or data structures and can be accessed by the electronic device 400, but is not limited to this.
[0215] The memory 4003 stores a computer program, and the processor 4001 can read the computer program stored in the memory 4003 through the communication bus 4002 .
[0216] The computer program is executed by one or more processors 4001 to implement the data uploading method in the above-mentioned embodiments.
[0217] In addition, an embodiment of the present application provides a storage medium, on which a computer program is stored. The computer program is executed by one or more processors to implement the data uploading method as described above.
[0218] A computer program product is provided in an embodiment of the present application, including a computer program, which is executed by one or more processors to implement the data uploading method as described above.
[0219] Compared with the related art, when the network condition between the first device and the server does not meet the transmission conditions of the monitoring data, this solution searches for the second device in the first network and establishes a network connection between the first device and the second device, so as to use the second device as a data transfer, and upload the monitoring data to the server via the second device, thereby ensuring the efficiency of data transmission and avoiding data transmission obstacles caused by the poor network condition between the first device and the server, thereby ensuring that the monitoring data can be uploaded in time, thereby meeting the user's real-time monitoring needs and facilitating the user to handle sudden target events in a timely manner. In addition, the response signal sent by the second device after completing the data upload task can allow the first device to end the data transmission at an appropriate time, which not only ensures the integrity of the data upload, but also avoids unnecessary data retransmission.
[0220] Furthermore, this solution can determine whether a target event is triggered by analyzing working data. Once it is determined that the target event is triggered, it requests to record monitoring data related to the event, so that the monitoring data can be quickly recorded when the target event occurs. In addition, when one of the network transmission rate, network signal strength, and network delay between the first device and the server exceeds the set threshold, it is determined that the network condition does not meet the transmission conditions, so that the data transmission strategy is changed in time to ensure data transmission efficiency and integrity.
[0221] Of course, this solution can also ensure that the network quality between the first device and the second device meets the set conditions through network preprocessing, thereby ensuring that the monitoring data is stably transmitted to the server. At the same time, through comprehensive consideration of the importance of the event and the network conditions, the priority is reasonably configured to ensure that the monitoring data corresponding to the target event can be uploaded between the first device and the second device according to the priority, which not only improves the user experience, but also ensures that important target events are responded to in a timely manner.
[0222] The above description is only a partial implementation method of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.
Claims
1. A data uploading method, characterized in that: include: When a target event is detected to be triggered, acquiring monitoring data of the target event; The monitoring data is used to describe the target event monitored by the first device; Detecting whether the network status of the first network meets the transmission condition of the monitoring data; The first network is a network established between the first device and the server; If not, searching for a second device in the first network; the second device is a device that meets the transmission condition of the monitoring data; A second network is established between the first device and the second device, and the monitoring data is transmitted to the second device through the second network, and the monitoring data is uploaded to the server by using the second device.
2. The method according to claim 1, characterized in that When the target event is detected to be triggered, acquiring monitoring data of the target event includes: Acquire working data of the first device; the working data is data generated when the first device is working; Based on the working data, it is detected whether the target event is triggered; if yes, a request is made to record monitoring data of the target event.
3. The method according to claim 1, characterized in that The detecting whether the network status of the first network meets the transmission condition of the monitoring data includes: Detecting the network quality between the first device and the server; the network quality includes one or more of network transmission rate, network signal strength, and network transmission delay; If one of the network transmission rate, network signal strength, and network delay in the network quality exceeds a set threshold, it is determined that the network condition does not meet the transmission condition.
4. The method according to claim 1, characterized in that The first network also includes at least one smart device; The searching for the second device in the first network includes: Detect the network quality between each of the smart devices and the first device, and / or detect the network quality between each of the smart devices and the server, and select the smart device whose network quality meets the set conditions as the second device.
5. The method according to claim 1, characterized in that The establishing a second network between the first device and the second device includes: Based on performing network preprocessing on each intelligent device in the first network, so that the network quality of the first device and the second device meets the set conditions; A network is created between the first device and the second device, and transmission rules are configured to obtain the second network.
6. The method according to claim 5, characterized in that The performing network preprocessing on each intelligent device in the first network so that the network quality of the first device and the second device meets a set condition includes: The network bandwidth of each of the smart devices is adjusted to reduce the network bandwidth allocated to other smart devices except the first device and the second device, so as to increase the network bandwidth of the first device and the second device.
7. The method according to claim 5, characterized in that The creating a network between the first device and the second device and configuring a transmission rule to obtain the second network includes: Priorities are configured for different target events, so that when there are monitoring data corresponding to multiple target events, the corresponding monitoring data is uploaded to the server in the order of the priorities of the target events.
8. The method according to any one of claims 1 to 7, characterized in that The searching for the second device in the first network includes: If the second device is not found, the monitoring data is stored in the first device until the network condition of the first network meets the transmission condition, and the first device is controlled to upload the monitoring data to the server through the first network.
9. The method according to any one of claims 1 to 7, characterized in that: After uploading the monitoring data to the server by using the second device, the method includes: If it is detected that the second device fails to upload the monitoring data, the monitoring data is stored in the first device until the network condition of the first network meets the transmission condition, and the first device is controlled to upload the monitoring data to the server through the first network.
10. The method according to any one of claims 1 to 7, characterized in that: After uploading the monitoring data to the server by using the second device, the method includes: If it is detected that the second device fails to upload the monitoring data, the monitoring data is stored in the first device, and a third device that meets the transmission conditions of the monitoring data is searched again in the first network; If the third device is found again, a second network is established between the first device and the third device, and the monitoring data is transmitted to the third device through the second network, and the monitoring data is uploaded to the server by using the third device.
11. The method according to any one of claims 1 to 7, characterized in that: After uploading the monitoring data to the server by using the second device, the method includes: If it is detected that the second device successfully uploads the monitoring data, data transmission to the second device is stopped.
12. The method according to any one of claims 1 to 7, characterized in that: After detecting whether the network status of the first network meets the transmission condition of the monitoring data, the method further includes: If it is detected that the network status meets the transmission condition, the first device is controlled to upload the monitoring data to the server through the first network.
13. A data uploading system, characterized in that: The system includes a first device, a second device, a server and a network device; The first device is used to obtain monitoring data of the target event when a target event is detected to be triggered; the monitoring data is used to describe the target event monitored by the first device; Detecting whether the network status of the first network meets the transmission condition of the monitoring data; The first network is a network established between the first device and the server; If not, searching for a second device in the first network; the second device is a device that meets the transmission condition of the monitoring data; establishing a second network between the first device and the second device, transmitting the monitoring data to the second device through the second network, and uploading the monitoring data to the server by using the second device; The second device is used to receive the monitoring data transmitted by the first device and upload the monitoring data to the server; The server is used to receive the monitoring data uploaded by the first device or the second device; The network device is used to establish a network connection between the first device and the server, and between the second device and the server.
14. The system of claim 14, wherein: The first device is a smart door lock, and the second device is another smart device different from the smart door lock.
15. A data uploading device, characterized in that: include: A data acquisition module, used to acquire monitoring data of the target event when a target event is detected to be triggered; The monitoring data is used to describe the target event monitored by the first device; A network detection module, used to detect whether the network status of the first network meets the transmission conditions of the monitoring data; The first network is a network established between the first device and the server; A device search module, used for searching for a second device in the first network if the condition is not met; the second device is a device that meets the transmission condition of the monitoring data; A data transmission module is used to establish a second network between the first device and the second device, and transmit the monitoring data to the second device through the second network, and use the second device to upload the monitoring data to the server.
16. An electronic device comprising at least one processor and at least one memory, wherein: The memory stores a computer program, wherein the computer program, when executed by the processor, implements the data uploading method according to any one of claims 1 to 12.
17. A storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by one or more processors, the data uploading method according to any one of claims 1 to 12 is implemented.
18. A computer program product comprising a computer program, characterized in that When the computer program is executed by one or more processors, the data uploading method according to any one of claims 1 to 12 is implemented.