Data processing method and device, control end and storage medium

By using a cache queue and time detection method in smart home control, the problem of chaotic data display in complex network environments is solved, and orderly data transmission and stable user interface display are achieved.

CN114740738BActive Publication Date: 2025-10-24AI GEN SI TONG KE JI YOU XIAN GONG SI
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202110018683.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-01-07
Publication Date
2025-10-24
Estimated Expiration
2041-01-07

AI Technical Summary

Technical Problem

In smart home control, existing technologies cannot accurately identify the order of data transmission and reception in complex network environments, leading to chaotic data display and affecting user experience.

Method used

By acquiring control commands, updating the cache queue to count the cache time of the target parameters, and sending control commands when the preset time threshold is reached, the data sending order is determined by using the cache queue and time detection method, without relying on timestamps or sequence numbers.

Benefits of technology

It enables orderly data transmission in any complex scenario, avoiding screen display jitter and user operation confusion, thus improving the user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114740738B_ABST
    Figure CN114740738B_ABST
Patent Text Reader

Abstract

Embodiments of the present application provide a data processing method and device, a control terminal and a storage medium, and relate to the technical field of data echo. The method comprises the following steps: obtaining a control instruction, the control instruction comprising a target operation type and a target parameter corresponding to the target operation type; updating a cache queue according to the target operation type to count the cache time of the target parameter; detecting the cache time of the target parameter in real time; and sending the control instruction to a target device when the cache time of the target parameter reaches a preset time threshold, so that the target device responds to the control instruction and feeds back response data. Since the cache queue and the cache time are used to determine whether to send the control instruction, the control instruction can be sent in order without relying on a time stamp or a serial number, and can be applied in any complex scenario, thus having a wide application range.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of data echoing, and in particular to a data processing method and device, a control terminal and a storage medium. BACKGROUND

[0002] In the smart home industry, a control terminal (such as a mobile phone application (APP) or a scene panel) is usually used to control and display the status of a smart home device. However, when a user operates the smart home device through an operation interface, the operation interface usually displays the status that the user expects the smart home device to be in immediately. If the control fails, the status of the smart home device before the user's operation needs to be echoed to avoid the problem of incorrect status display.

[0003] The present application relates to the technical field of data echoing, and in particular to a data processing method and device, a control terminal and a storage medium. SUMMARY

[0004] Therefore, the present application aims to provide a data processing method and device, a control terminal and a storage medium to solve the above problems.

[0005] To achieve the above-mentioned purpose, the technical solutions adopted by the embodiments of the present application are as follows:

[0006] In a first aspect, the embodiments of the present application provide a data processing method applied to a control terminal, which comprises the following steps:

[0007] obtaining a control instruction, wherein the control instruction comprises a target operation type and a target parameter corresponding to the target operation type;

[0008] updating a cache queue according to the target operation type to count the cache time of the target parameter;

[0009] real-time detecting the cache time of the target parameter;

[0010] if the cache time of the target parameter reaches a preset time threshold, sending the control instruction to a target device to make the target device respond to the control instruction and feed back response data.

[0011] In a second aspect, the present application provides a data processing device applied to a control terminal, which comprises:

[0012] An instruction obtaining module is configured to obtain a control instruction, wherein the control instruction comprises a target operation type and a target parameter corresponding to the target operation type;

[0013] A queue updating module is configured to update a cache queue according to the target operation type, so as to count a cache time of the target parameter;

[0014] A time checking module is configured to detect the cache time of the target parameter in real time;

[0015] A transceiving module is configured to send the control instruction to a target device, so that the target device responds to the control instruction and feeds back response data, if the cache time of the target parameter reaches a preset time threshold.

[0016] In a third aspect, the present application provides a control terminal, comprising a processor and a memory, wherein the memory stores a computer program capable of being executed by the processor, and the processor can execute the computer program to implement the data processing method in any of the above embodiments.

[0017] In a fourth aspect, the present application provides a storage medium, which stores a computer program, and the computer program is executed by a processor to implement the data processing method in any of the above embodiments.

[0018] The data processing method, device, control terminal and storage medium provided by the embodiments of the present application can obtain a control instruction, the control instruction comprises a target operation type and a target parameter corresponding to the target operation type, update a cache queue according to the target operation type, count a cache time of the target parameter, detect the cache time of the target parameter in real time, and send the control instruction to a target device, so that the target device responds to the control instruction and feeds back response data, if the cache time of the target parameter reaches a preset time threshold. Since the cache queue and the cache time are used to determine whether to send the control instruction, the control instruction can be sent in order without relying on a time stamp or a serial number, and can be applied in any complex scenario, so the application range is wide.

[0019] In order to make the above objectives, characteristics and advantages of the present application more apparent, the following will describe preferred embodiments in detail, and the accompanying drawings will be referred to, and the following will be described in detail. BRIEF DESCRIPTION OF DRAWINGS

[0020] In order to make the above objectives, characteristics and advantages of the present application more apparent, the following will describe preferred embodiments in detail, and the accompanying drawings will be referred to, and the following will be described in detail.

[0021] Figure 1 An application environment diagram provided by an embodiment of the present application is shown.

[0022] Figure 2 Another application environment diagram provided by an embodiment of the present application is shown.

[0023] Figure 3 Still another application environment diagram provided by an embodiment of the present application is shown.

[0024] Figure 4 A flow chart of a data processing method provided by an embodiment of the present application is shown.

[0025] Figure 5 A flow chart of a data processing method provided by an embodiment of the present application is shown. Figure 4 A specific flow chart of S402 in the embodiment is shown.

[0026] Figure 6 A flow chart of a data processing method provided by another embodiment of the present application is shown.

[0027] Figure 7 A flow chart of a data processing method provided by another embodiment of the present application is shown. Figure 6 A specific flow chart of S408 in the embodiment is shown.

[0028] Figure 8 A flow chart of a data processing method provided by another embodiment of the present application is shown.

[0029] Figure 9 A functional module diagram of a data processing device provided by an embodiment of the present application is shown.

[0030] Figure 10 A functional module diagram of a data processing device provided by another embodiment of the present application is shown.

[0031] Figure 11 A functional module diagram of a data processing device provided by another embodiment of the present application is shown.

[0032] Figure 12 A hardware structure block diagram of a control terminal provided by an embodiment of the present application is shown.

[0033] Figure legend: 10-processor; 20-signal input / output module; 30-target device; 100-control terminal; 120-storage medium; 121-operating system; 122-data; 123-application program; 130-memory; 140-input / output interface; 150-wired or wireless network interface; 160-power supply; 200-data processing device; 210-instruction acquisition module; 220-queue updating module; 230-time checking module; 240-transceiving module; 250-judgment module; 260-display module; 270-prompt information generation module; 280-statistics module. DETAILED DESCRIPTION

[0034] The following will be combined with the accompanying drawings to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Generally, the components of the embodiments of the present invention described and shown in the drawings herein can be arranged and designed in various different configurations.

[0035] Therefore, the following detailed description of the embodiments of the present invention provided in the accompanying drawings is not intended to limit the scope of the invention as claimed, but is merely intended to represent selected embodiments of the present invention. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without creative work are within the scope of protection of the present invention.

[0036] It should be noted that relational terms such as "first" and "second" are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the terms "comprises," "comprising," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such process, method, article, or apparatus. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of additional identical elements in the process, method, article, or apparatus comprising the element.

[0037] In the prior art, users can usually interact with the operating interface of the control end (which can be the operating interface of an APP or a scene panel) to generate control instructions, thereby using the operating interface to control and display the status of the target device. During use, as long as the user performs relevant control operations on the target device on the operating interface, the operating interface will usually immediately display the state of the target device that the user expects. At this time, if the target device cannot be adjusted to the user's desired state in time, the operating interface needs to redisplay the content displayed before the user performed the control operation. In this application, this process can be understood as data echo.

[0038] For example, the target device is a smart light device. A user wants to adjust the brightness value of the smart light device from an original brightness value X to a target brightness value Y, and needs to adjust the operation of the smart light device on the operation interface. When the user performs the operation of adjusting the brightness of the smart light device to the target brightness value Y, the operation interface immediately presents the brightness value of the target device as the value Y. If the smart light device cannot adjust its brightness to the target brightness value Y for some reason, the value of the brightness value parameter on the operation interface will change from the target brightness value Y to the original brightness value X.

[0039] The inventors found in research that, in the process of controlling the target device by the user, in order to avoid display confusion, when the user issues multiple operation instructions, the control end usually uses the time stamp or sequence number in the data to identify the order of sending / receiving of the data, thereby echoing the data. However, in actual application, the application environment of the control end is complex and variable, and with the difference of the application environment of the control end, the time stamp and the sequence number cannot be used to identify the order in any application environment, so the sending / receiving order of the data cannot be accurately identified, and the echoed data is confused.

[0040] For example, in the application environment as shown in Figure 1 The control end and the smart light device are in completely different networks, wherein the gateway 1 to which the control end belongs and the gateway 2 to which the smart light device belongs use ZigBee protocol for network communication, and the gateway 1 and the gateway 2 use wifi or Ethernet for network communication with the cloud server IOT, the communication protocols and rates of the two networks are different, the time bases adopted are different, the control end cannot accurately determine the order of each data according to the time stamp, and different nodes do not have a unified sequence number, so the sequence number cannot be used to determine the order of sending / receiving data. In addition, the inventors found that when the user frequently operates, the operation interface displays the target data indicated by the user and the response data fed back by the target device, or due to the error between the response data fed back by the target device and the control data, the screen display is chaotic, which is not conducive to the user to operate.

[0041] Therefore, the inventors put forward the data processing method of the present application, which acquires a control instruction, updates a cache queue according to a target operation type, to count the cache time of a target parameter, then detects the cache time of the target parameter in real time, and when the cache time of the target parameter reaches a preset time threshold, sends a control instruction to the target device, so that the target device responds to the control instruction and feeds back response data. Since the cache queue and the method of detecting the cache time of the target parameter are used to determine whether to send the control instruction, it does not need to rely on the time stamp or the sequence number, and can be applied in any complex scenario, with a wide application range.

[0042] In order to facilitate the detailed description of the application, the application environment of the embodiments of the present application will be introduced first in combination with the accompanying drawings.

[0043] Please refer to Figure 2 , the application environment of the data processing method provided by the embodiments of the present application, the application environment includes signal input / output module 20, processor 10 and target device 30. The processor 10 is electrically connected with the signal input / output module 20 and the light emitting device. The user can generate a control instruction through the signal input / output module 20, and transmit the control instruction to the processor 10. The signal input / output module 20 can be but not limited to touch screen and the like. The processor 10 can adjust the state of the target device 30 according to the control instruction. The target device 30 can be a smart home device, such as a smart lighting device, a smart air conditioner, a smart air purifier, etc.

[0044] In an optional embodiment, please refer to Figure 3 , the signal input / output module 20 and the processor 10 can be integrated into a control end 100. Among them, the control end 100 is in communication connection with the target device 30, and the control end 100 is installed with an application program 123 which can control the target device 30. The control end 100 can be a mobile phone, a tablet computer, a personal computer (PC), a scene panel and the like. The control end 100 can be connected with the target device 30 through a network, such as through 2G, 3G, 4G, 5G and WiFi network.

[0045] In another optional embodiment, the signal input / output module 20 and the processor 10 can be integrated into the target device 30. That is, the target device 30 itself can include the processor 10 and the signal input / output module 20. In other words, the target device 30 is equivalent to the target device 30 in Figure 3 , and is equivalent to the control end 100 in Figure 3 .

[0046] The embodiments of the present application will be described in detail below. But it needs to be reminded that in order to facilitate the description, the embodiments of the present application are described by taking the user controlling the target device 30 through the control end 100 as an example, but actually the control end 100 can be independently arranged with the target device 30, or can be integrated into the target device 30.

[0047] Please refer to Figure 4 , the flow chart of the data processing method provided by the embodiments of the present application. The execution subject of the processing flow described in the embodiments is the above-mentioned control end 100. Specifically, the data processing method includes:

[0048] S401, obtaining a control instruction.

[0049] In an optional implementation, the control instruction can be generated by the control terminal 100 in response to the input operation of the user. The control instruction includes a target operation type and a target parameter corresponding to the target operation type. It can be understood that the target operation type is the type of the control operation performed by the user, and the target parameter is the value corresponding to the target operation type.

[0050] Taking the target device 30 as a light device as an example, the operation interface of the control terminal 100 can be displayed in a color space consistent with the visual perception of the human eye, such as HSV color space, HSI color space, etc. Thus, the user can adjust the color, brightness, or switch of the light device on the operation interface of the application 123 according to the visual perception. The target operation type can be the switch, color, or brightness of the light device, and the target parameter is the value corresponding to the operation type such as color, brightness, or switch during the adjustment process. For example, the control instruction indicates that the brightness is adjusted to 10, the target operation type is the brightness, and the target parameter is 10.

[0051] It should be noted that the control terminal 100 will also display the target parameter in response to the control instruction after obtaining the control instruction. That is, once the control terminal 100 obtains the control instruction, the parameter corresponding to the target operation type will be displayed as the target parameter on the operation interface, so as to give the user an intuitive operation feeling.

[0052] S402, updating the cache queue according to the target operation type to count the cache time of the target parameter.

[0053] The cache queue is used to cache the operation type, the to-be-processed parameter corresponding to the operation type, and the cache time of the to-be-processed parameter. It should be noted that the cache time of the to-be-processed parameter can be understood as the time that the to-be-processed parameter waits in the cache queue.

[0054] Please refer to Figure 5 for the specific flowchart of S402. The S402 includes:

[0055] S4021, determining whether the cache queue includes a to-be-processed parameter with an operation type matching the target operation type, if yes, performing S4022; if no, performing S4023.

[0056] In an optional implementation, if the operation type of a to-be-processed parameter in the cache queue is consistent with the target operation type, it can be determined that the cache queue includes a to-be-processed parameter with an operation type matching the target operation type; if the operation type of each to-be-processed parameter in the cache queue is inconsistent with the target operation type, it can be determined that the cache queue does not include a to-be-processed parameter with an operation type matching the target operation type.

[0057] Further, if the cache queue is empty and does not include any to-be-processed parameters of the operation type, it can be directly determined that the cache queue does not include the to-be-processed parameter of the operation type matching the target operation type.

[0058] Similarly, taking the target device 30 as a light device as an example, if the target operation type is brightness and the cache queue only includes a to-be-processed parameter of the operation type color, it can be determined that the cache queue does not include the to-be-processed parameter of the operation type matching the target operation type. If the target operation type is brightness and the cache queue includes a to-be-processed parameter of the operation type also being brightness, it can be determined that the cache queue includes the to-be-processed parameter of the operation type matching the target operation type.

[0059] S4022, set the to-be-processed parameter as the target parameter, and clear the cache time of the target parameter and then restart timing.

[0060] That is, if the cache queue includes the to-be-processed parameter of the operation type matching the target operation type, the to-be-processed parameter is set as the target parameter, and the cache time of the target parameter is cleared and then restarted.

[0061] It can be understood that once the cache queue includes the to-be-processed parameter of the target operation type, it indicates that the user has adjusted the parameter corresponding to the target operation type, and in order to avoid screen flickering caused by frequent user operations, the target parameter is directly used to replace the to-be-processed parameter, and the cache time of the target parameter is timed. Since the target parameter is used to replace the to-be-processed parameter, the cache time of the target parameter is the cache time of the to-be-processed parameter at this time, and thus in order to accurately count the cache time of the target parameter, the cache time of the target parameter needs to be cleared and then restarted.

[0062] S4023, add the target parameter to the cache queue and time the cache time of the target parameter.

[0063] If the cache queue does not include the to-be-processed parameter of the operation type matching the target operation type, the target parameter is added to the cache queue and the cache time of the target parameter is timed.

[0064] Once the cache queue does not include the to-be-processed parameter of the target operation type, it indicates that the user has not controlled the parameter corresponding to the target operation type, and thus the target parameter needs to be added to the cache queue so as to make the target parameter as a to-be-processed parameter, and the cache time of the target parameter is timed so as to adjust the parameter corresponding to the target operation type according to the target parameter.

[0065] S403, real-time detect the cache time of the target parameter.

[0066] It can be understood that, since the cache time of the target parameter can be counted in the cache queue, reading the cache queue in real time can detect the cache time of the target parameter.

[0067] S404, if the cache time of the target parameter reaches the preset time threshold, a control instruction is sent to the target device 30, so that the target device 30 responds to the control instruction and feeds back response data.

[0068] That is, if the cache time of any to-be-processed parameter in the cache queue reaches the preset time threshold, a control instruction is sent to the target device 30, so that the target device 30 responds to the control instruction and feeds back response data.

[0069] It can be understood that, by judging that there is a to-be-processed parameter matching the target operation type in the cache queue, the target parameter is taken as a new to-be-processed parameter, and the cache time of the target parameter is counted again, so that as long as the cache time of the to-be-processed parameter does not reach the preset time threshold, once the target parameter of the same operation type is received, only the latest target parameter is sent, which can effectively avoid the problem of screen flicker caused by the user's frequent operation on the same operation type parameter.

[0070] For example, if the cache queue is empty and the first control instruction is obtained, the first control instruction is used to indicate that the brightness is adjusted to 10, at this time the cache queue does not include a to-be-processed parameter of the operation type of brightness, the brightness 10 is added to the cache queue, and the cache time of the first control instruction of the target parameter of the brightness 10 is counted; if the cache time of the first control instruction of the target parameter of the brightness 10 is 350 ms, the control end 100 obtains the second control instruction again, the second control instruction is used to indicate that the brightness is adjusted to 25, at this time the cache queue includes a to-be-processed parameter of the operation type of brightness (that is, the brightness 10), the brightness 25 is taken as a new to-be-processed parameter, the cache time is cleared, and the cache time of the brightness 25 is counted again. When the cache time of the brightness 25 reaches the preset time threshold, the second control instruction is sent to the target device 30, indicating that the target device 30 adjusts the brightness according to the parameter of the brightness 25. It can be seen that when the user performs frequent operation (that is, when the brightness is adjusted multiple times within the preset time threshold), the control end 100 regards the previous operation as invalid operation, and only the last operation result is issued, which can avoid the target device 30 adjusting the same parameter frequently, and can also alleviate the problem of alternating display and screen flicker caused by the interaction display of the response data fed back by the target device 30 for each operation and the operation data of the user (for example, the first control instruction of the target parameter of the brightness 10 and the second control instruction of the target parameter of the brightness 25).

[0071] It should be noted that the response data is the data fed back by the target device 30 after adjusting the parameter corresponding to the target operation type according to the target parameter in response to the control instruction successfully, which can reflect that the target device 30 indeed adjusts the parameter in response to the control instruction and the adjustment is successful.

[0072] Please refer to Figure 6 The flow chart of the data processing method provided by another embodiment of the present application. The embodiment adds the process of processing the data after receiving the feedback data on the basis of the above-mentioned embodiment. Figure 4 The data processing method further comprises:

[0073] S405, receiving the feedback data sent by the target device 30.

[0074] The feedback data comprises the actual operation type and the actual parameter corresponding to the actual operation type. That is, the actual operation type can indicate which type of operation parameter is adjusted by the target device 30 actually, and the actual parameter can indicate the adjusted parameter value.

[0075] It should be noted that the feedback data mentioned in the step is not necessarily the response data mentioned above, but can also be the data sent by the target device 30 after receiving the control of other terminals, or the data fed back by the target device 30 in response to other types of control instructions sent by the control terminal 100.

[0076] For example, a user issues a first control instruction and a second control instruction successively, controls the brightness of the target device 30 through the first control instruction, and controls the color of the target device 30 through the second control instruction, while another user simultaneously issues a color temperature adjustment instruction through another terminal to adjust the color temperature of the target device 30. In general, the target device 30 can send first feedback data in response to the first control instruction, send second feedback data in response to the second control instruction, and send third feedback data in response to the color temperature adjustment instruction. For the first control instruction, the first feedback data is the corresponding response data, and the second feedback data and the third feedback data are not the corresponding response data. For the second control instruction, the second feedback data is the corresponding response data, and the first feedback data and the third feedback data are not the corresponding response data.

[0077] S406, judging whether the reference parameter is included in the updated cache queue, if not, executing S407; if yes, executing S408.

[0078] The reference parameter is a to-be-processed parameter in the cache queue, the operation type of which matches the actual operation type. It can be understood that if the to-be-processed parameter in the updated cache queue, the operation type of which matches the actual operation type, exists, it indicates that the user has performed a control operation on the parameter corresponding to the actual operation type through the control terminal 100, and it is determined that the updated cache queue includes the reference parameter, and the to-be-processed parameter is the reference parameter, thereby executing S407; if the to-be-processed parameter in the updated cache queue, the operation type of which matches the actual operation type, does not exist, it indicates that the user has not performed a control operation on the parameter corresponding to the actual operation type through the control terminal 100, and it is determined that the updated cache queue does not include the reference parameter, thereby executing S410.

[0079] S407, directly displaying the actual parameter.

[0080] If the updated cache queue does not include the reference parameter, it indicates that the user has not performed a control operation on the parameter corresponding to the actual operation type through the control terminal 100, and the feedback data is sent by the target device 30 in response to the instruction issued by the other terminal. At this time, in order to display the real state of the target device 30, the actual parameter is directly displayed to update the state of the target device 30.

[0081] S408, determining whether the actual parameter matches the reference parameter, if not, executing S409; if yes, executing S410.

[0082] If the updated cache queue includes the reference parameter, it indicates that the user has performed a control operation on the parameter corresponding to the actual operation type through the control terminal 100, but it needs to be further determined whether the feedback data is the response data corresponding to the actual operation type.

[0083] It should be noted that according to the difference of the actual operation type, whether the actual parameter matches the reference parameter can have different standards. For example, if the actual operation type is on / off, the corresponding actual parameter only includes two values, then the actual parameter and the reference parameter cannot have errors, and need to be completely consistent to determine that the actual parameter matches the reference parameter; and for the operation of brightness, color temperature, color, and the like, which can have errors, therefore, as long as the error between the actual parameter and the reference parameter is within a preset range, it can be determined that the actual parameter matches the reference parameter.

[0084] Therefore, referring to Figure 7 , a specific flowchart of S408. The S408 includes:

[0085] S4081, determining an error threshold according to the actual operation type.

[0086] Since the ranges of parameters of different operation types are different, the corresponding precisions are also different, and thus the corresponding error thresholds should also be different.

[0087] S4082, calculating the error of the actual parameter and the reference parameter.

[0088] It can be understood that the error should be the absolute value of the difference between the actual parameter and the reference parameter.

[0089] S4083, judging whether the error is less than or equal to the error threshold, if yes, executing S4084; if no, executing S4085.

[0090] S4084, determining that the actual parameter matches the reference parameter.

[0091] If the error is less than or equal to the error threshold, it is judged that the actual parameter matches the reference parameter.

[0092] S4085, determining that the actual parameter does not match the reference parameter.

[0093] If the error is greater than the error threshold, it is judged that the actual parameter does not match the reference parameter.

[0094] S409, generating a prompt information.

[0095] If the actual parameter does not match the reference parameter, it indicates that the feedback data is not the response data fed back by the target device 30 in response to the control instruction issued by the control terminal 100, but the parameter fed back by the target device 30 when other users adjust the actual operation type by using other terminals (except the control terminal 100). In order to ensure the experience of the user on the control terminal 100 side, the actual parameter is not displayed, and the prompt information is generated to prompt the user on the control terminal 100 side that there is another user who is performing the control operation.

[0096] S410, deleting the reference parameter in the updated cache queue.

[0097] If the actual parameter matches the reference parameter, it indicates that the feedback data is the response data fed back by the target device 30 in response to the control instruction issued by the control terminal 100, and thus the reference parameter needs to be deleted in the updated cache queue to indicate that the control terminal 100 has successfully sent the corresponding control instruction, and it is not necessary to continue to monitor the parameter of the actual operation type.

[0098] It should be noted that in the prior art, the control terminal 100 will also display the actual parameter after receiving the response data. However, there is a certain error between the actual parameter and the reference parameter, which will cause the screen of the control terminal 100 to shake due to the error. In the embodiment of the present application, as long as the error between the actual parameter and the reference parameter is within the preset error threshold, the actual parameter does not need to be displayed, thereby avoiding screen shaking.

[0099] Please refer to Figure 8 , the flowchart of the data processing method provided by another embodiment of the present application. The embodiment adds a process of re-sending the control instruction on the basis of Figure 5 The data processing method further comprises:

[0100] S411, determining whether the response data is received within the preset feedback period, if yes, performing S412; if no, performing S413.

[0101] It should be noted that the response data corresponding to the target operation type refers to the response data whose operation type is consistent with the target operation type and whose included parameter value matches the target parameter.

[0102] Specifically, when a feedback data is received, and the actual operation type of the feedback data is consistent with the target operation type and the actual parameter of the feedback data matches the target parameter, it can be determined that the received feedback data is the response data corresponding to the target operation type.

[0103] S412, deleting the target parameter in the updated cache queue.

[0104] It can be understood that if the response data corresponding to the target operation type is received within the preset feedback period, it indicates that the target device 30 has successfully responded to the control instruction, and it is not necessary to continue to monitor the target operation type, and the target parameter needs to be deleted in the updated cache queue.

[0105] S413, counting the total sending number of the control instruction.

[0106] If the response data corresponding to the target operation type is not received within the preset feedback period, it indicates that the control terminal 100 may not have successfully sent the control instruction or the target device 30 has not successfully responded to the control instruction, and therefore the total sending number of the control instruction is counted to determine the timeout time.

[0107] S414, determining whether the total sending number is less than or equal to the preset number threshold, if yes, performing S415; if no, performing S416.

[0108] It can be understood that the preset number threshold can be set according to actual application. In an optional embodiment, the preset number threshold can be an integer of 1, 2, 3, etc.

[0109] S415, re-sending the control instruction to the target device 30.

[0110] That is, as long as the total sending number is less than or equal to the preset number threshold, the control instruction will be re-sent to the target device 30 in each feedback period.

[0111] S416, deleting the target parameter in the updated cache queue and obtaining echo data.

[0112] If the total sending number is greater than the preset number threshold and the response data has not been received, in other words, if the feedback data has not been received within the preset number threshold of feedback periods, the target parameter is deleted in the updated cache queue and the echo data is obtained to display the echo data.

[0113] The echo data includes the historical parameter associated with the target parameter displayed by the control terminal 100 before responding to the control instruction.

[0114] S417, displaying the historical parameter.

[0115] It can be understood that since the response data has not been received, it indicates that the target device 30 has not successfully responded to the control instruction, and the target device 30 has not adjusted the parameter value corresponding to the target operation type according to the target parameter, so the historical data is displayed at this time to display the real state of the target device 30.

[0116] In order to perform the corresponding steps in the above embodiments and various possible manners, an implementation of a data processing apparatus 200 is given below. Please refer to Figure 9 A functional module diagram of a data processing apparatus 200 provided in the embodiments of the present application. It should be noted that the data processing apparatus 200 provided in the embodiments has the same basic principles and technical effects as the above embodiments, and for brief description, the part not mentioned in the embodiments can refer to the corresponding content in the above embodiments. The data processing apparatus 200 includes an instruction obtaining module 210, a queue updating module 220, a time checking module 230, and a transceiver module 240.

[0117] The instruction obtaining module 210 is configured to obtain the control instruction.

[0118] It can be understood that in an optional embodiment, the instruction obtaining module 210 can be configured to perform S401 to achieve the corresponding function.

[0119] The queue updating module 220 is configured to update the cache queue according to the target operation type, so as to count the cache time of the target parameter.

[0120] Specifically, the queue updating module 220 is configured to determine whether the cache queue includes a to-be-processed parameter whose operation type matches the target operation type, and if the cache queue includes the to-be-processed parameter, replace the to-be-processed parameter with the target parameter and reset the cache time of the target parameter; if the cache queue does not include the to-be-processed parameter, add the target parameter to the cache queue and count the cache time of the target parameter.

[0121] It can be understood that in an optional implementation, the queue updating module 220 can be configured to perform S402, S4021, S4022 and S4023 to achieve the corresponding functions.

[0122] The time checking module 230 is configured to detect the cache time of the target parameter in real time.

[0123] It can be understood that in an optional implementation, the time checking module 230 can be configured to perform S403 to achieve the corresponding functions.

[0124] The transceiver module 240 is configured to send a control instruction to the target device 30 if the cache time of the target parameter reaches a preset time threshold, so that the target device 30 responds to the control instruction and feeds back response data.

[0125] It can be understood that in an optional implementation, the transceiver module 240 can be configured to perform S404 to achieve the corresponding functions.

[0126] Please refer to Figure 10 , the data processing apparatus 200 further includes a determination module 250, a display module 260 and a prompt information generation module 270.

[0127] The transceiver module 240 is further configured to receive the feedback data sent by the target device 30.

[0128] It can be understood that in an optional implementation, the transceiver module 240 can be further configured to perform S405 to achieve the corresponding functions.

[0129] The determination module 250 is configured to determine whether the reference parameter is included in the updated cache queue.

[0130] It can be understood that in an optional implementation, the determination module 250 can be further configured to perform S406 to achieve the corresponding functions.

[0131] The display module 260 is configured to directly display the actual parameter if the reference parameter is not included in the updated cache queue.

[0132] It can be understood that in an optional implementation, the display module 260 can be configured to perform S407 to implement the corresponding function.

[0133] The judgment module 250 is further configured to judge whether the actual parameter matches the reference parameter.

[0134] Specifically, the judgment module 250 can be configured to determine an error threshold according to the actual operation type, calculate an error between the actual parameter and the reference parameter, and then judge whether the error is less than or equal to the error threshold. If the error is less than or equal to the error threshold, it is judged that the actual parameter matches the reference parameter. If the error is greater than the error threshold, it is judged that the actual parameter does not match the reference parameter.

[0135] It can be understood that in an optional implementation, the judgment module 250 can be further configured to perform S408, S4081, S4082, S4083, S4084 and S4085 to implement the corresponding functions.

[0136] The prompt information generation module 270 is configured to generate prompt information when the actual parameter does not match the reference parameter.

[0137] It can be understood that in an optional implementation, the prompt information generation module 270 can be configured to perform S409 to implement the corresponding function.

[0138] The queue updating module 220 is further configured to delete the reference parameter in the updated cache queue.

[0139] It can be understood that in an optional implementation, the queue updating module 220 can be further configured to perform S410 to implement the corresponding function.

[0140] Please refer to Figure 11 , another embodiment of the present application provides a data processing apparatus 200, and the data processing apparatus 200 further comprises a statistical module 280.

[0141] The judgment module 250 is further configured to judge whether the response data corresponding to the target operation type is received within a preset feedback period.

[0142] It can be understood that in an optional implementation, the judgment module 250 can be further configured to perform S411 to implement the corresponding function.

[0143] The queue updating module 220 is further configured to delete the target parameter in the updated cache queue if the response data corresponding to the target operation type is received within the preset feedback period.

[0144] It can be understood that, in an optional implementation, the queue updating module 220 can also be configured to perform S412 to implement the corresponding function.

[0145] The statistical module 280 is configured to count the total sending times of the control instruction if the response data corresponding to the target operation type is not received within the preset feedback period.

[0146] It can be understood that, in an optional implementation, the statistical module 280 can be configured to perform S413 to implement the corresponding function.

[0147] The judging module 250 is further configured to judge whether the total sending times are less than or equal to a preset quantity threshold.

[0148] It can be understood that, in an optional implementation, the judging module 250 can be configured to perform S414 to implement the corresponding function.

[0149] The transceiving module 240 is further configured to re-send the control instruction to the target device 30 when the total sending times are less than or equal to the preset quantity threshold.

[0150] It can be understood that, in an optional implementation, the transceiving module 240 can be configured to perform S415 to implement the corresponding function.

[0151] The queue updating module 220 is further configured to delete the target parameter in the updated cache queue and obtain the echo data when the total sending times are greater than the preset quantity threshold.

[0152] It can be understood that, in an optional implementation, the queue updating module 220 can be configured to perform S416 to implement the corresponding function.

[0153] The display module 260 is further configured to display the historical parameters.

[0154] It can be understood that, in an optional implementation, the display module 260 can be configured to perform S417 to implement the corresponding function.

[0155] In conclusion, the data processing method and device, the control terminal 100 and the storage medium 120 provided in the embodiments of the present application obtain the control instruction, the control instruction includes the target operation type and the target parameter corresponding to the target operation type, update the cache queue according to the target operation type, count the cache time of the target parameter, then detect the cache time of the target parameter in real time, and send the control instruction to the target device 30 when the cache time of the target parameter reaches the preset time threshold, so that the target device 30 responds to the control instruction and feeds back the response data. Since the cache queue and the cache time are used to determine whether to send the control instruction, the control instruction can be sent in order without relying on the time stamp or the serial number, and can be applied in any complex scene, so the application range is wide.

[0156] In several embodiments provided in the present application, the coupling or direct coupling or communication connection between the modules shown or discussed can be indirect coupling or communication connection between some interfaces, devices or modules, which can be electrical, mechanical or other forms.

[0157] In addition, each functional module in each embodiment of the present application can be integrated in one processing module, or each module can exist physically alone, or two or more modules can be integrated in one module. The integrated module can be realized in the form of hardware or in the form of a software functional module.

[0158] Please refer to Figure 12 which shows a hardware structure block diagram of a control terminal 100 provided in an embodiment of the present application. The control terminal 100 can be a server, a gateway, an intelligent lighting device or the like. As Figure 9 shown, the control terminal 100 can have great differences due to different configurations or performances, and can include one or more than one processor 10 (Central Processing Unit, CPU), a memory 130 for storing data 122, one or more than one storage medium 120 (such as one or more than one mass storage device) for storing application programs 123 or data 122.

[0159] The memory 130 and the storage medium 120 can be temporary storage or persistent storage. The program stored in the storage medium 120 can include one or more than one module, and each module can include a series of instruction operations in the control terminal 100. Furthermore, the processor 10 can be configured to communicate with the storage medium 120 and execute a series of instruction operations in the storage medium 120 on the control terminal 100. The processor 10 can include but is not limited to a microcontroller unit (MCU) or a field programmable gate array (FPGA) processing device.

[0160] The control end 100 may also include one or more power supplies 160, one or more wired or wireless network interfaces 150, one or more input and output interfaces 140, and / or one or more operating systems 121, such as Windows Server™, Mac OS X™, Unix™, Linux™, FreeBSD™, etc.

[0161] The input / output interface 140 can be used to receive or send data 122 via a network. Specific examples of the aforementioned network may include a wireless network provided by the communication provider of the control terminal 100. In one embodiment, the input / output interface 140 may include a network interface controller (NIC), which can be connected to other network devices via a base station to enable communication with the Internet. In another embodiment, the input / output interface 140 may be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.

[0162] It can be understood by those skilled in the art that Figure 12 The structure shown is only for illustration and does not limit the structure of the control terminal 100. For example, the control terminal 100 may also include Figure 12 More or fewer components than shown, or with Figure 12 Different configurations shown.

[0163] An embodiment of the present invention further provides a storage medium having a computer program stored thereon. When the computer program is executed by the processor 10, the various processes of the above-mentioned data processing method embodiment are implemented and can achieve the same technical effect. To avoid repetition, the description is not repeated here. The storage medium can be a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.

[0164] It should be noted that, in the present document, the terms "comprising", "containing" or any other similar term are intended to encompass non-exclusive inclusions, such that a process, method, article, or apparatus that comprises a list of elements does not necessarily include those elements only, but can include other elements not expressly listed, or can include elements inherent in such process, method, article, or apparatus. Without more limitations, an element defined by the phrase "comprising a" does not exclude the presence of additional identical elements in the process, method, article, or apparatus that includes the element. In several embodiments provided in the present application, it should be understood that the disclosed apparatus and methods can also be implemented in other ways. The above-described apparatus embodiments are only illustrative, for example, the flowcharts and block diagrams in the drawings show the possible implementation architecture, function and operation of the apparatus, method and computer program product according to the embodiments of the present application. In this regard, each block in the flowchart or block diagram can represent a module, a program segment or a part of code, which includes one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions noted in the blocks can occur in different orders from those shown in the drawings. For example, two consecutive blocks can actually be executed substantially in parallel, and sometimes they can be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagram and / or flowchart, and the combination of blocks in the block diagram and / or flowchart, can be implemented by a dedicated hardware-based system that performs the specified functions or actions, or can be implemented by a combination of dedicated hardware and computer instructions.

[0165] In addition, the functional modules in the various embodiments of the present application can be integrated together to form an independent part, or each module can exist independently, or two or more modules can be integrated to form an independent part.

[0166] If the functions are implemented in the form of software function modules and sold or used as independent products, they can be stored in a computer readable storage medium. Based on this understanding, the technical solutions of the present application essentially or the part that contributes to the prior art, or part of the technical solutions can be embodied in the form of a software product, which is stored in a storage medium and includes a number of instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present application. The aforementioned storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM, Read-Only Memory), a random access memory (RAM, Random Access Memory), a magnetic disk or an optical disk, and various media that can store program codes.

[0167] The above description is only the preferred embodiment of the present application, and is not intended to limit the present application. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application.

Claims

1. A data processing method, characterized by, The data processing method is applied to a control end and comprises the following steps: obtaining a control instruction, wherein the control instruction comprises a target operation type and a target parameter corresponding to the target operation type; updating a cache queue according to the target operation type to count a cache time of the target parameter, wherein the cache queue is used to cache operation types, parameters to be processed corresponding to the operation types, and cache times of the parameters to be processed; the updating of the cache queue according to the target operation type to count the cache time of the target parameter comprises the following steps: if an operation type of a parameter to be processed in the cache queue is consistent with the target operation type, the parameter to be processed is determined as the target parameter, and the cache time of the target parameter is counted again after the cache time of the target parameter is cleared; if the operation types of all the parameters to be processed in the cache queue are inconsistent with the target operation type, the target parameter is added to the cache queue, and the cache time of the target parameter is counted; real-time detecting the cache time of the target parameter; if the cache time of the target parameter reaches a preset time threshold, sending the control instruction to a target device to make the target device respond to the control instruction and feed back response data.

2. The data processing method according to claim 1, characterized in that, After the step of sending the control instruction to the target device if the cache time of the target parameter reaches the preset time threshold, the method further comprises the following steps: receiving the feedback data sent by the target device, wherein the feedback data comprises an actual operation type and an actual parameter corresponding to the actual operation type; if a reference parameter is included in the updated cache queue, determining whether the actual parameter matches the reference parameter, wherein the reference parameter is a parameter to be processed in the cache queue, and the operation type of the parameter to be processed matches the actual operation type; if the actual parameter matches the reference parameter, deleting the reference parameter in the updated cache queue.

3. The data processing method according to claim 2, characterized in that, The method further comprises the following steps: if the actual parameter does not match the reference parameter, generating a prompt information.

4. The data processing method according to claim 3, characterized in that, The step of determining whether the actual parameter matches the reference parameter comprises the following steps: determining an error threshold according to the actual operation type; calculating an error between the actual parameter and the reference parameter; if the error is less than or equal to the error threshold, determining that the actual parameter matches the reference parameter; if the error is greater than the error threshold, determining that the actual parameter does not match the reference parameter.

5. The data processing method according to claim 2, characterized in that, The method further comprises the following steps: if the reference parameter is not included in the updated cache queue, directly displaying the actual parameter.

6. The data processing method of claim 1, wherein, After the step of sending the control instruction to the target device if the cache time of the target parameter reaches the preset time threshold, the method further comprises the following steps: determining whether the response data is received within a preset feedback period; if the response data is not received within the preset feedback period, counting a total sending number of the control instruction; if the total sending number is less than or equal to a preset number threshold, sending the control instruction to the target device again.

7. The data processing method according to claim 6, characterized in that, The method further comprises the following steps: If the total sending times are greater than the preset quantity threshold, the target parameter is deleted from the updated cache queue and echo data is acquired, wherein the echo data includes history parameters associated with the target parameter displayed by the control terminal before responding to the control instruction. The history parameters are displayed.

8. The data processing method according to claim 6, characterized in that, The method further includes: If the response data is received within a preset feedback period, the target parameter is deleted from the updated cache queue.

9. A data processing apparatus, characterized by, The data processing apparatus is applied to a control terminal and includes: An instruction acquisition module is configured to acquire a control instruction, wherein the control instruction includes a target operation type and a target parameter corresponding to the target operation type. A queue updating module is configured to update a cache queue according to the target operation type to count the cache time of the target parameter, wherein the cache queue is configured to cache operation types, parameters to be processed corresponding to the operation types, and cache times of the parameters to be processed. If the operation type of a parameter to be processed in the cache queue is consistent with the target operation type, the queue updating module is configured to determine the parameter to be processed as the target parameter and count the cache time of the target parameter after the cache time of the target parameter is cleared. If the operation types of all parameters to be processed in the cache queue are inconsistent with the target operation type, the queue updating module is configured to add the target parameter to the cache queue and count the cache time of the target parameter.

10. A control terminal, characterized by A time checking module is configured to detect the cache time of the target parameter in real time.

11. A storage medium having stored thereon a computer program, characterized in that A transceiver module is configured to send the control instruction to a target device to make the target device respond to the control instruction and feed back response data if the cache time of the target parameter reaches a preset time threshold. The computer program is executed by the processor to implement the data processing method in any one of claims 1 to 8. The computer program is executed by the processor to implement the data processing method in any one of claims 1 to 8.

Citation Information

Patent Citations

  • Business data processing method and system

    CN110555744A

  • Knowledge base updating method and apparatus and storage medium

    CN111414463A