Device connection method and apparatus, electronic device, and computer-readable medium

By obtaining the temporary key and address of the scheduling service and using the temporary connection service to forward device requests, the network congestion problem during concurrent connections of IoT devices is solved, improving system reliability and connection efficiency.

CN119892906BActive Publication Date: 2025-11-18GREE ELECTRIC APPLIANCE INC OF ZHUHAI +1
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202411925879.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-12-25
Publication Date
2025-11-18
Estimated Expiration
2044-12-25

AI Technical Summary

Technical Problem

In existing technologies, IoT devices are prone to network congestion caused by concurrent connections when connecting to cloud services. Existing solutions, such as adding service nodes and using discrete connection methods, involve resource waste and the risk of network congestion.

Method used

By obtaining the temporary key and temporary connection service address returned by the scheduling service, the temporary connection service is used to forward device requests, avoiding direct connection between the device and the cloud service, reducing the peak pressure on the cloud service, and reducing concurrency by using a delayed connection method.

Benefits of technology

It effectively solves the network congestion problem when devices connect concurrently, improves the reliability and connection efficiency of IoT systems, and reduces resource waste.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119892906B_ABST
    Figure CN119892906B_ABST
Patent Text Reader

Abstract

The application relates to a device connection method and device, an electronic device and a computer readable medium. The method comprises the following steps: obtaining a temporary key returned by a scheduling service, the temporary key being generated by the scheduling service according to a scheduling request sent by a device; when the device connection network of the scheduling service is congested, obtaining a temporary connection service address returned by the scheduling service, initiating a connection request to the temporary connection service according to the temporary key and the temporary connection service address, and establishing a connection with the temporary connection service; if it is detected that the device requests cloud service data, forwarding the device request to the cloud service through the temporary connection service; receiving connection data returned by the cloud service, and establishing a connection with the cloud service according to the connection data. When the device connection network of the scheduling service is congested, the application reduces the peak pressure of the cloud service during batch device connection, reduces the device connection concurrency, and solves the problem of device connection network congestion during device concurrency connection.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of Internet of Things (IoT) technology, and more particularly to device connection methods, apparatus, electronic devices, and computer-readable media. Background Technology

[0002] With the development of the Internet of Things (IoT) industry, IoT manufacturers need to manage an ever-increasing number of devices. Managing IoT devices typically involves connecting them to cloud services. Devices need to maintain this connection to update their status and receive execution commands from the cloud service. If the cloud service restarts or updates, the device needs to re-establish its connection.

[0003] In existing technologies, when a device discovers it has lost connection with a cloud service, it sends a request to the scheduling service to obtain the cloud service's address and verification information. After obtaining these, it sends a connection request to the cloud service's address to establish a connection. However, during cloud service updates or restarts, devices connected to that service will collectively disconnect and then collectively request reconnection. This generates a concurrency spike, causing network congestion and resulting in request failures or even cloud service outages.

[0004] To avoid the aforementioned situation, existing technologies use methods such as adding service nodes and discrete connections to mitigate this problem. Adding service nodes increases the number of nodes for cloud services, alleviating concurrency pressure; however, this method requires manual control, and the node is no longer needed after the peak connection period, leading to resource waste. Discrete connections involve devices randomly calculating a delay time before connecting to the cloud service after the delay. This method may still experience concurrency issues when there are many devices, and it also suffers from probabilistic network congestion.

[0005] Therefore, how to solve the problem of network congestion caused by concurrent device connections has become a technical problem in the existing technology. Summary of the Invention

[0006] This application provides a device connection method, apparatus, electronic device, and computer-readable medium to solve the technical problem of network congestion caused by concurrent device connections in the prior art.

[0007] According to one aspect of the embodiments of this application, this application provides a device connection method applicable to devices in a device connection system, the device connection system including: a device, a scheduling service, a temporary connection service, and a cloud service; the device is communicatively connected to the scheduling service, the temporary connection service, and the cloud service respectively; the scheduling service is communicatively connected to the cloud service; the temporary connection service is communicatively connected to the cloud service, the method including: obtaining a temporary key returned by the scheduling service, the temporary key being generated by the scheduling service based on a scheduling request sent by the device; when the device connection network of the scheduling service is congested, obtaining a temporary connection service address returned by the scheduling service, and initiating a connection request to the temporary connection service based on the temporary key and the temporary connection service address to establish a connection with the temporary connection service; if a device request for cloud service data is detected, forwarding the device request to the cloud service through the temporary connection service; receiving connection data returned by the cloud service, and establishing a connection with the cloud service based on the connection data.

[0008] Optionally, before obtaining the temporary key returned by the scheduling service, the method further includes: sending a scheduling request to the scheduling service; detecting network congestion of the device connection of the scheduling service according to the scheduling request; if the network connection of the scheduling service is not congested, generating a temporary key through the scheduling service and returning the temporary key to the device.

[0009] Optionally, after detecting network congestion of the device connection of the scheduling service according to the scheduling request, the method further includes: if the network connection of the scheduling service is congested, obtaining a temporary connection service address through the scheduling service; and returning the temporary key and the temporary connection service address to the device through the scheduling service.

[0010] Optionally, detecting network congestion of the device connection of the scheduling service based on the scheduling request includes: obtaining a preset initial monitoring parameter, wherein the preset initial monitoring parameter is a threshold for the number of requests generated by the scheduling service within a fixed period of time; and determining whether the network connection of the scheduling service is congested based on the scheduling request and the preset initial monitoring parameter.

[0011] Optionally, determining whether the device connection network of the scheduling service is congested based on the scheduling request and the preset initial monitoring parameters includes: detecting the number of real-time requests generated by the scheduling service within a fixed period of time based on the scheduling request; if the number of real-time requests generated by the scheduling service within a fixed period of time exceeds the preset initial monitoring parameters, then determining that the device connection network is congested; if the number of real-time requests generated by the scheduling service within a fixed period of time does not exceed the preset initial monitoring parameters, then determining that the device connection network is not congested.

[0012] Optionally, after obtaining the temporary key returned by the scheduling service, the method further includes: when the device connection network of the scheduling service is not congested, forwarding the scheduling request of the device to the cloud service through the scheduling service; and connecting with the cloud service based on the temporary key and the scheduling request of the device.

[0013] Optionally, if a device is detected requesting cloud service data, then forwarding the device request to the cloud service through the temporary connection service includes: sending a device request to obtain cloud service data to the temporary connection service; and after the temporary connection service verifies the device request, forwarding the device request to the cloud service through the temporary connection service.

[0014] According to another aspect of the embodiments of this application, this application provides a device connection apparatus applicable to devices in a device connection system. The device connection system includes: a device, a scheduling service, a temporary connection service, and a cloud service; the device is communicatively connected to the scheduling service, the temporary connection service, and the cloud service respectively; the scheduling service is communicatively connected to the cloud service; the temporary connection service is communicatively connected to the cloud service. The apparatus includes: a first acquisition module, used to acquire a temporary key returned by the scheduling service, the temporary key being generated by the scheduling service based on a scheduling request sent by the device; a first connection module, used to acquire a temporary connection service address returned by the scheduling service when the device connection network of the scheduling service is congested, and initiate a connection request to the temporary connection service based on the temporary key and the temporary connection service address to establish a connection with the temporary connection service; a first forwarding module, used to forward the device request to the cloud service through the temporary connection service if a device request for cloud service data is detected; and a second connection module, used to receive connection data returned by the cloud service and establish a connection with the cloud service based on the connection data.

[0015] According to another aspect of the embodiments of this application, this application provides an electronic device, including a memory, a processor, a communication interface, and a communication bus. The memory stores a computer program that can run on the processor. The memory and the processor communicate through the communication bus and the communication interface. When the processor executes the computer program, it implements the steps of the device connection method described above.

[0016] According to another aspect of the embodiments of this application, this application provides a computer-readable medium having processor-executable non-volatile program code that causes the processor to perform the steps of the device communication method.

[0017] Compared with related technologies, the technical solutions provided in this application have the following advantages:

[0018] This application can be applied to high-concurrency scenarios in the Internet of Things (IoT) where devices connect to cloud services in batches. By obtaining a temporary key returned by the scheduling service, this application can accurately establish connections with the temporary connection service and the cloud service, avoiding network congestion caused by devices randomly connecting to the cloud service. When the device connection network of the scheduling service is congested, the application obtains the address of the temporary connection service returned by the scheduling service and initiates a connection request to establish a connection with the temporary connection service based on the temporary key and the address. When a device needs to request data from the cloud service, the temporary connection service forwards the device request to the cloud service. By adding the temporary connection service to forward device requests to the cloud service, it helps to reduce the peak pressure on the cloud service during batch device connections by delaying the connection when the device connection network of the scheduling service is congested, reducing the concurrency of device connections, solving the problem of network congestion caused by concurrent device connections, and thus improving the reliability of the entire IoT system. Attached Figure Description

[0019] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.

[0020] To more clearly illustrate the technical solutions in the embodiments of this application or related technologies, the accompanying drawings used in the description of the embodiments or related technologies will be briefly introduced below. Obviously, those skilled in the art can obtain other drawings based on these drawings without creative effort.

[0021] Figure 1 This is a schematic diagram of the hardware environment of an optional device connection system provided according to an embodiment of this application;

[0022] Figure 2 This is a schematic flowchart of an optional device connection method provided according to an embodiment of this application;

[0023] Figure 3 This is a schematic diagram of another optional device connection method provided according to an embodiment of this application;

[0024] Figure 4 This is a schematic diagram of an optional device connection device provided according to an embodiment of this application;

[0025] Figure 5 This is a schematic diagram of another optional device connection device provided according to an embodiment of this application;

[0026] Figure 6 This is a schematic diagram of an optional electronic device structure provided in an embodiment of this application. Detailed Implementation

[0027] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0028] To address the problems mentioned in the background art, an embodiment of a device connection method is provided according to one aspect of the embodiments of this application.

[0029] like Figure 1 As shown, the above device connection method can be applied to, for example... Figure 1 The device connection system shown in the figure. The device connection system architecture 100 includes device 101, scheduling service 103, temporary connection service 105 and cloud service 107; device 101 communicates with scheduling service 103, temporary connection service 105 and cloud service 107 through the network respectively.

[0030] Specifically, device 101 can initiate connection requests and communicate with scheduling service 103, temporary connection service 105, and cloud service 107. Scheduling service 103 communicates with cloud service 107 via the network and can directly forward scheduling requests from device 101 to cloud service 107 to facilitate connection establishment between device 101 and cloud service 107. Temporary connection service 105 communicates with cloud service 107 via the network and can forward device requests to cloud service 107 to facilitate communication between device 101 and cloud service 107 after connection establishment.

[0031] Device 101 interacts with the user and sends requests to Temporary Connection Service 105, Cloud Service 107, and Scheduling Service 103. Device 101 can also be referred to as a terminal device. Scheduling Service 103 generates a temporary key and, based on its configuration, returns the temporary key to the requesting device 101 to connect with Temporary Connection Service 105 and Cloud Service 107. Scheduling Service 103 can also be described as configuring the corresponding Temporary Connection Service 105 and Cloud Service 107 for device 101. Temporary Connection Service 105 establishes a temporary connection with device 101, receives and forwards device requests. Temporary Connection Service 105 can be deployed in a distributed manner or as a singleton, configured according to actual business needs. Cloud Service 107 receives requests from Temporary Connection Service 105 and device 101 and establishes a connection with device 101.

[0032] The scheduling service 103, temporary connection service 105, and cloud service 107 can be used to provide services to device 101 or clients installed on device 101. Device 101 can connect to and communicate with the scheduling service 103, temporary connection service 105, and cloud service 107 after sending a request. The network can include various connection types, such as wired or wireless communication links or fiber optic cables.

[0033] Users can use device 101 to interact with scheduling service 103, temporary connection service 105, and cloud service 107 via the network to receive or send messages, etc. Various communication client applications can be installed on device 101, such as web browser applications, search applications, instant messaging tools, etc. Device 101 can be various electronic devices with a display screen and web browsing support, including but not limited to smartphones, tablets, e-book readers, MP3 players (Moving Picture Experts Group Audio Layer III), MP4 players (Moving Picture Experts Group Audio Layer IV), laptops, and desktop computers, etc. Scheduling service 103, temporary connection service 105, and cloud service 107 can all be servers providing various services, such as backend servers supporting the pages displayed on device 101.

[0034] It should be noted that the device connection method provided in this application embodiment is generally executed by scheduling service 103, temporary connection service 105, cloud service 107 and / or device 101. Correspondingly, the device connection device is generally disposed in scheduling service 103, temporary connection service 105, cloud service 107 / device. Furthermore, it should be understood that... Figure 1 The number of devices 101, networks, scheduling services 103, temporary connection services 105, and cloud services 107 shown is merely illustrative. Depending on implementation needs, any number of devices 101, networks, scheduling services 103, temporary connection services 105, and cloud services 107 can be included.

[0035] like Figure 2 As shown, Figure 2 This is a flowchart illustrating an optional device connection method provided in an embodiment of the present invention. Taking the device connection method being executed by a device as an example, a device connection method includes the following steps:

[0036] Step S202: Obtain the temporary key returned by the scheduling service, which is generated by the scheduling service based on the scheduling request sent by the device.

[0037] In this embodiment, the provided device connection method is applicable to high-concurrency scenarios in the Internet of Things (IoT) where devices connect to cloud services in batches. During the device connection process, in order for a device to establish a communication connection with the cloud service, it needs to initiate a scheduling request to the scheduling service. The scheduling service generates a temporary key after receiving the scheduling request from the device and returns the temporary key to the device.

[0038] The aforementioned temporary key is used for verification of communication connections between the device and the temporary connection service and cloud service. The temporary key includes device information, cloud service address, and a random checksum. Device information refers to the specific information of the device initiating the scheduling request to the scheduling service, such as the device's model, power, size, shape, energy consumption, and purpose; it can also include other relevant device information. The cloud service address is the address of the cloud service to which communication is to be established. The device can connect and communicate with the cloud service through the cloud service address. In this embodiment, the number of cloud services can be adjusted according to actual needs. Different cloud services correspond to different addresses, meaning the cloud service address is variable. However, a fixed address needs to be programmed into the device. Since the cloud service address cannot be hardcoded, a fixed scheduling service address is provided. For the device to connect to the cloud service, it must request the corresponding cloud service configuration from the scheduling service to obtain different cloud service data. The random checksum is a verification code generated by the scheduling service after receiving the device's scheduling request. This verification code can be a fixed code or a real-time code, and it can be any combination of numbers, Chinese characters, letters, and other characters. Of course, to enhance the security of device connections, verification codes can be real-time, thus ensuring the timeliness of the verification codes and further improving the security of device connections.

[0039] Step S204: When the device connection network of the scheduling service is congested, obtain the temporary connection service address returned by the scheduling service, and initiate a connection request to the temporary connection service according to the temporary key and the temporary connection service address to establish a connection with the temporary connection service.

[0040] In some embodiments, when the network connection of the scheduling service device is congested, the scheduling service also needs to obtain the temporary connection service address and return it to the device. At this time, the device can receive the temporary key and the temporary connection service address of the scheduling service.

[0041] Step S206: If a device is detected requesting cloud service data, the device request is forwarded to the cloud service through the temporary connection service.

[0042] In this embodiment, after generating a temporary key, the scheduling service also configures a temporary connection service address for the device sending the scheduling request and returns it to the device. The device then determines the location of the temporary connection service based on the received address, finds the corresponding service, and initiates a connection request using the received temporary key. The temporary connection service parses and verifies the temporary key, then retrieves the device information and cloud service address from it. It then sends a request to the cloud service using the address, including device information, the temporary key, and the request data from the device's request to the temporary connection service. This verification process prevents the device from sending requests to unauthorized locations, and prevents the temporary connection service or cloud service from accepting unfamiliar requests.

[0043] In some embodiments, after the device establishes a connection with the temporary connection service, the device enables broadcast reception of return messages, that is, the device opens the network connection. Because many devices do not keep the network module on all the time due to power consumption issues, this is to open the network module and wait for requests sent by business servers such as cloud services.

[0044] Specifically, the aforementioned temporary connection service has the capability to establish long-term connections with devices, forwarding device requests to the cloud service. After a device connects to the temporary connection service, it essentially registers its information with the service. When a device does not have a genuine business request, the connection between the device and the temporary connection service is closed, as is the connection between the device and the cloud service, thus avoiding network congestion. Once a device has a genuine business request, such as a user needing to retrieve data from the cloud service (typically a human operation, like someone manipulating the device), the device needs to communicate with the server. In the event of network congestion, the device will initiate this data retrieval request to the temporary connection service, which will then forward the request. Establishing the connection between the device and the cloud service only when the device generates an actual request reduces the peak pressure on the cloud service during batch device connections, lowers the concurrency of device connections, and improves the reliability of the entire IoT system.

[0045] Step S208: Receive connection data returned by the cloud service, and establish a connection with the cloud service based on the connection data.

[0046] In some embodiments, the cloud service receives a request from the temporary connection service, obtains the device address based on the device information in the temporary key, and returns the temporary key and connection data to the device. After receiving the response from the cloud service, the device parses the temporary key, verifies the security of the request based on the temporary key, and obtains connection information through the connection data to establish a connection with the cloud service before communication can commence. The aforementioned connection data includes information required for the device to connect with the cloud service, such as agreed-upon verification rules and the device ID returned by the cloud service.

[0047] In this embodiment of the invention, by obtaining the temporary key returned by the scheduling service, connections can be accurately established with the temporary connection service and the cloud service using the temporary key, avoiding network congestion caused by devices randomly connecting to the cloud service. When the device connection network of the scheduling service is congested, the address of the temporary connection service returned by the scheduling service is obtained, and a connection request is initiated to the temporary connection service to establish a connection based on the temporary key and the temporary connection service address. When a device needs to request data from the cloud service, the device request is forwarded to the cloud service through the temporary connection service. By increasing the number of temporary connection services forwarding device requests to the cloud service, it is beneficial to reduce the peak pressure on the cloud service when devices connect in batches by delaying the connection when the device connection network of the scheduling service is congested, reduce the concurrency of device connections, solve the problem of device connection network congestion caused by concurrent device connections, and thus improve the reliability of the entire Internet of Things system.

[0048] In an optional embodiment, prior to step S202, the method further includes:

[0049] Send a scheduling request to the scheduling service;

[0050] Detect network congestion status of the device connection for the scheduling service based on the scheduling request;

[0051] If the network connection of the device to the scheduling service is not congested, a temporary key is generated through the scheduling service and returned to the device.

[0052] In this embodiment, when a user needs to obtain cloud service data, they can send a scheduling request to the scheduling service through the device. The scheduling service receives the scheduling request from the device and parses it to obtain device information and request content. During the device connection process, if the device wants to establish a communication connection with the cloud service, it needs to initiate a scheduling request to the scheduling service. Only after receiving the scheduling request from the device can the scheduling service generate a temporary key and return the temporary key to the device.

[0053] Specifically, after receiving a scheduling request from a device, the scheduling service can check the network connectivity of the device to determine if a temporary connection service is needed. If the network connectivity is not congested, the regular cloud service request process can be executed, such as directly requesting a communication connection with the device through the scheduling service. In this case, no temporary connection service is needed; the scheduling service simply generates a temporary key and returns it to the device.

[0054] In this embodiment, the connection method between the device and the cloud service is selected by detecting the network congestion of the device connection of the scheduling service. When the device connection network of the scheduling service is not congested, the device only establishes a connection with the cloud service through the temporary key, thereby improving the connection speed between the device and the cloud service.

[0055] In an optional embodiment, after detecting network congestion of the device connection for the scheduling service according to the scheduling request, the method further includes:

[0056] If the device connection network of the scheduling service is congested, a temporary connection service address is obtained through the scheduling service.

[0057] The scheduling service returns the temporary key and the temporary connection service address to the device.

[0058] In this embodiment, network congestion can be a network bottleneck problem caused when devices connect to cloud services in batches. For example, high-concurrency scenarios usually occur when devices are powered off or powered on in batches. At this time, devices are powered on at almost the same time and send login requests to the server at almost the same time to request to establish a connection with the cloud service.

[0059] In this embodiment, when the device connection network of the scheduling service becomes congested, it indicates that too many devices are simultaneously requesting to connect to the cloud service from the scheduling service, necessitating the addition of a temporary connection service to participate in the cloud service connection requests. Therefore, the scheduling service needs to provide both a temporary key and the specific address information of the temporary connection service. This allows the device to find the corresponding temporary connection service using the temporary key and the specific temporary connection service address, thereby establishing a connection between the device and the temporary connection service. This facilitates a delayed connection through the temporary connection service, reducing the peak pressure on the cloud service during batch device connections, lowering the concurrency of device connections, resolving the device connection network congestion problem caused by concurrent device connections, and ultimately improving the reliability of the entire IoT system.

[0060] In an optional embodiment, the step of detecting network congestion of the device connection for the scheduling service based on the scheduling request includes:

[0061] Obtain preset initial monitoring parameters, which are the threshold values ​​for the number of requests generated by the scheduling service within a fixed time period;

[0062] The system determines whether the network connection of the device for the scheduling service is congested based on the scheduling request and the preset initial monitoring parameters.

[0063] In some embodiments, the monitoring parameter is the number of stage requests of the scheduling service, which is the number of scheduling requests generated by the scheduling service within a fixed period of time, and the preset initial monitoring parameter is the threshold for the number of requests set by the scheduling service within a fixed period of time.

[0064] Specifically, after receiving a device's scheduling request, the scheduling service can determine whether there is a problem with network congestion when connecting the device to the network based on the pre-set initial monitoring parameters.

[0065] In this embodiment, by pre-setting an initial monitoring parameter to monitor whether there is high concurrency in device connections in the scheduling service, the congestion of the device connection network of the scheduling service can be more accurately determined, thereby selecting the connection method between the device and the cloud service more quickly, thereby improving the connection speed between the device and the cloud service and further improving the efficiency of device connection.

[0066] In an optional embodiment, the step of determining whether the device connection network of the scheduling service is congested based on the scheduling request and the preset initial monitoring parameters includes:

[0067] The number of real-time requests generated by the scheduling service within a fixed time period is detected based on the scheduling request.

[0068] If the number of real-time requests generated by the scheduling service within a fixed period of time exceeds the preset initial monitoring parameter, then the device is determined to be connected to a congested network.

[0069] If the number of real-time requests generated by the scheduling service within a fixed period of time does not exceed the preset initial monitoring parameter, then it is determined that the device's network connection is not congested.

[0070] In this embodiment, the real-time request count is the current number of requests from the scheduling service within a fixed time period. For example, if the fixed time period is set to 10 minutes and the preset initial monitoring parameter is set to 1000, when a device sends a scheduling request to the scheduling service, the scheduling request of the device is exactly the 1001st request from the scheduling service within 10 minutes. At this time, the actual number of requests from the scheduling service is 1001, which means that when the scheduling service receives the scheduling request from the device, the actual number of requests from the scheduling service has exceeded the preset initial monitoring parameter. This indicates that the device connection is experiencing high concurrency, and further indicates that there is congestion in the device's network connection.

[0071] In this embodiment, when the number of device scheduling requests received by the scheduling service does not exceed the preset initial monitoring parameters, it indicates that there is no high concurrency in the device connection. At this time, the scheduling service is in a normal request state and there is no high concurrency, which further indicates that there is no congestion in the device connection network.

[0072] In this embodiment, preset initial monitoring parameters are used to monitor device requests in the scheduling service in real time. When the device connection network of the scheduling service is congested, a temporary connection service is added to generate a temporary connection with the device. Simultaneously, a temporary key that can be quickly verified by the cloud service is generated. When the device generates a real request, the connection between the device and the cloud service is established, thus achieving a delayed connection, reducing peak device connection concurrency, improving device connection speed, and resolving the device connection network congestion problem. Alternatively, when the device connection network is not congested, a normal connection method can be selected, directly forwarding the device request to the cloud service through the scheduling service, reducing the steps of the temporary connection service and further improving device connection speed. This allows for flexible selection of the method for establishing device-cloud service connection communication based on device request status, improving device connection speed from a step-by-step perspective, further resolving the device connection network congestion problem, and thus improving device connection reliability.

[0073] In an optional embodiment, step S202 specifically includes:

[0074] When the network connection of the device to the scheduling service is not congested, the scheduling service forwards the scheduling request of the device to the cloud service.

[0075] The device connects to the cloud service based on the temporary key and the device's scheduling request.

[0076] In this embodiment, when the network connection of the scheduling service is not congested, the device's requests can be directly forwarded to the cloud service through the scheduling service. By combining this with a temporary key to establish a connection between the device and the cloud service, there is no need to add a temporary connection service to achieve the connection between the device and the cloud service. This improves the connection speed between the device and the cloud service from the connection step, thereby increasing the connection efficiency between the device and the cloud service.

[0077] In an optional embodiment, step S206 includes:

[0078] Send a device request to the temporary connection service to obtain cloud service data;

[0079] After the temporary connection service verifies the device request, it forwards the device request to the cloud service through the temporary connection service.

[0080] In this embodiment, when a user needs to request cloud service data, they need to send a device request to the temporary connection service to obtain cloud service data. If the device connection network of the scheduling service is congested, a temporary connection can be established directly with the temporary connection service. After the temporary connection service verifies the device's request information, the two can establish a connection. The temporary connection service can then forward the device's device request to the cloud service so that the cloud service and the device can establish a communication connection.

[0081] In an optional embodiment, combined with Figure 3 As shown, Figure 3 This is a flowchart illustrating an optional device connection method according to an embodiment of the present invention. Applicable to a scheduling service in a device connection system, the device connection system includes: a device, a scheduling service, a temporary connection service, and a cloud service; the device is communicatively connected to the scheduling service, the temporary connection service, and the cloud service respectively; the scheduling service is communicatively connected to the cloud service; the temporary connection service is communicatively connected to the cloud service. A device connection method includes the following steps:

[0082] Step S302: Obtain the device's scheduling request.

[0083] In this embodiment, when a user needs to obtain cloud service data, the user can send a scheduling request to the scheduling service through the device. The scheduling service receives the scheduling request from the device and parses the scheduling request to obtain device information, etc.

[0084] Step S304: Determine whether the device's network connection is congested based on the scheduling request and preset initial monitoring parameters.

[0085] In some embodiments, after the scheduling service receives a scheduling request from a device, it can determine whether there is a problem with network congestion when the scheduling service connects to the device based on pre-set initial monitoring parameters. Network congestion when devices connect to cloud services in batches can be a network bottleneck problem. For example, high-concurrency scenarios often arise from batch power outages / ons, in which cases devices power on almost simultaneously and send login requests to the server almost simultaneously, requesting to establish a connection with the server.

[0086] Step S306: If the device's network connection is congested, a temporary key is generated and a temporary connection service address is obtained according to the scheduling request.

[0087] The provided device connection method is suitable for high-concurrency scenarios in the Internet of Things (IoT) where devices connect to cloud services in batches. During the device connection process, in order for a device to establish a communication connection with the cloud service, it needs to send a scheduling request to the scheduling service. The scheduling service generates a temporary key after receiving the scheduling request from the device and returns the temporary key to the device.

[0088] The aforementioned temporary key is used for verification of communication connections between the device and the temporary connection service and cloud service. The temporary key includes device information, cloud service address, and a random checksum. Device information refers to the specific information of the device initiating the scheduling request to the scheduling service, such as the device's model, power, size, shape, energy consumption, and purpose; it can also include other relevant device information. The cloud service address is the address of the cloud service to which communication is to be established. The device can connect and communicate with the cloud service through the cloud service address. In this embodiment, the number of cloud services can be adjusted according to actual needs. Different cloud services correspond to different addresses, meaning the cloud service address is variable. However, a fixed address needs to be programmed into the device. Since the cloud service address cannot be hardcoded, a fixed scheduling service address is provided. For the device to connect to the cloud service, it must request the corresponding cloud service configuration from the scheduling service to obtain different cloud service data. The random checksum is a verification code generated by the scheduling service after receiving the device's scheduling request. This verification code can be a fixed code or a real-time code, and it can be any combination of numbers, Chinese characters, letters, and other characters. Of course, to enhance the security of device connections, verification codes can be real-time, thus ensuring the timeliness of the verification codes and further improving the security of device connections.

[0089] When the network connection of the device in the scheduling service is congested, the scheduling service also needs to obtain the temporary connection service address and return it to the device. At this time, the device can receive the temporary key and the temporary connection service address of the scheduling service.

[0090] Step S308: Send the temporary key and the temporary connection service address to the device so that a connection is established with the temporary connection service when the device requests cloud service data.

[0091] In some embodiments, after generating a temporary key, the scheduling service also configures a temporary connection service address for the device sending the scheduling request and returns it to the device. The device then determines the location of the temporary connection service based on the received address, finds the corresponding service, and initiates a connection request using the received temporary key. The temporary connection service parses and verifies the temporary key, then retrieves the device information and cloud service address from it. It then sends a request to the cloud service using the cloud service address. The request information includes the device information, the temporary key, and the request data from the device when requesting the temporary connection service. This verification process prevents the device from sending requests to unauthorized locations, and prevents the temporary connection service or cloud service from accepting unfamiliar requests.

[0092] Step S310: The device request of the device is forwarded to the cloud service through the temporary connection service, and a connection between the device and the cloud service is established based on the device request.

[0093] In some embodiments, after the device establishes a connection with the temporary connection service, the device enables broadcast reception of return messages, that is, the device opens the network connection. Because many devices do not keep the network module on all the time due to power consumption issues, this is to open the network module and wait for requests sent by business servers such as cloud services.

[0094] Specifically, the aforementioned temporary connection service has the capability to establish long-term connections with devices, forwarding device requests to the cloud service. After a device connects to the temporary connection service, it essentially registers its information with the service. When a device does not have a genuine business request, the connection between the device and the temporary connection service is closed, as is the connection between the device and the cloud service, thus avoiding network congestion. Once a device has a genuine business request, such as a user needing to retrieve data from the cloud service (typically a human operation, like someone manipulating the device), the device needs to communicate with the server. In the event of network congestion, the device will initiate this data retrieval request to the temporary connection service, which will then forward the request. Establishing the connection between the device and the cloud service only when the device generates an actual request reduces the peak pressure on the cloud service during batch device connections, lowers the concurrency of device connections, and improves the reliability of the entire IoT system.

[0095] In this embodiment of the invention, a scheduling request from a device is obtained; based on the scheduling request and preset initial monitoring parameters, it is determined whether the device's network connection is congested. If the network connection is congested, a temporary key is generated and a temporary connection service address is obtained based on the scheduling request; the temporary key and the temporary connection service address are sent to the device so that a connection is established with the temporary connection service when the device requests cloud service data; the device request is forwarded to the cloud service through the temporary connection service, and a connection is established between the device and the cloud service based on the device request. This allows for the use of a temporary connection service to achieve delayed connections when network congestion occurs, reducing the peak pressure on the cloud service during batch device connections, reducing the concurrency of device connections, solving the problem of network congestion caused by concurrent device connections, and thus improving the reliability of the entire IoT system.

[0096] In an optional embodiment, step S302 specifically includes:

[0097] Preset initial monitoring parameters, which are thresholds for the number of requests within a fixed period of time for the scheduling service;

[0098] If the number of real-time requests generated by the scheduling service within a fixed period of time exceeds the preset initial monitoring parameter, then the device is determined to be connected to a congested network.

[0099] If the number of real-time requests generated by the scheduling service within a fixed period of time does not exceed the preset initial monitoring parameter, then it is determined that the device's network connection is not congested.

[0100] In some embodiments, the monitoring parameter is the number of stage requests of the scheduling service, which is the number of scheduling requests generated by the scheduling service within a fixed period of time, and the preset initial monitoring parameter is the threshold for the number of requests set by the scheduling service within a fixed period of time.

[0101] Specifically, an initial monitoring parameter is pre-set to monitor whether there is high concurrency in device connections in the scheduling service.

[0102] In this embodiment, when the number of device scheduling requests received by the scheduling service exceeds the preset initial monitoring parameters, it indicates that there is high concurrency in device connections, and further indicates that there is congestion in the device connection network.

[0103] In this embodiment, when the number of device scheduling requests received by the scheduling service does not exceed the preset initial monitoring parameters, it indicates that there is no high concurrency in device connections. At this time, the scheduling service is in a normal request state and there is no high concurrency, further indicating that there is no congestion in the device connection network.

[0104] In this embodiment, preset initial monitoring parameters are used to monitor device requests in the scheduling service in real time. When the device connection network of the scheduling service is congested, a temporary connection service is added to generate a temporary connection with the device. Simultaneously, a temporary key that can be quickly verified by the cloud service is generated. When the device generates a real request, the connection between the device and the cloud service is established, thus achieving a delayed connection, reducing peak device connection concurrency, improving device connection speed, and resolving the device connection network congestion problem. Alternatively, when the device connection network is not congested, a normal connection method can be selected, directly forwarding the device request to the cloud service through the scheduling service, reducing the steps of the temporary connection service and further improving device connection speed. This allows for flexible selection of the method for establishing device-cloud service connection communication based on device request status, improving device connection speed from a step-by-step perspective, further resolving the device connection network congestion problem, and thus improving device connection reliability.

[0105] In an optional embodiment, after determining whether the device's network connection is congested based on the scheduling request and preset initial monitoring parameters, the method further includes:

[0106] If the network connection of the device for the scheduling service is not congested, a temporary key is generated according to the scheduling request;

[0107] The temporary key is sent to the device, and the scheduling request of the device is forwarded to the cloud service. A connection between the device and the cloud service is established based on the temporary key and the scheduling request.

[0108] In this embodiment, when the network connection of the scheduling service is not congested, the scheduling request of the device can be directly forwarded to the cloud service through the scheduling service. By combining a temporary key with the connection communication between the device and the cloud service, there is no need to add a temporary connection service to achieve the connection between the device and the cloud service. This improves the connection speed between the device and the cloud service from the connection step, thereby improving the connection efficiency between the device and the cloud service.

[0109] According to another aspect of the embodiments of this application, such as Figure 4 As shown, corresponding to the device connection method in the above embodiments, this embodiment provides a device connection device 400, applicable to devices in a device connection system. The device connection system includes: devices, a scheduling service, a temporary connection service, and a cloud service; the devices are communicatively connected to the scheduling service, the temporary connection service, and the cloud service respectively; the scheduling service is communicatively connected to the cloud service; the temporary connection service is communicatively connected to the cloud service; the device connection device 400 includes:

[0110] The first acquisition module 401 is used to acquire a temporary key returned by the scheduling service, wherein the temporary key is generated by the scheduling service based on the scheduling request sent by the device;

[0111] The first connection module 403 is used to obtain the temporary connection service address returned by the scheduling service when the device connection network of the scheduling service is congested, and to initiate a connection request to the temporary connection service according to the temporary key and the temporary connection service address in order to establish a connection with the temporary connection service.

[0112] The first forwarding module 405 is used to forward the device request to the cloud service through the temporary connection service if it detects that the device is requesting cloud service data.

[0113] The second connection module 407 is used to receive connection data returned by the cloud service and establish a connection with the cloud service based on the connection data.

[0114] It should be noted that in this embodiment, the first acquisition module 401 can be used to execute step S202 in this application embodiment, the first connection module 403 in this embodiment can be used to execute step S204 in this application embodiment, the first forwarding module 405 in this embodiment can be used to execute step S206 in this application embodiment, and the second connection module 407 in this embodiment can be used to execute step S208 in this application embodiment.

[0115] Optionally, before the first acquisition module 401, the device further includes:

[0116] The first sending module is used to send a scheduling request to the scheduling service;

[0117] The detection module is used to detect network congestion status of the device connection for the scheduling service based on the scheduling request.

[0118] The generation module is used to generate a temporary key through the scheduling service if the network connection of the device in the scheduling service is not congested, and then return the temporary key to the device.

[0119] Optionally, after the detection module, the device further includes:

[0120] The second acquisition module is used to obtain a temporary connection service address through the scheduling service if the device connection network of the scheduling service is congested.

[0121] The return module is used to return the temporary key and the temporary connection service address to the device through the scheduling service.

[0122] Optionally, the detection module includes:

[0123] The acquisition unit is used to acquire preset initial monitoring parameters, which are the threshold values ​​for the number of requests generated by the scheduling service within a fixed period of time.

[0124] The judgment unit is used to determine whether the network connection of the device for the scheduling service is congested based on the scheduling request and the preset initial monitoring parameters.

[0125] Optionally, the determination unit is further configured to detect the number of real-time requests generated by the scheduling service within a fixed period of time based on the scheduling request; if the number of real-time requests generated by the scheduling service within a fixed period of time exceeds the preset initial monitoring parameter, it is determined that the device is connected to the network congested; if the number of real-time requests generated by the scheduling service within a fixed period of time does not exceed the preset initial monitoring parameter, it is determined that the device is connected to the network uncongested.

[0126] Optionally, after the first acquisition module 401, the device further includes: a request sending module, configured to forward the scheduling request of the device to the cloud service through the scheduling service when the device connection network of the scheduling service is not congested; and a connection establishment module, configured to establish a connection with the cloud service based on the temporary key and the scheduling request of the device.

[0127] Optionally, the first forwarding module 405 is further configured to send a device request to the temporary connection service to obtain cloud service data; after the temporary connection service verifies the device request, it forwards the device request to the cloud service through the temporary connection service.

[0128] It should be noted that the examples and application scenarios implemented by the above modules and corresponding steps are the same, but are not limited to the content disclosed in the above embodiments. It should also be noted that the above modules, as part of a device, can operate in environments such as... Figure 1 The hardware environment shown can be implemented either through software or through hardware.

[0129] It should be noted that the suffixes such as module, component, unit, submodule, and subunit used to represent elements in the above-described device are only for the purpose of illustrative purposes and have no specific meaning in themselves. Therefore, they can be used in combination.

[0130] According to another aspect of the embodiments of this application, such as Figure 5 As shown, corresponding to the device connection method in the above embodiments, this embodiment provides a device connection device 500, which includes:

[0131] The third acquisition module 501 is used to acquire the device's scheduling request;

[0132] The judgment module 503 is used to determine whether the device's network connection is congested based on the scheduling request and preset initial monitoring parameters.

[0133] The generation module 505 is used to generate a temporary key and obtain a temporary connection service address according to the scheduling request if the device's network connection is congested.

[0134] The sending module 507 is used to send the temporary key and the temporary connection service address to the device so that a connection is established with the temporary connection service when the device requests cloud service data.

[0135] The second forwarding module 509 is used to forward the device request of the device to the cloud service through the temporary connection service, and establish a connection between the device and the cloud service based on the device request.

[0136] It should be noted that in this embodiment, the third acquisition module 501 can be used to execute step S302 in this application embodiment, the judgment module 503 in this embodiment can be used to execute step S304 in this application embodiment, the generation module 505 in this embodiment can be used to execute step S306 in this application embodiment, the sending module 507 in this embodiment can be used to execute step S308 in this application embodiment, and the second forwarding module 509 in this embodiment can be used to execute step S310 in this application embodiment.

[0137] Optionally, the judgment module 503 includes: a preset unit for presetting initial monitoring parameters, wherein the preset initial monitoring parameters are a threshold for the number of requests within a fixed period of the scheduling service; a second determination unit for determining that the device is connected to the network if the number of real-time requests generated by the scheduling service within a fixed period exceeds the preset initial monitoring parameters; and a third determination unit for determining that the device is not connected to the network if the number of real-time requests generated by the scheduling service within a fixed period does not exceed the preset initial monitoring parameters.

[0138] Optionally, the device further includes: a third connection module, configured to generate a temporary key based on the scheduling request if the device connection network of the scheduling service is not congested; and a third forwarding module, configured to send the temporary key to the device and forward the scheduling request of the device to the cloud service, and establish a connection between the device and the cloud service based on the temporary key and the scheduling request.

[0139] It should be noted that the examples and application scenarios implemented by the above modules and corresponding steps are the same, but are not limited to the content disclosed in the above embodiments. It should also be noted that the above modules, as part of a device, can operate in environments such as... Figure 1 The hardware environment shown can be implemented either through software or through hardware.

[0140] It should be noted that the suffixes such as module, component, unit, submodule, and subunit used to represent elements in the above-described device are only for the purpose of illustrative purposes and have no specific meaning in themselves. Therefore, they can be used in combination.

[0141] According to another aspect of the embodiments of this application, this application provides an electronic device, such as... Figure 6 As shown, the device includes a memory 601, a processor 603, a communication interface 605, and a communication bus 607. The memory 601 stores a computer program that can run on the processor 603. The memory 601 and the processor 603 communicate through the communication interface 605 and the communication bus 607. When the processor 603 executes the computer program, it implements the steps of the above-mentioned device connection method.

[0142] The memory and processor in the aforementioned electronic devices communicate with each other via a communication bus and a communication interface. The communication bus can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. This communication bus can be divided into an address bus, a data bus, a control bus, etc.

[0143] The memory may include random access memory (RAM) or non-volatile memory, such as at least one disk storage device. Optionally, the memory may also be at least one storage device located remotely from the aforementioned processor.

[0144] The processors mentioned above can be general-purpose processors, including central processing units (CPUs), network processors (NPs), etc.; they can also be digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components.

[0145] According to another aspect of the embodiments of this application, a computer program product or computer program is also provided, which includes computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the steps of the device connection method in any of the above embodiments.

[0146] Optionally, in embodiments of this application, the computer-readable medium is configured to store program code for the processor to perform the steps of the device connectivity method described in the above embodiments, applicable to a device or applicable to a scheduling service:

[0147] The device connection method applicable to the device includes the following steps:

[0148] S202, Obtain the temporary key returned by the scheduling service, the temporary key being generated by the scheduling service based on the scheduling request sent by the device; S204, When the device connection network of the scheduling service is congested, obtain the temporary connection service address returned by the scheduling service, and initiate a connection request to the temporary connection service based on the temporary key and the temporary connection service address to establish a connection with the temporary connection service; S206, If a device request for cloud service data is detected, forward the device request to the cloud service through the temporary connection service; S208, Receive the connection data returned by the cloud service, and establish a connection with the cloud service based on the connection data.

[0149] The device connection method applicable to scheduling services includes the following steps:

[0150] S302, Obtain the device's scheduling request; S304, Determine whether the device's network connection is congested based on the scheduling request and preset initial monitoring parameters; S306, If the device's network connection is congested, Generate a temporary key and obtain a temporary connection service address based on the scheduling request; S308, Send the temporary key and the temporary connection service address to the device so that a connection can be established with the temporary connection service when the device requests cloud service data; S310, Forward the device request to the cloud service through the temporary connection service, and establish a connection between the device and the cloud service based on the device request.

[0151] Optionally, specific examples in this embodiment can refer to the examples described in the above embodiments, and will not be repeated here. Furthermore, in the specific implementation of this application embodiment, the above embodiments can be consulted, and corresponding technical effects can be achieved.

[0152] It is understood that the embodiments described herein can be implemented in hardware, software, firmware, middleware, microcode, or a combination thereof. For hardware implementation, the processing unit can be implemented in one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field-programmable gate arrays (FPGAs), general-purpose processors, controllers, microcontrollers, microprocessors, other electronic units for performing the functions described herein, or combinations thereof.

[0153] For software implementation, the techniques described herein can be implemented by units that perform the functions described herein. The software code can be stored in memory and executed by a processor. The memory can be implemented in the processor or external to the processor.

[0154] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0155] Those skilled in the art will understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.

[0156] In the embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative. For instance, the division of modules is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple modules or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection through some interfaces, devices, or units, and may be electrical, mechanical, or other forms.

[0157] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs. Furthermore, the functional units in the various embodiments of this application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.

[0158] If the aforementioned functions are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solutions of the embodiments of this application, essentially or in other words, the parts that contribute to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, ROM, RAM, magnetic disks, or optical disks.

[0159] It should be noted that, in this document, relational terms such as "first," "second," etc., are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprise," "include," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprises a…" does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0160] The above description is merely a specific embodiment of this application, enabling those skilled in the art to understand or implement this application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of this application. Therefore, this application is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features claimed herein.

Claims

1. A device connection method, applicable to devices in a device connection system, the device connection system comprising: Equipment, scheduling services, temporary connection services, and cloud services; The device is communicatively connected to the scheduling service, the temporary connection service, and the cloud service, respectively. The scheduling service is communicatively connected to the cloud service; The temporary connection service communicates with the cloud service, characterized in that the method includes: Obtain the temporary key returned by the scheduling service, which is generated by the scheduling service based on the scheduling request sent by the device; When the network connection of the device to the scheduling service is not congested, the scheduling service forwards the scheduling request of the device to the cloud service; and connects to the cloud service based on the temporary key and the scheduling request of the device. When the device connection network of the scheduling service is congested, the temporary connection service address returned by the scheduling service is obtained, and a connection request is initiated to the temporary connection service according to the temporary key and the temporary connection service address to establish a connection with the temporary connection service. If a device is detected requesting cloud service data, the device request is forwarded to the cloud service through the temporary connection service. Receive connection data returned by the cloud service, and establish a connection with the cloud service based on the connection data.

2. The device connection method according to claim 1, characterized in that, Before obtaining the temporary key returned by the scheduling service, the method further includes: Send a scheduling request to the scheduling service; Detect network congestion status of the device connection for the scheduling service based on the scheduling request; If the network connection of the device to the scheduling service is not congested, a temporary key is generated through the scheduling service and returned to the device.

3. The device connection method according to claim 2, characterized in that, After detecting network congestion of the device connection for the scheduling service based on the scheduling request, the method further includes: If the device connection network of the scheduling service is congested, a temporary connection service address is obtained through the scheduling service. The scheduling service returns the temporary key and the temporary connection service address to the device.

4. The device connection method according to claim 2, characterized in that, The step of detecting network congestion of the device connection for the scheduling service according to the scheduling request includes: Obtain preset initial monitoring parameters, which are the threshold values ​​for the number of requests generated by the scheduling service within a fixed time period; The system determines whether the network connection of the device for the scheduling service is congested based on the scheduling request and the preset initial monitoring parameters.

5. The device connection method according to claim 4, characterized in that, The step of determining whether the device connection network of the scheduling service is congested based on the scheduling request and the preset initial monitoring parameters includes: The number of real-time requests generated by the scheduling service within a fixed time period is detected based on the scheduling request. If the number of real-time requests generated by the scheduling service within a fixed period of time exceeds the preset initial monitoring parameter, then the device is determined to be connected to a congested network. If the number of real-time requests generated by the scheduling service within a fixed period of time does not exceed the preset initial monitoring parameter, then it is determined that the device's network connection is not congested.

6. The device connection method according to claim 1, characterized in that, If a device is detected requesting cloud service data, the process of forwarding the device request to the cloud service via the temporary connection service includes: Send a device request to the temporary connection service to obtain cloud service data; After the temporary connection service verifies the device request, it forwards the device request to the cloud service through the temporary connection service.

7. A device connection apparatus, suitable for devices in a device connection system, the device connection system comprising: Equipment, scheduling services, temporary connection services, and cloud services; The device is communicatively connected to the scheduling service, the temporary connection service, and the cloud service, respectively. The scheduling service is communicatively connected to the cloud service; The temporary connection service communicates with the cloud service, characterized in that the device comprises: The first acquisition module is used to acquire a temporary key returned by the scheduling service, wherein the temporary key is generated by the scheduling service based on the scheduling request sent by the device; The request sending module is used to forward the scheduling request of the device to the cloud service through the scheduling service when the device connection network of the scheduling service is not congested. A connection establishment module is used to connect to the cloud service based on the temporary key and the scheduling request of the device; The first connection module is used to obtain the temporary connection service address returned by the scheduling service when the device connection network of the scheduling service is congested, and to initiate a connection request to the temporary connection service according to the temporary key and the temporary connection service address in order to establish a connection with the temporary connection service. The first forwarding module is used to forward the device request to the cloud service through the temporary connection service if it is detected that the device requests cloud service data. The second connection module is used to receive connection data returned by the cloud service and establish a connection with the cloud service based on the connection data.

8. An electronic device comprising a memory, a processor, a communication interface, and a communication bus, wherein the memory stores a computer program executable on the processor, and the memory and the processor communicate via the communication bus and the communication interface, characterized in that... When the processor executes the computer program, it implements the device connection method according to any one of claims 1 to 6.

9. A computer-readable medium having processor-executable non-volatile program code, characterized in that, The program code causes the processor to perform the steps of the device connection method according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • Temporarily connecting method which distributes access requests from terminal spatially and / or temporally, server and program

    JP2008097314A