Method and system for processing jump of reported data of air conditioning equipment
By recording the time difference of data reported by air-conditioning equipment and using local warehouse cloning for processing, the temperature jump problem on the App side caused by the delay in data reporting by air-conditioning equipment is solved, and the stability of data display and user experience are improved.
Patent Information
- Application Number
- CN202410708530.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-03
- Publication Date
- 2024-08-30
AI Technical Summary
The delay in data reporting by air conditioning equipment causes the temperature displayed on the App to jump, affecting the user experience.
By recording the time point when instructions are issued on the App side and the time point when data is reported, the local warehouse cloning method is used to compare the time difference. If the difference is greater than the preset time, the data will be updated immediately. If it is less than the preset time, the data will be updated using a timer to ensure the accuracy of the data. Authenticity and validity.
It reduces the probability of data jumps on the App side, ensures the authenticity and stability of displayed data, and avoids the impact of data accumulation and running speed caused by frequent updates.
Smart Images

Figure CN118568110A
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of equipment data processing, in particular to a method and system for processing data jump reported by air-conditioning equipment. Background Art
[0002] With the development of science and technology, people have put forward higher requirements for the experience of home appliances, and smart home appliances have become a hot word in today's era. App control is one of the signs of intelligence. When the temperature of air-conditioning products is controlled by remote control, it is necessary to adjust step by step to reach the target temperature. Through App control, the desired temperature can be set directly, which greatly improves the user experience.
[0003] However, quick control also has its disadvantages. In the case of frequent control, the temperature displayed on the App may jump due to delays in data reported by the device. Summary of the invention
[0004] In order to solve the above technical problems, the purpose of the present invention is to provide a method for processing data jumps reported by air-conditioning equipment, which can reduce the probability of data jumps displayed by the App and ensure the authenticity and validity of the displayed data by recording the time point when the App command is issued, the time point when the data is reported, and the local warehouse clone, through a series of processing.
[0005] The present invention solves the above problems through the following technical solutions:
[0006] A method for processing data jump reported by an air conditioner, which is used to enable the App to normally display the current device status when there is a delay in reporting data from the air conditioner to the App, resulting in a jump; comprising:
[0007] Step S100: When the App sends a command, the time point T1 at which the command is sent is recorded;
[0008] Step S200: When the App receives the reported data of the air-conditioning device status, the data reporting time point T2 is recorded or updated, and the time when the App receives the reported data closest to the current time point is used as the data reporting time point T2;
[0009] When the App receives the reported data, the local warehouse clone K2 will update the reported data and calculate the difference Y between the data reporting time point T2 and the instruction issuing time point T1;
[0010] Step S300, comparing the difference value Y;
[0011] When the difference Y is greater than or equal to the first preset time t3, the local warehouse K1 immediately updates the reported data;
[0012] When the difference Y is less than the first preset time t3, the local warehouse K1 does not immediately update the reported data; and sets a timer Z1, the content of the timer Z1 is: after the second preset time t4, the reported data stored in the clone K2 of the local warehouse in step S200 is updated to the local warehouse K1;
[0013] Step S400: Based on the reported data of the local warehouse K1, the App displays relevant data.
[0014] As a further improvement of the present invention, in step S100, if a new instruction is issued after the App side issues the instruction, the instruction issuing time point T1 is updated, and the instruction issuing time of the App side closest to the current time point is used as the instruction issuing time point T1.
[0015] As a further improvement of the present invention, the second preset time t4 of the timer can be adjusted according to the delay size of the reported data, and t4>t3.
[0016] As a further improvement of the present invention, the step S300 further includes:
[0017] If there is new reported data within the second preset time t4, the timer Z1 is cleared and reset until there is no new reported data within the second preset time t4;
[0018] If there is no new reported data within the second preset time t4, the reported data stored in the clone K2 of the local warehouse is updated to the local warehouse K1 according to the content of the timer Z1, and the reported data in the clone K2 of the local warehouse overwrites the data in the local warehouse K1.
[0019] As a further improvement of the present invention, the values of the instruction sending time point T1 and the data reporting time point T2 are timestamps in JavaScript, the initial value of T1 is 0, and at least one air conditioning device status data is reported.
[0020] The present invention also solves the above-mentioned problem through the following technical solutions:
[0021] A system for processing data jumps reported by air-conditioning equipment, characterized in that the processing of data jumps reported by air-conditioning equipment is implemented by the system for processing data jumps reported by air-conditioning equipment, so as to implement the method for processing data jumps reported by air-conditioning equipment as described above by the system for processing data jumps reported by air-conditioning equipment.
[0022] As a further improvement of the present invention, data reporting of the air conditioning device status is implemented through an air conditioning device status data reporting system;
[0023] The air conditioning equipment status data reporting system comprises:
[0024] Air conditioning equipment, MQTT server, cloud and APP, wherein the air conditioning equipment is connected to the cloud through the MQTT server, and the cloud is connected to the APP with a UI interface;
[0025] When the status of the air-conditioning equipment changes, the status data is reported to the MQTT server, and the cloud obtains data synchronously from the MQTT server through message subscription; after preliminary data processing, the cloud uploads the status data through the cloud data parsing microservice and stores it in the cloud database. The APP obtains the status data stored in the database through the cloud interface, and reports the status data of the air-conditioning equipment to the APP.
[0026] In addition, the present invention also solves the above-mentioned problem through the following technical solutions:
[0027] A computer-readable storage medium stores instructions, wherein the instructions, when executed by a processor, implement a method for processing data jumps reported by an air-conditioning device as described above.
[0028] Compared with the prior art, the present invention has the following advantages and beneficial effects:
[0029] The present invention can report data from the air-conditioning equipment end to the App end with delay and cause jump, so that the App end can normally display the current equipment status; provide a concept of local warehouse cloning, each reported data will be updated and stored in the clone K2 of the local warehouse, and the clone K2 of the local warehouse is used for transfer to prevent frequent updates in a short time from updating the reported data of the local warehouse, thereby preventing the App end from jumping too fast and unable to display normally, and the frequent updates of the local warehouse cause data accumulation, affecting the running rate of the App end. BRIEF DESCRIPTION OF THE DRAWINGS
[0030] Figure 1 A flow chart of a method for processing a jump in reported data of an air-conditioning device according to the present invention;
[0031] Figure 2 A schematic diagram of an air conditioning equipment status data reporting system of the present invention;
[0032] Figure 3 The present invention is a schematic diagram of a system for processing data jump reported by air-conditioning equipment. DETAILED DESCRIPTION
[0033] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0034] Example
[0035] Combined with Figure 1 As shown, a method for processing the jump of data reported by air conditioners, when there is a delay and jump when the data is reported from the air conditioner end to the App end, this method enables the App end to display the current device status normally. The specific steps include:
[0036] Step S100: When the App sends a command, the time point T1 at which the command is sent is recorded;
[0037] If a new instruction is issued after the App sends the instruction, the instruction issuance time point T1 is updated, and the instruction issuance time of the App that is closest to the current time point is used as the instruction issuance time point T1;
[0038] Step S200, reporting of air-conditioning equipment status data. When the App receives the reported data, the data reporting time point T2 is recorded or updated, and the time when the App receives the reported data closest to the current time point is used as the data reporting time point T2;
[0039] When the App receives the reported data, the local warehouse clone K2 will update the reported data and calculate the difference Y between the data reporting time point T2 and the latest instruction issuance time point T1;
[0040] This method proposes a concept of local warehouse cloning, and each reported data will be updated and stored in the clone K2 of the local warehouse.
[0041] Step S300, comparing the difference value Y;
[0042] In this embodiment, the first preset time t3 is 3S, and the second preset time t4 is 5S;
[0043] When the difference Y is greater than or equal to the first preset time t3, that is, Y ≥ 3S, the local warehouse K1 immediately updates the reported data;
[0044] Step S400: Based on the reported data of the local warehouse K1, the App displays relevant data.
[0045] Furthermore, step S300 further includes:
[0046] When the difference Y is less than the first preset time t3, that is, Y<3S, the local warehouse K1 does not immediately update the reported data; and sets a timer Z1, the content of which is: after the second preset time t4, the reported data stored in the clone K2 of the local warehouse in step S200 is updated to the local warehouse K1;
[0047] Preferably, the second preset time t4 of the timer can be adjusted according to the delay of the reported data so that t2>t3;
[0048] Furthermore, in step S300,
[0049] If there is new reported data within the second preset time t4, the timer Z1 is cleared and reset until there is no new reported data within the second preset time t4;
[0050] If there is no new reported data within the second preset time t4, the reported data stored in the clone K2 of the local warehouse is updated to the local warehouse K1 according to the content of the timer Z1, and the reported data in the clone K2 of the local warehouse overwrites the data in the local warehouse K1.
[0051] In this embodiment, the values of the instruction sending time point T1 and the data reporting time point T2 are timestamps in JavaScript, and the initial value of T1 is 0. The above process can only be performed if the air conditioning equipment reports data at least once.
[0052] Optionally, a method for processing a jump in reported data of an air-conditioning device of the present invention reports and displays the status data of the air-conditioning device, which is realized by a reporting system for status data of the air-conditioning device; processing a jump in reported data of the air-conditioning device is realized by processing a jump in reported data of the air-conditioning device;
[0053] Refer to the attached Figure 2 , the air conditioning equipment status data reporting system includes:
[0054] Air conditioning equipment, MQTT server, cloud and APP, wherein the air conditioning equipment is connected to the cloud through the MQTT server, and the cloud is connected to the APP with a UI interface;
[0055] Among them, when the status of the air-conditioning equipment changes, the status data is reported to the MQTT server, and the cloud obtains data synchronously from the MQTT server through message subscription; after preliminary data processing, the cloud uploads the status data through the cloud data parsing microservice and stores it in the cloud database. The APP obtains the status data stored in the database through the cloud interface and displays the status data through the UI interface of the APP.
[0056] Refer to the attached Figure 3, the system for processing the data jump reported by the air conditioning equipment includes:
[0057] APP, local warehouse K1 and local warehouse clone K2;
[0058] Among them, the APP end is connected to the local warehouse K1 and the clone K2 of the local warehouse respectively, for issuing instructions and recording the instruction issuing time point T1; optionally, if a new instruction is issued after the App end issues an instruction, the instruction issuing time point T1 is updated, and the instruction issuing time of the APP end closest to the current time point is used as the instruction issuing time point T1;
[0059] And receive the data reported by the air conditioning equipment status data reporting system, record or update the data reporting time point T2, and use the time when the App end closest to the current time point receives the reported data as the data reporting time point T2;
[0060] Finally, update the report data to the local repository clone K2;
[0061] The clone K2 of the local warehouse is used to update the reported data according to the updated reported data on the APP side;
[0062] The APP is also used to calculate the difference Y between the data reporting time point T2 and the latest instruction issuing time point T1, and compare the difference Y;
[0063] If the difference Y is greater than or equal to the first preset time t3, that is, Y ≥ 3S, the local warehouse K1 immediately updates the reported data from the clone K2 of the local warehouse, and the APP displays it according to the reported data of the local warehouse K1;
[0064] If the difference Y is less than the first preset time t3, that is, Y<3S, the local warehouse K1 does not immediately update the reported data; the APP sets a timer Z1, and the content of the timer Z1 is: after the second preset time t4, the reported data stored in the clone K2 of the local warehouse is updated to the local warehouse K1; after the second preset time t4, the APP displays according to the reported data of the local warehouse K1;
[0065] Further, if there is new reported data within the second preset time t4, the timer Z1 is cleared and the timer Z1 is reset until there is no new reported data within the second preset time t4;
[0066] If there is no new reported data within the second preset time t4, the reported data stored in the clone K2 of the local warehouse is updated to the local warehouse K1 according to the content of the timer Z1, and the reported data in the clone K2 of the local warehouse overwrites the data in the local warehouse K1.
[0067] Preferably, the second preset time t4 of the timer can be adjusted according to the delay size of the reported data so that t2>t1.
[0068] The present invention also provides a computer-readable storage medium, on which instructions are stored. When the instructions are executed by a processor, the method for processing the jump of reported data of an air-conditioning device as described above is implemented.
[0069] The present invention can report data from the air-conditioning equipment end to the App end with delay and cause jump, so that the App end can normally display the current equipment status; provide a concept of local warehouse cloning, each reported data will be updated and stored in the clone K2 of the local warehouse, and the clone K2 of the local warehouse is used for transfer to prevent frequent updates in a short time from updating the reported data of the local warehouse, thereby preventing the App end from jumping too fast and unable to display normally, and the frequent updates of the local warehouse cause data accumulation, affecting the running rate of the App end.
[0070] Although the present invention is described herein with reference to the illustrative embodiments of the present invention, the above embodiments are only preferred embodiments of the present invention, and the embodiments of the present invention are not limited to the above embodiments. It should be understood that those skilled in the art can design many other modifications and embodiments, which will fall within the scope and spirit of the principles disclosed in this application.
Claims
1. A method for processing the jump of reported data of air conditioning equipment, It is characterized in that When there is a delay in reporting data from the air conditioner to the App, which causes a jump, the App can display the current device status normally. include: Step S100: When the App sends a command, record the time point T at which the command is sent. 1 ; Step S200: When the App receives the reported data of the air conditioner status, it records or updates the data reporting time point T. 2 The data reporting time point T is the time when the App end closest to the current time point receives the reported data. 2 ; When the App receives the reported data, the local warehouse clone K 2 The reported data will be updated and the data reporting time point T will be calculated. 2 The time point T when the command is issued 1 The difference Y; Step S300, comparing the difference value Y; When the difference Y is greater than or equal to the first preset time t 3 When the local warehouse K 1 Update the reported data immediately; When the difference Y is less than the first preset time t 3 When the local warehouse K 1 Do not update the reported data immediately; and set a timer Z1, the content of the timer Z1 is: the second preset time t 4 Then, the clone K of the local warehouse in step S200 is 2 The reported data stored in is updated to the local warehouse K 1 middle; Step S400: According to the local warehouse K 1 The App displays the reported data.
2. According to claim 1, a method for processing the jump of reported data of air conditioning equipment, It is characterized in that In step S100, if a new instruction is issued after the App sends the instruction, the instruction sending time point T is updated. 1 , the APP-side command issuance time closest to the current time point is used as the command issuance time point T 1 .
3. According to the method for processing the data jump reported by the air conditioner according to claim 1, It is characterized in that The second preset time t of the timer 3 It can be adjusted according to the delay of the reported data, and t 2 >t 1 .
4. According to the method for processing the jump of the reported data of the air conditioner according to claim 1, It is characterized in that The step S300 further includes: If at the second preset time t 4 If there is new reported data within the second preset time t, the timer Z1 is cleared and reset until the timer Z1 is reset within the second preset time t 4 There is no new reported data; If at the second preset time t 4 If there is no new reported data within 10 seconds, the clone K of the local warehouse will be 2 The reported data stored in is updated to the local warehouse K 1 In the example, the local repository is cloned K 2 The reported data in the local warehouse K 1 The data in.
5. According to claim 1, a method for processing the jump of reported data of air conditioning equipment, It is characterized in that The instruction is issued at time T 1 and the data reporting time point T 2 The value is the timestamp in JavaScript, T 1 The initial value is 0, and at least one air conditioning device status data is reported.
6. A system for processing data jumps reported by air conditioning equipment, It is characterized in that The processing of the data jump reported by the air-conditioning device is implemented by a system for processing the data jump reported by the air-conditioning device, so as to implement a method for processing the data jump reported by the air-conditioning device as described in any one of claims 1 to 5.
7. A system for processing data jump reported by air conditioner equipment according to claim 6, It is characterized in that Reporting the status of the air conditioning equipment through an air conditioning equipment status data reporting system; The air conditioning equipment status data reporting system comprises: Air conditioning equipment, MQTT server, cloud and APP, wherein the air conditioning equipment is connected to the cloud through the MQTT server, and the cloud is connected to the APP with a UI interface; When the status of the air-conditioning equipment changes, the status data is reported to the MQTT server, and the cloud obtains data synchronously from the MQTT server through message subscription; after preliminary data processing, the cloud uploads the status data through the cloud data parsing microservice and stores it in the cloud database. The APP obtains the status data stored in the database through the cloud interface, and reports the status data of the air-conditioning equipment to the APP.
