Connection mode switching method, system and device, electronic equipment and storage medium
By dynamically switching the connection mode according to the execution status information of the target module, the problems of high traffic and power consumption during long connections and poor real-time performance during short connections are solved, realizing real-time processing of instructions and reducing costs.
Patent Information
- Application Number
- CN202410666119.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-23
- Publication Date
- 2024-08-27
AI Technical Summary
In the existing technology, when the module uses a long connection, additional traffic costs and high power consumption will be incurred. When the module uses a short connection, the real-time processing of instructions issued by the cloud platform is poor and cannot respond in time.
By obtaining the execution status information of the target module, if the module cannot execute the instruction within the preset time, it switches to long connection mode to ensure timely processing of instructions. After the execution is completed, it switches back to short connection mode to reduce traffic and power consumption.
It improves the real-time nature of instruction processing, reduces traffic and power consumption, and achieves traffic and power consumption savings while ensuring timeliness.
Smart Images

Figure CN118555586A
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a connection mode switching method, system, device, electronic device and storage medium. Background Art
[0002] The PC (personal computer) IoT (Internet of Things) module supports two modes: long connection and short connection. When set to long connection, the module always maintains connection with the cloud platform and sends heartbeat packets regularly to keep it alive; when set to short connection, according to the configured sleep cycle, the module and the cloud platform are disconnected during the sleep cycle. After the sleep cycle expires, it will connect to the platform. After the connection is maintained for a period of time (30 seconds by default), it will disconnect and enter sleep.
[0003] In the related art, the module and the cloud platform usually maintain a connection mode. However, when the module uses a long connection, it needs to send heartbeat packets regularly to keep the connection with the cloud platform alive, which will incur additional traffic costs and high power consumption. When the module uses a short connection, the module cannot receive and process the instructions sent by the cloud platform in real time. It must wait for the end of the sleep cycle and the connection with the platform before it can receive the instructions sent by the cloud platform. The real-time performance is very poor. Summary of the invention
[0004] The present application provides a connection mode switching method, system, device, electronic device and storage medium to solve the problems in the prior art of maintaining a connection mode, failing to process instructions in a timely manner and having poor real-time performance during a short connection, generating additional traffic charges during a long connection, and high power consumption.
[0005] In a first aspect, an embodiment of the present application provides a connection mode switching method, which is applied to a cloud platform, including:
[0006] Acquire execution status information of a target module, wherein the execution status includes a current connection mode of the target module; the target module is a module that receives instructions sent by the cloud platform;
[0007] When the execution status information indicates that the target module cannot execute the instruction within a first preset time period, switching the current connection mode of the target module to a long connection mode;
[0008] When the execution status information indicates that the target module can execute the instruction within a first preset time period, the instruction is sent to the target module, and when it is determined that the target module has completed execution of the instruction, the current connection mode of the target module is switched to a short connection mode.
[0009] Optionally, switching the current connection mode of the target module to a long connection mode includes:
[0010] A switching text message is sent to the target module, so that the target module switches the current connection mode to a long connection mode based on information in the switching text message.
[0011] Optionally, switching the current connection mode of the target module to a long connection mode includes:
[0012] A switching instruction is sent to the target module, so that the target module switches the current connection mode to a short connection mode based on the switching instruction.
[0013] Optionally, before switching the current connection mode of the target module to the short connection mode, the method further includes:
[0014] It is determined that no instruction is sent to the target module within a second preset time period.
[0015] Optionally, the execution status information also includes the online status of the target module;
[0016] The execution status indicates that the target module cannot execute the instruction within a first preset time period, including:
[0017] The connection mode is a short connection and the online state is offline;
[0018] The execution status indicates that the target module can execute the instruction within a first preset time period, including:
[0019] The connection mode is a long connection and the online state is online, the connection mode is a short connection and the online state is online, or the connection mode is a long connection, the online state is offline and the online state can be updated to online within a first preset time period.
[0020] In a second aspect, an embodiment of the present application provides a connection mode switching system, comprising: a cloud platform and a target module; the target module is a module for receiving instructions sent by the cloud platform;
[0021] The cloud platform is used to obtain execution status information of the target module, wherein the execution status includes a current connection mode of the target module; when the execution status information indicates that the target module cannot execute the instruction within a first preset time, the current connection mode of the target module is switched to a long connection mode;
[0022] When the execution status information indicates that the target module can execute the instruction within a first preset time period, the instruction is sent to the target module;
[0023] The target module is used to obtain the instruction and send feedback information to the cloud platform after executing the instruction;
[0024] After determining that the target module has completed executing the instruction, the cloud platform switches the current connection mode of the target module to a short connection mode.
[0025] In a third aspect, an embodiment of the present application provides a connection mode switching device, including:
[0026] An acquisition module, used to acquire execution status information of a target module, wherein the execution status includes a current connection mode of the target module; the target module is a module that receives instructions sent by the cloud platform;
[0027] A first switching module, configured to switch the current connection mode of the target module to a long connection mode when the execution status information indicates that the target module cannot execute the instruction within a first preset time period;
[0028] The second switching module is used to send the instruction to the target module when the execution status information indicates that the target module can execute the instruction within a first preset time period, and after determining that the target module has completed execution of the instruction, switch the current connection mode of the target module to a short connection mode.
[0029] Optionally, the first switching module specifically includes:
[0030] The sending module is used to send a switching SMS to the target module, so that the target module switches the current connection mode to a long connection mode based on the information in the switching SMS.
[0031] In a fourth aspect, an embodiment of the present application provides an electronic device, comprising: a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other via the communication bus;
[0032] The memory is used to store computer programs;
[0033] The processor is used to execute the program stored in the memory to implement the connection mode switching method described in the first aspect.
[0034] In a fifth aspect, an embodiment of the present application provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the connection mode switching method described in the first aspect.
[0035] The above technical solution provided by the embodiment of the present application has the following advantages over the prior art: the method provided by the embodiment of the present application, by acquiring the execution status information of the target module, the execution status includes the current connection mode of the target module; the target module is a module that receives the instruction sent by the cloud platform; when the execution status information indicates that the target module cannot execute the instruction within the first preset time length, the current connection mode of the target module is switched to the long connection mode; when the execution status information indicates that the target module can execute the instruction within the first preset time length, the instruction is issued to the target module, and after determining that the target module has completed the execution of the instruction, the current connection mode of the target module is switched to the short connection mode. In this way, according to the execution status information of the target module, when the target module cannot execute the instruction as soon as possible, it can directly switch to the long connection mode, so that the connection with the target module can be established as soon as possible, so that the instruction can be executed as soon as possible, and the real-time performance of the instruction processing can be improved, and when the target module can execute the instruction as soon as possible, the instruction is directly executed, and after the execution is completed, it is switched to the short connection mode, so as to reduce the traffic consumption and power consumption. In this way, it is possible to save traffic and power consumption while receiving instructions issued by the platform in real time to ensure timeliness. BRIEF DESCRIPTION OF THE DRAWINGS
[0036] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and, together with the description, serve to explain the principles of the invention.
[0037] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0038] Figure 1 An application scenario diagram of a connection mode switching method provided in an embodiment of the present application;
[0039] Figure 2 A flow chart of a connection mode switching method provided in an embodiment of the present application;
[0040] Figure 3 A flow chart of a connection mode switching method provided in an embodiment of the present application;
[0041] Figure 4 A structural diagram of a connection mode switching system provided in an embodiment of the present application;
[0042] Figure 5 A structural diagram of a connection mode switching device provided in an embodiment of the present application;
[0043] Figure 6 A structural diagram of an electronic device provided in one embodiment of the present application. DETAILED DESCRIPTION
[0044] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of this application.
[0045] According to an embodiment of the present application, a connection mode switching method is provided. Optionally, in the embodiment of the present application, the connection mode switching method can be applied to Figure 1 In the hardware environment composed of the terminal 101 and the server 102 shown in FIG. Figure 1 As shown, the server 102 is connected to the terminal 101 via a network, and can be used to provide services (such as application services, etc.) for the terminal or a client installed on the terminal. A database can be set on the server or independently of the server to provide data storage services for the server 102. The above-mentioned network includes but is not limited to: a wide area network, a metropolitan area network or a local area network, and the terminal 101 is not limited to a PC, a mobile phone, a tablet computer, etc.
[0046] The connection mode switching method of the embodiment of the present application may be executed by the server 102, or by the terminal 101, or by both the server 102 and the terminal 101. The terminal 101 executes the connection mode switching method of the embodiment of the present application, or the client installed thereon.
[0047] Taking the terminal executing the connection mode switching method of the embodiment of the present application as an example, Figure 2 is a flow chart of an optional connection mode switching method according to an embodiment of the present application, such as Figure 2 As shown, the process of the method may include the following steps:
[0048] Step 201: Obtain execution status information of a target module, where the execution status includes a current connection mode of the target module; the target module is a module that receives instructions sent by the cloud platform.
[0049] In some embodiments, the execution status information includes the current connection mode between the cloud platform and the target module. The current connection mode may be synchronized between the cloud platform and the target module when the cloud platform and the target module establish a connection or after the most recent connection mode update.
[0050] The execution status information may also include an online status of the target module, where the online status is used to indicate whether the target module is currently connected to the cloud platform.
[0051] The target module may be, but is not limited to, a PC IoT module.
[0052] The execution status information can indicate whether the target module can execute the instruction issued by the cloud platform within the first preset time. The first preset time can be set based on actual conditions, for example, set to less than 5 minutes.
[0053] Further, the execution status indicates that the target module cannot execute the instruction within a first preset time period, including:
[0054] The connection mode is a short connection and the online state is offline.
[0055] In some embodiments, when the target module is in a short connection and offline state, it may mean that the target module is in a dormant stage. Usually, the dormant stage of the target module is long, which will cause the target module to not have a heartbeat connection with the cloud platform for a long time. Therefore, when the target module is in a short connection and offline state, it cannot execute the instruction within the first preset time.
[0056] The execution status indicates that the target module can execute the instruction within a first preset time period, including:
[0057] The connection mode is a long connection and the online state is online, the connection mode is a short connection and the online state is online, or the connection mode is a long connection, the online state is offline and the online state can be updated to online within a first preset time period.
[0058] In some embodiments, whether the target module is in long connection mode or short connection mode, when its online state is online, it indicates that a heartbeat connection is currently being established with the cloud platform. Therefore, at this time, the cloud platform can directly issue instructions to the target module, so the target module can execute the instructions within the first preset duration. In addition, when the target module is in long connection mode and its online state is offline, the target module may be temporarily in an environment with poor signal (such as an elevator, basement, etc.), and may be restored to online within a period of time. Therefore, when the target module is in long connection mode and its online state is offline, a timer can be set to monitor the online state of the target module in real time within the timing duration. If its online state is updated to online within the first preset duration, the target module maintains the long connection mode, and it can execute the instructions within the first preset duration.
[0059] Step 202: When the execution status information indicates that the target module cannot execute the instruction within a first preset time period, the current connection mode of the target module is switched to a long connection mode.
[0060] In some embodiments, since the module can maintain a connection with the cloud platform when it is in a long connection mode, when the target module is unable to execute the instruction within the first preset time period, the target module can be switched to a long connection mode to establish a connection with the cloud platform, thereby achieving data transmission between the two.
[0061] Specifically, a switching text message may be sent to the target module, so that the target module switches the current connection mode to the persistent connection mode based on information in the switching text message.
[0062] Among them, when the target module is in short connection mode, it will switch alternately between sleep and establishing a connection with the cloud platform. When the target module is in short connection mode and in sleep state, it will not establish a heartbeat connection with the cloud platform, but the target module is in the network connection state and can receive text messages sent by the cloud platform.
[0063] Therefore, the cloud platform sends a switching SMS to the target module, so that the target module switches the connection mode based on the switching SMS, thereby switching the target module from the short connection mode to the long connection mode.
[0064] Step 203: When the execution status information indicates that the target module can execute the instruction within a first preset time, the instruction is sent to the target module, and after determining that the target module has completed execution of the instruction, the current connection mode of the target module is switched to a short connection mode.
[0065] In some embodiments, since the target module in the short connection mode can be executed alternately when connected to the cloud platform and in the sleep state, the power consumption is lower. Therefore, after the target module completes the execution of the instruction, the target module is switched to a short connection module, thereby reducing additional traffic costs and reducing power consumption.
[0066] Specifically, a switching instruction may be sent to the target module, so that the target module switches the current connection mode to the short connection mode based on the switching instruction.
[0067] Since the execution status information indicates that the target module can execute the instruction within the first preset time length, after the target module executes the instruction, the target module and the cloud platform are actually still establishing a connection. Therefore, at this time, the cloud platform can directly send a switching instruction to the target module, so that the target module switches the connection mode to the short connection mode based on the switching instruction.
[0068] In an optional embodiment, before switching the current connection mode of the target module to the short connection mode, the method further includes:
[0069] It is determined that no instruction is sent to the target module within a second preset time period.
[0070] In some embodiments, in order to ensure that the cloud platform can continue to send instructions to the target module in a relatively short period of time, it is first determined whether the cloud platform has any instructions to send to the target module within a second preset time period. If not, the connection mode is switched to the segment connection mode, thereby avoiding frequent switching of the connection mode.
[0071] Through the connection mode switching method of the present application, when the cloud platform needs to send a command to the module, it first obtains the current connection mode and online status of the module: if it is in long connection mode and online, the cloud platform directly sends information to the module, then waits for the module to complete processing, and sends a message again to let the module switch to short connection mode; if it is in short connection mode and is not online, the module is switched to long connection mode online by sending a text message, and then a command is sent to the module, and after the module receives and processes the command, a message is sent to control the module to switch to short connection mode. This can save traffic and reduce power consumption, and at the same time, the command issued by the cloud platform can be received and processed in time, ensuring timeliness.
[0072] In a specific embodiment, the connection mode switching method of the present application is shown in FIG. Figure 3 , including:
[0073] Before sending commands to the module, the cloud platform first obtains the current connection mode and online status of the module. According to the different connection modes and online status, it is divided into the following four situations:
[0074] Case 1: If it is in long connection mode and online, the cloud platform directly sends a command. When the module completes the command processing response, the cloud platform waits for a period of time, such as 5 minutes, and sends a message to configure the module's connection mode as short connection and disconnect from the platform;
[0075] Case 2: If it is in long connection mode and is not online, start a timer for example, 5 minutes, monitor the module status every 5 minutes, wait for the module to be online, and then handle it according to case 1;
[0076] Case 3: If it is in short connection mode and online, the cloud platform directly sends a command. When the module completes the command processing response, the platform does not do anything and waits for the module to automatically enter the sleep state;
[0077] Case 4: If it is in short connection mode and not online, the cloud platform sends a text message to the module to notify the module to change the connection mode to long connection. After receiving the text message, the module switches to long connection mode to connect with the platform. After the cloud platform detects that the module status has become online, it sends a command again. When the module completes the command processing response, the cloud platform waits for a period of time, such as 5 minutes, and sends a message to configure the module's connection mode to short connection. The module and the platform are disconnected, and then connected to the platform according to the sleep cycle.
[0078] The connection mode switching method of the present application obtains the module connection mode and online status through the cloud platform, and controls the module to dynamically switch the connection mode through the method assisted by text messages. At the same time, it solves the problems of short connection mode, the commands issued by the cloud platform cannot be processed in time, the timeliness is poor, and the long connection mode consumes large traffic and high power consumption.
[0079] Based on the same concept, a connection mode switching system is provided in the embodiment of the present application. The specific implementation of the system can refer to the description of the method embodiment part, and the repeated parts will not be repeated. Figure 4 As shown, the system mainly includes:
[0080] Target module 401 and cloud platform 402; the target module is a module that receives instructions sent by the cloud platform;
[0081] The cloud platform is used to obtain execution status information of the target module, wherein the execution status includes a current connection mode of the target module; when the execution status information indicates that the target module cannot execute the instruction within a first preset time, the current connection mode of the target module is switched to a long connection mode;
[0082] When the execution status information indicates that the target module can execute the instruction within a first preset time period, the instruction is sent to the target module;
[0083] The target module is used to obtain the instruction and send feedback information to the cloud platform after executing the instruction;
[0084] After determining that the target module has completed executing the instruction, the cloud platform switches the current connection mode of the target module to a short connection mode.
[0085] Based on the same concept, a connection mode switching device is provided in the embodiment of the present application. The specific implementation of the device can refer to the description of the method embodiment part, and the repeated parts will not be repeated. Figure 5 As shown, the device mainly includes:
[0086] The acquisition module 501 is used to acquire the execution status information of the target module, wherein the execution status includes the current connection mode of the target module; the target module is a module that receives the instruction sent by the cloud platform;
[0087] A first switching module 502, configured to switch the current connection mode of the target module to a long connection mode when the execution status information indicates that the target module cannot execute the instruction within a first preset time period;
[0088] The second switching module 503 is used to send the instruction to the target module when the execution status information indicates that the target module can execute the instruction within a first preset time period, and after determining that the target module has completed execution of the instruction, switch the current connection mode of the target module to a short connection mode.
[0089] Optionally, the first switching module specifically includes:
[0090] The sending module is used to send a switching SMS to the target module, so that the target module switches the current connection mode to a long connection mode based on the information in the switching SMS.
[0091] Based on the same concept, an electronic device is also provided in the embodiment of the present application, such as Figure 6 As shown, the electronic device mainly includes: a processor 601, a memory 602 and a communication bus 603, wherein the processor 601 and the memory 602 communicate with each other through the communication bus 603. The memory 602 stores a program executable by the processor 601, and the processor 601 executes the program stored in the memory 602 to implement the following steps:
[0092] Acquire execution status information of a target module, wherein the execution status includes a current connection mode of the target module; the target module is a module that receives instructions sent by the cloud platform;
[0093] When the execution status information indicates that the target module cannot execute the instruction within a first preset time period, switching the current connection mode of the target module to a long connection mode;
[0094] When the execution status information indicates that the target module can execute the instruction within a first preset time period, the instruction is sent to the target module, and when it is determined that the target module has completed execution of the instruction, the current connection mode of the target module is switched to a short connection mode.
[0095] The communication bus 603 mentioned in the above electronic device can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus. The communication bus 603 can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 6 Only one thick line is used in the diagram, but this does not mean that there is only one bus or only one type of bus.
[0096] The memory 602 may include a random access memory (RAM) or a non-volatile memory, such as at least one disk memory. Optionally, the memory may also be at least one storage device located away from the processor 601.
[0097] The above-mentioned processor 601 can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc., and can also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components.
[0098] The electronic device provided in the embodiment of the present application may specifically be a module capable of realizing a communication function or a terminal device including the module, etc. The terminal device may be a mobile terminal or a smart terminal. The mobile terminal may specifically be at least one of a mobile phone, a tablet computer, a laptop computer, etc.; the smart terminal may specifically be a terminal including a wireless communication module such as a smart car, a smart watch, a shared bicycle, a smart cabinet, etc.; the module may specifically be a wireless communication module, such as any one of a 2G communication module, a 3G communication module, a 4G communication module, a 5G communication module, and a NB-IOT communication module.
[0099] In another embodiment of the present application, a computer-readable storage medium is provided, in which a computer program is stored. When the computer program runs on a computer, the computer executes the connection mode switching method described in the above embodiment.
[0100] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer instruction is loaded and executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network or other programmable device. The computer instruction can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instruction is transmitted from a website site, a computer, a server or a data center by wired (such as coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (such as infrared, microwave, etc.) mode to another website site, computer, server or data center. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server, a data center, etc. that contains one or more available media integration. The available medium can be a magnetic medium (such as a floppy disk, a hard disk, a magnetic tape, etc.), an optical medium (such as a DVD) or a semiconductor medium (such as a solid-state hard disk), etc.
[0101] It should be noted that, in this article, relational terms such as "first" and "second" are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.
[0102] The foregoing is merely a specific embodiment of the present invention, which enables those skilled in the art to understand or implement the present invention. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but rather to the widest scope consistent with the principles and novel features claimed herein.
Claims
1. A connection mode switching method, It is characterized in that Applied to cloud platforms, including: Acquire execution status information of a target module, wherein the execution status includes a current connection mode of the target module; the target module is a module that receives instructions sent by the cloud platform; When the execution status information indicates that the target module cannot execute the instruction within a first preset time period, switching the current connection mode of the target module to a long connection mode; When the execution status information indicates that the target module can execute the instruction within a first preset time period, the instruction is sent to the target module, and when it is determined that the target module has completed execution of the instruction, the current connection mode of the target module is switched to a short connection mode.
2. The connection mode switching method according to claim 1, It is characterized in that Switching the current connection mode of the target module to a long connection mode includes: A switching text message is sent to the target module, so that the target module switches the current connection mode to a long connection mode based on information in the switching text message.
3. The connection mode switching method according to claim 1, It is characterized in that Switching the current connection mode of the target module to a long connection mode includes: A switching instruction is sent to the target module, so that the target module switches the current connection mode to a short connection mode based on the switching instruction.
4. The connection mode switching method according to claim 1, It is characterized in that Before switching the current connection mode of the target module to the short connection mode, the method further includes: It is determined that no instruction is sent to the target module within a second preset time period.
5. The connection mode switching method according to claim 1, It is characterized in that The execution status information also includes the online status of the target module; The execution status indicates that the target module cannot execute the instruction within a first preset time period, including: The connection mode is a short connection and the online state is offline; The execution status indicates that the target module can execute the instruction within a first preset time period, including: The connection mode is a long connection and the online state is online, the connection mode is a short connection and the online state is online, or the connection mode is a long connection, the online state is offline and the online state can be updated to online within a first preset time period.
6. A connection mode switching system, It is characterized in that include: Cloud platform and target modules; The target module is a module that receives instructions sent by the cloud platform; The cloud platform is used to obtain execution status information of the target module, wherein the execution status includes a current connection mode of the target module; when the execution status information indicates that the target module cannot execute the instruction within a first preset time, the current connection mode of the target module is switched to a long connection mode; When the execution status information indicates that the target module can execute the instruction within a first preset time period, the instruction is sent to the target module; The target module is used to obtain the instruction and send feedback information to the cloud platform after executing the instruction; After determining that the target module has completed executing the instruction, the cloud platform switches the current connection mode of the target module to a short connection mode.
7. A connection mode switching device, It is characterized in that include: An acquisition module, used for acquiring execution status information of a target module, wherein the execution status includes a current connection mode of the target module; The target module is a module that receives instructions sent by the cloud platform; A first switching module, configured to switch the current connection mode of the target module to a long connection mode when the execution status information indicates that the target module cannot execute the instruction within a first preset time period; The second switching module is used to send the instruction to the target module when the execution status information indicates that the target module can execute the instruction within a first preset time period, and after determining that the target module has completed execution of the instruction, switch the current connection mode of the target module to a short connection mode.
8. The connection mode switching device according to claim 7, It is characterized in that The first switching module specifically includes: The sending module is used to send a switching SMS to the target module, so that the target module switches the current connection mode to a long connection mode based on the information in the switching SMS.
9. An electronic device, It is characterized in that include: A processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other via the communication bus; The memory is used to store computer programs; The processor is used to execute the program stored in the memory to implement the connection mode switching method described in any one of claims 1-5.
10. A computer-readable storage medium storing a computer program, It is characterized in that When the computer program is executed by a processor, the connection mode switching method according to any one of claims 1 to 5 is implemented.
