Communication method, communication device, air conditioner and cloud server

By using the serial number verification mechanism in the communication between the air conditioner and the cloud server, the problem of communication sequence disorder caused by network instability is solved, communication reliability is improved and control logic errors are avoided.

CN119573200APending Publication Date: 2025-03-07FOSHAN SHUNDE MIDEA ELECTRONICS TECH CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311156200.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-09-06
Publication Date
2025-03-07

AI Technical Summary

Technical Problem

Due to the instability of the network, the communication between the air conditioner and the cloud server may be inconsistent, resulting in incorrect calculation results of the cloud server or inverted control logic of the air conditioner.

Method used

The air conditioner adds a serial number when sending a status packet at a preset time interval, and requires the cloud server to add the same serial number to the control instruction packet. After receiving the air conditioner, the validity of the control instruction is verified through the serial number.

Benefits of technology

Through the serial number verification mechanism, ensure that the order of status data packets and control instruction data packets is consistent, improve the communication reliability between the air conditioner and the cloud server, and avoid control logic errors caused by network fluctuations.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119573200A_ABST
    Figure CN119573200A_ABST
Patent Text Reader

Abstract

The invention discloses a communication method, a communication device, an air conditioner and a cloud server, the communication method is applied to the air conditioner, the air conditioner is in communication connection with the cloud server through a network, the method comprises the steps that state data is obtained, and the state data represents operation state information and / or operation environment information of the air conditioner; a state data packet carrying state data is generated according to a preset time interval, a first serial number is added into the state data packet, the state data packet is sent to the cloud server, and the first serial number is a preset initial serial number or is obtained by adding a serial number in a previous state data packet; and when a control instruction data packet returned by the cloud server is received and it is determined that the second serial number carried in the control instruction data packet is the same as the first serial number, executing the control instruction carried in the control instruction data packet. According to the embodiment, the communication reliability between the air conditioner and the cloud server can be improved, and control logic errors caused by network fluctuation are avoided.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of cloud communication technology, and in particular to a communication method, a communication device, an air conditioner and a cloud server. Background Art

[0002] With the rapid development of networked home appliances, more and more air conditioners communicate with cloud servers through the Internet. Based on the big data and precise control of cloud servers, the air conditioners can be instructed to make the best operation mode for the current working environment. Generally speaking, the local air conditioner uploads the status data to the cloud server, and the cloud server calculates a set of control parameters based on the status data and sends them to the air conditioner, and the air conditioner operates according to the received control parameters.

[0003] Since the network is not always stable, network fluctuations may occur, which may cause the order of status data received by the cloud server to be disordered, resulting in incorrect calculation results of the cloud server or inverted control logic of the air conditioner. Summary of the invention

[0004] The embodiments of the present application provide a communication method, a communication device, an air conditioner and a cloud server, which can improve the communication reliability between the air conditioner and the cloud server.

[0005] In a first aspect, an embodiment of the present application provides a communication method, which is applied to an air conditioner, wherein the air conditioner is communicatively connected to a cloud server via a network; the method comprises:

[0006] Acquiring status data, wherein the status data represents operating status information and / or operating environment information of the air conditioner;

[0007] Generate a status data packet carrying the status data at a preset time interval, add a first sequence number to the status data packet and send the status data packet to the cloud server, where the first sequence number is a preset initial sequence number or is obtained by increasing the sequence number in the previous status data packet;

[0008] When a control instruction data packet returned by the cloud server is received and it is determined that the second sequence number carried in the control instruction data packet is the same as the first sequence number, the control instruction carried in the control instruction data packet is executed.

[0009] In some embodiments, the method further comprises:

[0010] When a control instruction data packet returned by the cloud server is received and it is determined that the second sequence number carried in the control instruction data packet is different from the first sequence number, the control instruction data packet is discarded.

[0011] In some embodiments, before generating the status data packet, the method further includes:

[0012] Controlling the air conditioner to enter a cloud control mode and establishing a communication connection with the cloud server;

[0013] After receiving the control instruction data packet, the method further includes:

[0014] When a preset number of control instruction data packets are discarded continuously, the cloud control mode is exited.

[0015] In some embodiments, the preset time interval is greater than a preset communication delay value, and the preset communication delay value represents the time difference between the air conditioner sending the status data packet and receiving the control instruction data packet corresponding to the status data packet.

[0016] In a second aspect, an embodiment of the present application provides a communication method, which is applied to a cloud server, wherein the cloud server is connected to the air conditioner through a network, and the method includes:

[0017] receiving a status data packet sent by the air conditioner, and determining status data and a first sequence number carried by the status data packet, wherein the status data represents operating status information and / or operating environment information of the air conditioner;

[0018] When the first sequence number is a preset initial sequence number or increases compared to the sequence number in the previous status data packet, a control instruction is generated according to the status data, a control instruction data packet is generated according to the control instruction, and a second sequence number identical to the first sequence number is added to the control instruction data packet;

[0019] The control instruction data packet is sent to the air conditioner.

[0020] In some embodiments, the receiving of the status data packet sent by the air conditioner includes:

[0021] Adding the status data packet to a queue to be processed;

[0022] In the queue to be processed, when there is no other status data packet to be processed before the status data packet, the processing priority of the status data packet is increased.

[0023] In a third aspect, an embodiment of the present application provides a communication device, comprising at least one processor and a memory for communicating with the at least one processor; the memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the communication method as described in the embodiment of the first aspect.

[0024] In a fourth aspect, an embodiment of the present application provides a communication device, comprising at least one processor and a memory for communicating with the at least one processor; the memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the communication method as described in the embodiment of the second aspect.

[0025] In a fifth aspect, an embodiment of the present application provides an air conditioner, comprising a communication device as described in the embodiment of the third aspect.

[0026] In a sixth aspect, an embodiment of the present application provides a cloud server, comprising a communication device as described in the embodiment of the fourth aspect.

[0027] The communication method, communication device, air conditioner and cloud server of the embodiments of the present application have at least the following beneficial effects: the air conditioner and the cloud server are communicatively connected, the air conditioner adds a first serial number to a status data packet sent to the cloud server at a preset time interval, and the air conditioner increases the value of the first serial number each time it sends a status data packet, after receiving the status data packet, the cloud server generates a control instruction data packet carrying a control instruction, and adds a second serial number identical to the first serial number to the control instruction data packet, after receiving the control instruction data packet, the air conditioner parses the control instruction data packet to obtain the second serial number, and compares the second serial number with the local current first serial number, if the values ​​of the two serial numbers are the same, the control instruction data packet is considered valid, and the control instruction is executed. Control instructions in the data packet; since the air conditioner sends the status data packet at a preset time interval, the cloud server determines that the status data packet is a data packet that arrived in sequence by the size of the first sequence number after receiving the status data packet, and can immediately process and return the control instruction data packet, so that the air conditioner can obtain appropriate control instructions corresponding to the current status data, thereby improving the communication reliability between the air conditioner and the cloud server. If network fluctuations occur after the air conditioner sends the status data packet, causing the status data packets to arrive at the cloud server out of order, or causing the control instructions to arrive at the air conditioner with a delay exceeding the preset time interval, the status data packet or the control instruction data packet will not be processed, thereby avoiding control logic errors caused by network fluctuations.

[0028] Other features and advantages of the present application will be described in the following description, and partly become apparent from the description, or understood by practicing the present application. The purpose and other advantages of the present application can be realized and obtained by the structures specifically pointed out in the description, claims and drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0029] Figure 1 is a schematic diagram of a communication system for executing a communication method provided by an embodiment of the present application;

[0030] Figure 2 It is an overall flow chart of the communication method provided in the embodiment of the present application;

[0031] Figure 3 is a flowchart of the supplementary steps of the communication method provided in the embodiment of the present application;

[0032] Figure 4 is a flowchart of supplementary steps of a communication method provided by another embodiment of the present application;

[0033] Figure 5 is a flowchart of supplementary steps of a communication method provided by another embodiment of the present application;

[0034] Figure 6 is an overall flow chart of a communication method provided by another embodiment of the present application;

[0035] Figure 7 yes Figure 5 A flowchart of the specific method of step S700;

[0036] Figure 8 It is a schematic diagram of a communication device for executing a communication method provided by an embodiment of the present application. DETAILED DESCRIPTION

[0037] In order to make the purpose, technical solutions and advantages of the present application clearer, the present application is further described in detail below in conjunction with the accompanying drawings and examples. It should be understood that the specific embodiments described herein are only used to explain the present application and are not intended to limit the present application. In addition, the characteristics, operations or features described in the specification can be combined in any appropriate manner to form various implementation methods. At the same time, the steps or actions in the method description can also be replaced or adjusted in order in a manner that is obvious to those skilled in the art. Therefore, the various sequences in the specification and the accompanying drawings are only for the purpose of clearly describing a certain embodiment and are not meant to be a necessary sequence, unless otherwise specified that a certain sequence must be followed.

[0038] In the description of this application, "several" means one or more, "more" means more than two, "greater than", "less than", "exceed", etc. are understood to exclude the number itself, and "above", "below", "within", etc. are understood to include the number itself. If there is a description of "first" or "second", it is only used for the purpose of distinguishing technical features, and cannot be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features or implicitly indicating the order of the indicated technical features.

[0039] The serial numbers of the components in this document, such as "first", "second", etc., are only used to distinguish the objects described and do not have any order or technical meaning. The "connection" and "coupling" mentioned in this application, unless otherwise specified, include direct and indirect connections (couplings).

[0040] With the rapid development of networked home appliances, more and more air conditioners communicate with cloud servers through the Internet. Based on the big data and precise control of cloud servers, the air conditioners can be instructed to make the best operation mode for the current working environment. Generally speaking, the local air conditioner uploads the status data to the cloud server, and the cloud server calculates a set of control parameters based on the status data and sends them to the air conditioner, and the air conditioner operates according to the received control parameters.

[0041] Since the network is not always stable, network fluctuations may occur, which may cause the order of the status data received by the cloud server to be disordered, resulting in incorrect calculation results of the cloud server or inverted control logic of the air conditioner. For example, if the indoor temperature drops / rises, the frequency needs to be reduced / increased, but the frequency remains unchanged for a long time due to data delay, which may cause users to feel that the temperature is too cold to rise, or too hot to fall. Or if the indoor temperature drops / rises, and the frequency needs to be reduced / increased, the order of data frames may be disordered due to network reasons, which may cause incorrect calculation results on the cloud or inverted control logic of the air conditioner.

[0042] In order to solve the above problems, the embodiments of the present application provide a communication method, a communication device, an air conditioner and a cloud server. The air conditioner and the cloud server are communicatively connected. The air conditioner adds a first serial number to a status data packet sent to the cloud server at a preset time interval, and the air conditioner increases the value of the first serial number each time it sends a status data packet. After receiving the status data packet, the cloud server generates a control instruction data packet carrying a control instruction, and adds a second serial number that is the same as the first serial number to the control instruction data packet. After receiving the control instruction data packet, the air conditioner parses the second serial number to obtain the second serial number, and compares the second serial number with the local current first serial number. If the values ​​of the two serial numbers are the same, the control instruction data packet is considered valid, and the control instruction is executed. control instructions in the data packet; since the air conditioner sends the status data packet at a preset time interval, the cloud server determines that the status data packet is a data packet that arrived in sequence by the size of the first sequence number after receiving the status data packet, and can immediately process and return the control instruction data packet, so that the air conditioner can obtain appropriate control instructions corresponding to the current status data, thereby improving the communication reliability between the air conditioner and the cloud server. If network fluctuations occur after the air conditioner sends the status data packet, resulting in the status data packets arriving at the cloud server out of order, or causing the control instructions to arrive at the air conditioner with a delay exceeding the preset time interval, the status data packet or the control instruction data packet will not be processed, thereby avoiding control logic errors caused by network fluctuations.

[0043] The communication method, communication device, air conditioner and cloud server are described below with reference to the accompanying drawings:

[0044] Reference Figure 1 , Figure 1 It is a schematic diagram of a communication system for executing a communication method provided by an embodiment of the present application.

[0045] exist Figure 1 In the embodiment, the communication system includes but is not limited to the air conditioner 110 and the cloud server 120, wherein the air conditioner 110 and the cloud server 120 are communicatively connected.

[0046] It should be noted that the above-mentioned air conditioner 110 can be a window air conditioner, a split air conditioner, a central air conditioner, etc., the cloud server can be a public cloud, a private cloud or a hybrid cloud, and the air conditioner and the cloud server can be communicated and connected via Wi-Fi (Wireless Fidelity, mobile hotspot), Bluetooth, infrared, etc.

[0047] It is worth noting that the air conditioner 110 of this embodiment is provided with local control modes such as manual control mode and remote control mode, and is also provided with network control modes such as cloud control mode, etc. The embodiment of the present application can use the local control mode to control the operating parameters of the air conditioner 110, that is, the air conditioner 110 controls its own operating parameters; in addition, the embodiment of the present application can also use the network control mode to control the operating parameters of the air conditioner 110, for example, the cloud server 120 is used to control the operating parameters of the air conditioner 110.

[0048] It is understandable that the cloud server 120 in this embodiment can communicate with multiple air conditioners 110 at the same time to control the multiple air conditioners 110.

[0049] Based on the structure of the above communication system, various embodiments of the communication method of the present invention are proposed below.

[0050] Reference Figure 2 , Figure 2 The switching method of the terminal device is applied to, but not limited to, an air conditioner of a communication system, and the communication method includes, but is not limited to, steps S100 to S300.

[0051] Step S100, acquiring status data, where the status data represents operating status information and / or operating environment information of the air conditioner;

[0052] In some embodiments, the operating status information and / or operating environment information of the air conditioner is obtained, wherein the operating status information of the air conditioner includes the working mode of the air conditioner, the current operating frequency, the operating temperature, power information, etc., and the operating environment information includes the ambient temperature, ambient humidity, gas concentration, etc. This embodiment does not make specific restrictions.

[0053] Step S200, generating a status data packet carrying status data at a preset time interval, adding a first sequence number to the status data packet and sending the status data packet to a cloud server;

[0054] It should be noted that the first sequence number is a preset initial sequence number or is obtained by increasing the sequence number in the previous status data packet. For example, the first sequence number is a preset initial sequence number 1, initial sequence number 0, initial sequence number 5, etc.; or, when the sequence number in the previous status data packet is 3, the first sequence number is 4; when the sequence number in the previous status data packet is 4, the first sequence number is 5, and so on. That is, the sequence number increases by one each time the air conditioner sends a frame of status data packet.

[0055] In some embodiments, the air conditioner generates a status data packet carrying status data at a preset time interval so that the cloud server can send different processing instructions based on different status data, add a first sequence number to the status data packet and send the status data packet to the cloud server so that the cloud server can determine the status data packets sent at different times and avoid logical errors caused by network delays.

[0056] It should be noted that the status data packet may also include information such as air conditioner model information, IP address, network quality, etc. The preset time interval may be set according to user needs, for example, to ten seconds, thirty seconds, fifty seconds, etc.

[0057] Step S300, when a control instruction data packet returned by the cloud server is received and it is determined that the second serial number carried in the control instruction data packet is the same as the first serial number, the control instruction carried in the control instruction data packet is executed.

[0058] In some embodiments, when a control instruction data packet returned by a cloud server is received, the information in the control instruction data packet is serially identified to obtain a second serial number added by the cloud server. When it is determined that the second serial number carried in the control instruction data packet is the same as the first serial number, it indicates that the control instruction data packet is a control instruction corresponding to the first serial number. If the control instruction data packet is valid, the control instruction carried in the control instruction data packet is executed, thereby obtaining appropriate control instructions corresponding to the current status data, thereby improving the communication reliability between the air conditioner and the cloud server.

[0059] It should be noted that, in the process of verifying the first serial number and the second serial number, verification can be performed through CRC (Cyclic Redundancy Check) verification, Hash verification, etc., and this embodiment does not make specific limitations.

[0060] Reference Figure 3 , Figure 3It is a flowchart of the supplementary steps of the communication method provided in the embodiment of the present application, and the supplementary steps may include but are not limited to step S400.

[0061] Step S400: When a control instruction data packet returned by the cloud server is received and it is determined that the second sequence number carried in the control instruction data packet is different from the first sequence number, the control instruction data packet is discarded.

[0062] In some embodiments, when a control command data packet returned by a cloud server is received, the information in the control command data packet is serially identified to obtain a second serial number added by the cloud server. If it is determined that the second serial number carried in the control command data packet is different from the first serial number, it means that the control command data packet is not the control command corresponding to the first serial number, and the control command data packet needs to be discarded, thereby avoiding reversal of the control logic of the air conditioner and avoiding confusion in control commands.

[0063] Reference Figure 4 , Figure 4 It is a flowchart of the supplementary steps of the communication method provided in the embodiment of the present application, and the supplementary steps may include but are not limited to step S500.

[0064] It should be noted that step S500 occurs before the status data packet is generated.

[0065] Step S500, controlling the air conditioner to enter the cloud control mode and establishing a communication connection with the cloud server.

[0066] In some embodiments, before generating a status data packet, it is also necessary to control the air conditioner to enter a cloud control mode, establish a communication connection with a cloud server, and then receive a control instruction data packet returned by the cloud server.

[0067] It should be noted that the air conditioner in this embodiment also includes a manual control mode, a remote control mode, etc., wherein the manual control mode is to manually adjust and turn on and off the air conditioner; the remote control mode is to adjust the air conditioner through terminal devices such as mobile phones and remote controllers.

[0068] Reference Figure 5 , Figure 5 It is a flowchart of the supplementary steps of the communication method provided in the embodiment of the present application, and the supplementary steps may include but are not limited to step S600.

[0069] It should be noted that step S600 occurs after the control instruction data packet is received.

[0070] Step S600: When a preset number of control instruction data packets are discarded continuously, the cloud control mode is exited.

[0071] In some embodiments, after receiving a control instruction data packet, when it is determined that a preset number of control instruction data packets are discarded continuously, indicating that the current network condition is not good and the air conditioner may lose communication with the cloud server, the cloud control mode is automatically exited, thereby achieving an energy-saving effect.

[0072] It should be noted that the preset number can be selected according to the needs of the user, for example, continuously discarding three control instruction data packets to exit the cloud control mode; continuously discarding four control instruction data packets to exit the cloud control mode, etc. This embodiment does not make specific restrictions.

[0073] In some embodiments, the preset time interval is greater than a preset communication delay value, which represents the time difference between the air conditioner sending a status data packet and receiving a control instruction data packet corresponding to the status data packet, thereby avoiding data frame confusion caused by the air conditioner frequently receiving control instruction data packets.

[0074] It is understandable that when the cloud server controls the operation logic of the air conditioner, the air conditioner reports a status data packet including various status parameters and a first serial number to the cloud server at a preset time interval. After receiving the status data packet, the cloud server parses the status data packet, generates a second serial number that is the same as the first serial number, and sends a control instruction data packet including the second serial number and a control instruction to the air conditioner to achieve a real-time response to the status data packet sent by the air conditioner. After the air conditioner receives the control instruction data packet, it compares the first serial number with the second serial number. When the first serial number is consistent with the second serial number, the control instruction in the control instruction data packet is executed, and the first serial number is increased. The status data packet with the increased serial number is sent again based on the preset time interval to wait for the response of the cloud server. It is worth noting that the communication delay value from the first time the air conditioner sends the status data packet to the first time the control instruction data packet is received is less than the time interval for the air conditioner to send the status data packet, so as to ensure that the cloud server receives the status data packet in sequence and avoid the control logic confusion caused by the air conditioner frequently receiving the control instruction data packet.

[0075] Reference Figure 6 , Figure 6 is a flow chart of a communication method provided by another embodiment of the present application. Application but not limited to application Figure 1 In the cloud server, the communication method includes but is not limited to steps S700 to S900.

[0076] Step S700, receiving a status data packet sent by the air conditioner, and determining status data and a first sequence number carried in the status data packet, wherein the status data represents operating status information and / or operating environment information of the air conditioner;

[0077] In some embodiments, a status data packet sent by the air conditioner is received, the status data packet is parsed, and the status data and the first serial number carried by the status data packet are determined, thereby being able to determine the current operating status of the air conditioner and facilitating subsequent distribution of control instructions corresponding to the first serial number based on the status data.

[0078] It can be understood that the status data packet sent by the air conditioner also includes the air conditioner identification. The cloud server can communicate with multiple air conditioners at the same time, and receive status data packets sent by multiple air conditioners, and parse the multiple status data packets separately to determine the first serial number corresponding to each air conditioner, thereby realizing the control of multiple air conditioners and improving the control efficiency of the air conditioners without the need for manual control of the air conditioners one by one.

[0079] Step S800, when the first sequence number is a preset initial sequence number or increases compared to the sequence number in the previous state data packet, a control instruction is generated according to the state data, a control instruction data packet is generated according to the control instruction, and a second sequence number that is the same as the first sequence number is added to the control instruction data packet;

[0080] It can be understood that after receiving the status data packet, the cloud server determines that the status data packet is a data packet that arrived in sequence by the size of the first sequence number, and can immediately process and return the control instruction data packet, so that the air conditioner can obtain appropriate control instructions corresponding to the current status data, thereby improving the communication reliability between the air conditioner and the cloud server.

[0081] In some embodiments, when the first sequence number is a preset initial sequence number or increases compared to the sequence number in the previous status data packet, it means that the status data packet arrives in sequence, and a control instruction can be generated directly based on the status data to adjust the operating status of the air conditioner through the control instruction. A control instruction data packet is generated based on the control instruction, and a second sequence number that is the same as the first sequence number is added to the control instruction data packet, so that the air conditioner can obtain appropriate control instructions corresponding to the current status data, thereby improving the communication reliability between the air conditioner and the cloud server and avoiding instruction confusion and the like.

[0082] It should be noted that, when the cloud server receives the first sequence number for the first time, the first sequence number is a preset initial sequence number; if the cloud server continues to receive sequence numbers before receiving the first sequence number, it is necessary to judge the size of the currently received first sequence number and the sequence number in the previous status data packet, and only after determining that the currently received first sequence number has increased compared to the sequence number in the previous status data packet can a control instruction be generated, thereby avoiding control logic errors.

[0083] Step S900: sending a control instruction data packet to the air conditioner.

[0084] In some embodiments, a control instruction data packet is sent to the air conditioner so that the air conditioner parses the control instruction data packet, obtains a second serial number, compares the first serial number with the second serial number, and then determines whether to execute the control instruction, thereby avoiding control logic errors caused by network fluctuations.

[0085] Reference Figure 7 , Figure 7 yes Figure 5 The flowchart of the specific method of step S700, the step S700 may include but is not limited to steps S710 to S720.

[0086] Step S710, adding the status data packet to a queue to be processed;

[0087] Step S720: In the queue to be processed, when there is no other status data packet to be processed before the status data packet, increase the processing priority of the status data packet.

[0088] In some embodiments, the cloud server creates a queue to be processed, wherein the queue to be processed is used to arrange status data packets sent by multiple air conditioners. In the process of receiving status data packets sent by the air conditioner, the status data packets are first added to the queue to be processed, and then the status of the queue to be processed is determined. In the queue to be processed, when there are no other status data packets to be processed before the status data packet, it means that the current status data packet can be processed first, the processing priority of the status data packet can be increased, and the priority of the current status data packet can be increased, so that the status data packet sent by the air conditioner can be responded to in time, thereby improving the response efficiency.

[0089] It should be noted that when there are other status data packets to be processed before the status data packet, they need to be sorted in the queue to be processed in the order in which the status data packets are received, so as to avoid instruction sending errors.

[0090] Based on the communication methods of the above-mentioned embodiments, the communication method of the present application is described in detail below through an example.

[0091] Example 1:

[0092] This example refers to Figure 1 As shown in the architecture, the communication system includes but is not limited to an air conditioner 110 and a cloud server 120 , wherein the air conditioner 110 and the cloud server 120 are communicatively connected with each other.

[0093] Step 1: Enter the cloud control mode. The air conditioner sends a status data packet to the cloud server every 30 seconds, and adds a frame number to each status data packet sent. The frame number increases by one for each frame sent.

[0094] Step 2: After receiving the status data packet, the cloud server determines the size of the frame number in the status data packet and the frame number of the previous frame. If it is greater than the frame number of the previous frame, the data is considered valid; if it is less than or equal to the frame number of the previous frame, it is considered invalid;

[0095] Step 3: When the frame number in the current state data packet is greater than the frame number of the previous frame, the cloud server generates a control instruction corresponding to the state data packet, and generates a control instruction frame number that is the same as the frame number, thereby obtaining a control instruction data packet;

[0096] Step 4: After the air conditioner receives the control instruction data packet, it determines whether the control instruction frame number is consistent with the frame number in the status data packet. If they are consistent, the control instruction is considered valid; if they are inconsistent, the control instruction is considered invalid;

[0097] Step 5: The air conditioner discards the control data packets sent by the cloud server for three consecutive frames and exits the cloud control mode.

[0098] In some embodiments, the air conditioner adds a frame sequence number to each status data packet sent, and the air conditioner sends the status data packet at a preset time interval. After receiving the status data packet, the cloud server determines that the status data packet is a data packet that arrived in sequence by the size of the frame sequence number, and can immediately process and return the control instruction data packet. After receiving the status data packet, the cloud server adds the control instruction frame number corresponding to the frame sequence number to the control instruction, so that the air conditioner can obtain appropriate control instructions corresponding to the current status data, thereby improving the communication reliability between the air conditioner and the cloud server.

[0099] like Figure 8 As shown, Figure 8 It is a schematic diagram of a communication device provided by an embodiment of the present application.

[0100] An embodiment of the present application also provides a communication device 1000, comprising at least one processor 1001 and a memory 1002 for communicating with the at least one processor; the memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the communication method as described in the above embodiment.

[0101] Figure 8 In the figure, a processor 1001 and a memory 1002 are taken as an example.

[0102] The processor 1001 and the memory 1002 may be connected via a bus or other means. Figure 8 The example of connecting through bus is taken in the following.

[0103] The memory 1002, as a non-transitory computer-readable storage medium, can be used to store non-transitory software programs and non-transitory computer executable programs. In addition, the memory 1002 may include a high-speed random access memory, and may also include a non-transitory memory, such as at least one disk storage device, a flash memory device, or other non-transitory solid-state storage device. In some embodiments, the memory 1002 may optionally include a memory 1002 remotely arranged relative to the processor 1001, and these remote memories may be connected to the controller 1000 via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0104] Those skilled in the art will understand that Figure 8 The device structure shown in the figure does not constitute a limitation on the communication device 1000, and may include more or less components than shown in the figure, or combine certain components, or arrange the components differently.

[0105] The memory, as a non-transient computer-readable storage medium, can be used to store non-transient software programs and non-transient computer executable programs. In addition, the memory may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some embodiments, the memory may optionally include a memory remotely disposed relative to the processor, and these remote memories may be connected to the processor via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0106] It will be appreciated by those skilled in the art that all or some of the steps and systems in the disclosed method above may be implemented as software, firmware, hardware and appropriate combinations thereof. Some physical components or all physical components may be implemented as software executed by a processor, such as a central processing unit, a digital signal processor or a microprocessor, or may be implemented as hardware, or may be implemented as an integrated circuit, such as an application specific integrated circuit. Such software may be distributed on a computer-readable medium, which may include a computer storage medium (or a non-transitory medium) and a communication medium (or a temporary medium). As known to those skilled in the art, the term computer storage medium includes volatile and non-volatile, removable and non-removable media implemented in any method or technology for storing information (such as computer-readable instructions, data structures, program modules or other data). Computer storage media include, but are not limited to, RAM, ROM, EEPROM, flash memory or other memory technologies, CD-ROM, digital versatile disks (DVD) or other optical disk storage, magnetic cassettes, magnetic tapes, disk storage or other magnetic storage devices, or any other medium that may be used to store desired information and may be accessed by a computer. Furthermore, it is well known to those skilled in the art that communication media typically embodies computer readable instructions, data structures, program modules, or other data in a modulated data signal such as a carrier wave or other transport mechanism, and may include any information delivery media.

[0107] The above is a specific description of the preferred implementation of the present application, but the present application is not limited to the above-mentioned implementation mode. Technical personnel familiar with the field can also make various equivalent deformations or substitutions without violating the spirit of the present application. These equivalent deformations or substitutions are all included in the scope defined by the claims of the present application.

Claims

1. A communication method, applied to an air conditioner, wherein the air conditioner is connected to a cloud server through a network, characterized in that: The method comprises: Acquiring status data, wherein the status data represents operating status information and / or operating environment information of the air conditioner; Generate a status data packet carrying the status data at a preset time interval, add a first sequence number to the status data packet and send the status data packet to the cloud server, where the first sequence number is a preset initial sequence number or is obtained by increasing the sequence number in the previous status data packet; When a control instruction data packet returned by the cloud server is received and it is determined that the second sequence number carried in the control instruction data packet is the same as the first sequence number, the control instruction carried in the control instruction data packet is executed.

2. The communication method according to claim 1, characterized in that: The method further comprises: When a control instruction data packet returned by the cloud server is received and it is determined that the second sequence number carried in the control instruction data packet is different from the first sequence number, the control instruction data packet is discarded.

3. The communication method according to claim 2, characterized in that: Before generating the status data packet, the method further includes: Controlling the air conditioner to enter a cloud control mode and establishing a communication connection with the cloud server; After receiving the control instruction data packet, the method further includes: When a preset number of control instruction data packets are discarded continuously, the cloud control mode is exited.

4. The communication method according to claim 1, characterized in that: The preset time interval is greater than a preset communication delay value, and the preset communication delay value represents the time difference between the air conditioner sending the status data packet and receiving the control instruction data packet corresponding to the status data packet.

5. A communication method, applied to a cloud server, wherein the cloud server is connected to the air conditioner through a network, characterized in that: The method comprises: receiving a status data packet sent by the air conditioner, and determining status data and a first sequence number carried by the status data packet, wherein the status data represents operating status information and / or operating environment information of the air conditioner; When the first sequence number is a preset initial sequence number or increases compared to the sequence number in the previous status data packet, a control instruction is generated according to the status data, a control instruction data packet is generated according to the control instruction, and a second sequence number identical to the first sequence number is added to the control instruction data packet; The control instruction data packet is sent to the air conditioner.

6. The communication method according to claim 5, characterized in that: The receiving of the status data packet sent by the air conditioner comprises: Adding the status data packet to a queue to be processed; In the queue to be processed, when there is no other status data packet to be processed before the status data packet, the processing priority of the status data packet is increased.

7. A communication device, characterized in that It comprises at least one processor and a memory for communicating with the at least one processor; the memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the communication method as described in any one of claims 1 to 4.

8. A communication device, characterized in that It comprises at least one processor and a memory for communicating with the at least one processor; the memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the communication method as described in any one of claims 5 to 6.

9. An air conditioner, characterized in that Comprising the communication device as claimed in claim 7.

10. The cloud server is characterized by: Comprising the communication device as claimed in claim 8.