CN114327331B - Information display method, information display device, electronic equipment and computer readable storage medium - Google Patents

Information display method, information display device, electronic equipment and computer readable storage medium Download PDF

Info

Publication number
CN114327331B
CN114327331B CN202111580088.5A CN202111580088A CN114327331B CN 114327331 B CN114327331 B CN 114327331B CN 202111580088 A CN202111580088 A CN 202111580088A CN 114327331 B CN114327331 B CN 114327331B
Authority
CN
China
Prior art keywords
state information
internet
terminal
interface
switching instruction
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202111580088.5A
Other languages
Chinese (zh)
Other versions
CN114327331A (en
Inventor
詹博慧
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen TCL New Technology Co Ltd
Original Assignee
Shenzhen TCL New Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen TCL New Technology Co Ltd filed Critical Shenzhen TCL New Technology Co Ltd
Priority to CN202111580088.5A priority Critical patent/CN114327331B/en
Publication of CN114327331A publication Critical patent/CN114327331A/en
Application granted granted Critical
Publication of CN114327331B publication Critical patent/CN114327331B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

The embodiment of the application discloses an information display method, an information display device, electronic equipment and a computer readable storage medium; in the embodiment of the application, at least two switching instructions for the Internet of things equipment connected with the terminal are acquired, and target state information corresponding to the final switching instructions is displayed on an interface of the terminal; at least two switching instructions are sent to the Internet of things equipment, a preset zone bit on the terminal is set to be a first target value, and the first target value indicates that the terminal is waiting for the state information returned by the Internet of things equipment; receiving first initial state information returned by the Internet of things equipment based on an initial switching instruction, wherein the initial switching instruction is the switching instruction which is acquired earliest in at least two switching instructions; if the target state information is inconsistent with the first initial state information and the preset zone bit is the first target value, the target state information is maintained to be displayed on the interface. The embodiment of the application can solve the problem of frequent interface jump.

Description

Information display method, information display device, electronic equipment and computer readable storage medium
Technical Field
The present application relates to the technical field of intelligent devices, and in particular, to an information display method, an information display device, an electronic device, and a computer readable storage medium.
Background
With the development of science and technology, more and more internet of things devices are used by people. Currently, an application program is generally used for controlling the internet of things equipment. When the internet of things device is controlled by the application program, the state information of the interface of the application program and the state information of the internet of things device need to be kept consistent. If the state information of the interfaces of the application program is inconsistent, the state information of the Internet of things equipment is required to be updated.
However, since the speed of updating the state information by the interface of the application program based on the instruction is faster, and the speed of returning the state information of the internet of things device to the application program is slower, when a plurality of switching instructions are received in a short time, that is, when the user frequently clicks the button on the application program, the state information of the interface of the application program is inconsistent with the state information of the internet of things device, so that the user interface of the application program continuously jumps.
Disclosure of Invention
The embodiment of the application provides an information display method, an information display device, electronic equipment and a computer readable storage medium, which can solve the technical problem that a user interface of an application program continuously jumps.
An information display method, comprising:
Acquiring at least two switching instructions aiming at the Internet of things equipment connected with a terminal, and displaying target state information corresponding to a final switching instruction on an interface of the terminal, wherein the final switching instruction is the switching instruction finally acquired in the at least two switching instructions;
the at least two switching instructions are sent to the Internet of things equipment, and a preset zone bit on the terminal is set to be a first target value, wherein the first target value indicates that the terminal is waiting for the Internet of things equipment to return state information;
receiving first initial state information returned by the Internet of things equipment based on an initial switching instruction, wherein the initial switching instruction is the switching instruction which is acquired earliest in the at least two switching instructions;
if the target state information is inconsistent with the first initial state information and the preset flag bit is the first target value, the target state information is maintained to be displayed on the interface.
Optionally, after receiving the first initial state information returned by the internet of things device based on the initial switching instruction, the method further includes:
if the target state information is consistent with the first initial state information, starting a timer;
When the timing time of the timer reaches the first preset time, setting the preset flag bit as a second target value, wherein the second target value indicates that the state information is not returned by the equipment waiting for the Internet of things.
Optionally, after the acquiring at least two switching instructions for the internet of things device connected to the terminal, the method further includes:
determining the state of the timer;
and if the state of the timer is a timing state, modifying the state of the timer into an untimed state.
Optionally, before the acquiring at least two switching instructions for the internet of things device connected to the terminal, the method further includes:
setting the preset flag bit, and setting the preset flag bit as a second target value.
Optionally, after the setting the preset flag bit to the second target value, the method further includes:
the method comprises the steps of receiving slave state information actively sent by the Internet of things equipment, wherein the slave state information is sent by the Internet of things equipment after receiving a slave switching instruction sent by a slave terminal;
and if the slave state information is inconsistent with the current state information of the interface, updating the current state information of the interface into the slave state information.
Optionally, if the slave status information is inconsistent with the current status information of the interface, updating the current status information of the interface to the slave status information includes:
and if the slave state information is inconsistent with the current state information of the interface and the preset flag bit is the second target value, updating the current state information of the interface to the slave state information.
Optionally, if the slave state information is inconsistent with the current state information of the interface and the preset flag bit is the second target value, updating the current state information of the interface to the slave state information includes:
if the slave state information is inconsistent with the current state information of the interface and the preset flag bit is the second target value, starting the timer;
and when the timing time of the timer reaches a second preset time, updating the current state information of the interface into the slave state information.
Accordingly, an embodiment of the present application provides an information display apparatus including:
the terminal comprises an acquisition module, a display module and a display module, wherein the acquisition module is used for acquiring at least two switching instructions aiming at the Internet of things equipment connected with the terminal, and displaying target state information corresponding to a final switching instruction on an interface of the terminal, wherein the final switching instruction is the switching instruction finally acquired in the at least two switching instructions;
The sending module is used for sending the at least two switching instructions to the Internet of things equipment, and setting a preset zone bit on the terminal as a first target value, wherein the first target value indicates that the terminal is waiting for the state information returned by the Internet of things equipment;
the receiving module is used for receiving first initial state information returned by the Internet of things equipment based on an initial switching instruction, wherein the initial switching instruction is the switching instruction which is acquired earliest in the at least two switching instructions;
and the maintaining module is used for maintaining the display of the target state information on the interface if the target state information is inconsistent with the first initial state information and the preset zone bit is the first target value.
In addition, the embodiment of the application also provides electronic equipment, which comprises a processor and a memory, wherein the memory stores a computer program, and the processor is used for running the computer program in the memory to realize the information display method provided by the embodiment of the application.
In addition, the embodiment of the application also provides a computer readable storage medium, and the computer readable storage medium stores a computer program, and the computer program is suitable for being loaded by a processor to execute any information display method provided by the embodiment of the application.
In addition, the embodiment of the application also provides a computer program product, which comprises a computer program, and the computer program realizes any information display method provided by the embodiment of the application when being executed by a processor.
In the embodiment of the application, at least two switching instructions for the Internet of things equipment connected with the terminal are acquired first, target state information corresponding to the final switching instruction is displayed on an interface of the terminal, and the final switching instruction is the switching instruction finally acquired in the at least two switching instructions. And then, sending at least two switching instructions to the Internet of things equipment connected with the terminal, and setting a preset zone bit on the terminal as a first target value, wherein the first target value indicates that the terminal is waiting for the state information returned by the Internet of things equipment. And then receiving first initial state information returned by the Internet of things equipment based on the initial switching instruction, wherein the initial switching instruction is the switching instruction which is acquired earliest in the at least two switching instructions. If the target state information is inconsistent with the first initial state information and the preset zone bit is the first target value, the target state information is maintained to be displayed on the interface.
That is, in the embodiment of the present application, when the target state information is inconsistent with the first initial state information, the target state information is not immediately updated to the first initial state information, but the preset flag bit is checked, and because the first target value indicates that the state information is being returned by the internet of things device, if the preset flag bit is the first target value, it is indicated that the state information which is not returned by the internet of things device exists, at this time, the target state is maintained to be displayed on the interface, so that the interface does not frequently jump.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are needed in the description of the embodiments will be briefly described below, it being obvious that the drawings in the following description are only some embodiments of the present application, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
Fig. 1 is a schematic flow chart of an information display method according to an embodiment of the present application;
FIG. 2 is a flowchart of another information display method according to an embodiment of the present application;
fig. 3 is a schematic structural diagram of an information display device according to an embodiment of the present application;
fig. 4 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
The following description of the embodiments of the present application will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present application, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the application without making any inventive effort, are intended to fall within the scope of the application.
The embodiment of the application provides an information display method, an information display device, electronic equipment and a computer readable storage medium. The information display device may be integrated in an electronic device, which may be a server or a terminal.
The server may be an independent physical server, a server cluster or a distributed system formed by a plurality of physical servers, or a cloud server providing cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, network acceleration services (Content Delivery Network, CDN), basic cloud computing services such as big data and an artificial intelligent platform.
The terminal may be, but is not limited to, a smart phone, a tablet computer, a notebook computer, a desktop computer, a smart speaker, a smart watch, a remote control, and the like. The terminal and the server may be directly or indirectly connected through wired or wireless communication, and the present application is not limited herein.
In addition, "plurality" in the embodiments of the present application means two or more. "first" and "second" and the like in the embodiments of the present application are used for distinguishing descriptions and are not to be construed as implying relative importance.
The following will describe in detail. The following description of the embodiments is not intended to limit the preferred embodiments.
When the internet of things device is controlled by the application program, the state information of the interface of the application program and the state information of the internet of things device need to be kept consistent. If the state information of the interfaces of the application program is inconsistent, the state information of the Internet of things equipment is required to be updated.
However, since the speed of updating the state information by the interface of the application program based on the instruction is faster, and the speed of returning the state information of the internet of things device to the application program is slower, when a plurality of switching instructions are received in a short time, that is, when the user frequently clicks the button on the application program, the state information of the interface of the application program is inconsistent with the state information of the internet of things device, so that the user interface of the application program continuously jumps.
For example, when the application program receives the first switching instruction, the interface of the application program displays the state information corresponding to the first switching instruction and sends the first switching instruction to the internet of things device, but when the state information returned by the internet of things device based on the first switching instruction is not received yet, the application program receives the second switching instruction again, displays the state information corresponding to the second switching instruction on the interface and sends the second instruction to the internet of things device.
If the state information returned by the internet of things equipment based on the first switching instruction is received at this time, the state information corresponding to the second switching instruction displayed on the interface is updated to the state information returned by the internet of things equipment based on the first switching instruction because the state information corresponding to the second switching instruction is displayed on the interface at this time.
And then receiving the state information returned by the Internet of things equipment based on the second switching instruction, wherein the state information corresponding to the first switching instruction is displayed on the interface at the moment, so that the state information corresponding to the first switching instruction displayed on the interface is updated to the state information returned by the Internet of things equipment based on the second switching instruction, and the interface is frequently hopped.
In order to solve the problem that an interface frequently jumps, the application provides an information display method, in the method, at least two switching instructions aiming at the Internet of things equipment connected with a terminal are acquired, target state information corresponding to the final switching instruction is displayed on the interface of the terminal, and the final switching instruction is the switching instruction finally acquired in the at least two switching instructions. And then, sending at least two switching instructions to the Internet of things equipment connected with the terminal, and setting a preset zone bit on the terminal as a first target value, wherein the first target value indicates that the terminal is waiting for the state information returned by the Internet of things equipment. And then receiving first initial state information returned by the Internet of things equipment based on the initial switching instruction, wherein the initial switching instruction is the switching instruction which is acquired earliest in the at least two switching instructions. If the target state information is inconsistent with the first initial state information and the preset zone bit is the first target value, the target state information is maintained to be displayed on the interface.
That is, in the embodiment of the present application, when the target state information is inconsistent with the first initial state information, the target state information is not immediately updated to the first initial state information, but the preset flag bit is checked, and because the first target value indicates that the state information is being returned by the internet of things device, if the preset flag bit is the first target value, it is indicated that the state information which is not returned by the internet of things device exists, at this time, the target state is maintained to be displayed on the interface, so that the interface does not frequently jump.
For example, when the application program receives the first switching instruction, the interface of the application program displays state information corresponding to the first switching instruction, sends the first switching instruction to the internet of things device, and sets a preset flag bit on the terminal as a first target value. When the state information returned by the Internet of things equipment based on the first switching instruction is not received yet, the application program receives a second switching instruction again, the state information corresponding to the second switching instruction is displayed on the interface, and the second switching instruction is sent to the Internet of things equipment.
If the state information returned by the internet of things equipment based on the first switching instruction is received at this time, although the state information corresponding to the second switching instruction is displayed on the interface at this time, the preset flag bit is set to be the first target value, which indicates that the state information corresponding to the second switching instruction which is not returned yet exists in the internet of things equipment, so that the state information corresponding to the second switching instruction is maintained to be displayed on the interface, and then when the state information returned by the internet of things equipment based on the second switching instruction is received, the state information displayed on the interface is consistent with the state information returned by the internet of things equipment based on the second switching instruction, so that the state information displayed on the interface does not need to be updated. Therefore, in the embodiment of the application, the interface can be prevented from frequent jump.
In this embodiment, description will be made in terms of an information display device which may be integrated in a device such as a server or a terminal, and for convenience in explaining the information display method of the present application, the information display device will be integrated in the terminal, that is, the terminal will be used as an execution subject.
Referring to fig. 1, fig. 1 is a flowchart of an information display method according to an embodiment of the application. The information display method may include:
s101, acquiring at least two switching instructions aiming at the Internet of things equipment connected with the terminal, and displaying target state information corresponding to the final switching instruction on an interface of the terminal, wherein the final switching instruction is the switching instruction finally acquired in the at least two switching instructions.
When the user wants to switch the current state of the Internet of things equipment, the user can operate on the terminal, and the terminal responds to the operation of the user to acquire a switching instruction.
When the terminal receives at least two switching instructions, the terminal displays the state information corresponding to the switching instructions received firstly on the interface of the terminal, and then displays the state information corresponding to the switching instructions received later, so that the final target state information corresponding to the switching instructions is displayed on the interface.
For example, the terminal receives the first switching instruction and then receives the second switching instruction, at this time, the final switching instruction is the second switching instruction, and then the terminal displays the state information corresponding to the first switching instruction on the interface, and then displays the state information corresponding to the second switching instruction on the interface, that is, displays the target state information corresponding to the final switching instruction.
When the internet of things device is controlled by the application program on the terminal, the user can operate the application program on the terminal, and the state information corresponding to the switching instruction can be displayed on the interface of the application program. If the Internet of things equipment is controlled through the remote control, a user can operate on the remote control, and the state information corresponding to the switching instruction can be displayed on the interface of the remote control.
If the Internet of things equipment is controlled through the application program on the terminal, the preset zone bit can be set in the application program or in the terminal.
The internet of things device connected with the terminal refers to a device executing a switching instruction. When at least two switching instructions are received, the terminal can be connected with the Internet of things equipment, and after the switching instructions are received, the terminal can be connected with the Internet of things equipment based on the switching instructions.
The switching instruction refers to an instruction to switch the state of the internet of things device, for example, when the internet of things device is an air conditioner, the switching instruction may refer to at least one of an instruction to switch the temperature of the air conditioner from 26 degrees celsius to 28 degrees celsius, an instruction to switch the humidity of the air conditioner from 40% to 50%, and an instruction to switch the wind speed of the air conditioner from 0.9m/s to 1.0 m/s.
The state information corresponding to the switching instruction refers to the state information of the internet of things equipment after the switching instruction is executed. For example, when the switching instruction is an instruction to switch the temperature of the air conditioner from 26 degrees celsius to 28 degrees celsius, the state information corresponding to the switching instruction is 28 degrees celsius.
S102, sending at least two switching instructions to the Internet of things equipment, and setting a preset zone bit on the terminal as a first target value, wherein the first target value indicates that the terminal is waiting for the state information returned by the Internet of things equipment.
After acquiring at least two switching instructions, the terminal sends the at least two switching instructions to the Internet of things equipment so that the Internet of things equipment executes the at least two switching instructions. And the terminal sets the preset flag bit as a first target value. The terminal sets a preset zone bit as a first target value after acquiring a switching instruction.
The preset flag bit can be realized in the form of a global variable. The first target value may be true or 0.
In the process of sending at least two switching instructions to the Internet of things equipment, the terminal sends the at least two switching instructions to the Internet of things equipment according to the time sequence of obtaining the at least two switching instructions, namely, the terminal sends the switching instructions received firstly to the Internet of things equipment, and sends the switching instructions received later to the Internet of things equipment.
It should be noted that if the terminal has not established a connection with the internet of things device, the terminal may first establish a connection with the internet of things device before the terminal sends at least two switching instructions to the internet of things device. The connection manner includes, but is not limited to, bluetooth connection, wireless Access Point (AP), near field communication connection (Near Field Communication, NFC for short), and local area network connection.
S103, receiving first initial state information returned by the Internet of things equipment based on an initial switching instruction, wherein the initial switching instruction is the switching instruction which is acquired earliest in at least two switching instructions.
And after the switching instruction received first is executed, returning the state information corresponding to the switching instruction received first to the terminal. And after the switching instruction received after the execution is executed, returning the state information corresponding to the switching instruction received after the execution to the terminal.
For example, the internet of things device receives a first switching instruction firstly, receives a second switching instruction secondly, and finally receives a third switching instruction, then the internet of things device firstly executes the first switching instruction, returns first initial state information corresponding to the first switching instruction to the terminal, then the internet of things device executes the second switching instruction, returns second initial state information corresponding to the second switching instruction to the terminal, finally the internet of things device executes the third switching instruction, and returns third initial state information corresponding to the third switching instruction to the terminal.
Therefore, after the terminal sends at least two switching instructions to the internet of things device, the terminal receives first initial state information returned by the internet of things device based on the initial switching instructions, wherein the initial switching instructions are switching instructions which are acquired earliest in the at least two switching instructions.
And S104, if the target state information is inconsistent with the first initial state information and the preset zone bit is the first target value, maintaining to display the target state information on the interface.
Because the target state information corresponding to the final switching instruction is displayed on the terminal at present, when the first initial state information returned by the internet of things equipment based on the initial switching instruction is received, the target state information is inconsistent with the first initial state information. If the preset zone bit is the first target value, the state information which is not returned yet exists in the internet of things equipment, and therefore the target state information is maintained to be displayed on the interface.
For example, when the terminal receives the initial switching instruction, the intermediate switching instruction and the final switching instruction, the terminal sequentially displays the state information corresponding to the initial switching instruction, the state information corresponding to the intermediate switching instruction and the target state information corresponding to the final switching instruction on the interface, that is, the target state information is displayed on the interface finally. After the initial switching instruction is executed by the internet of things equipment, the first initial state information is returned to the terminal.
At this time, the first initial state information is inconsistent with the target state information, and the preset flag bit is the first target value, so that the target state information is maintained to be displayed on the interface.
And then receiving second initial state information returned by the Internet of things equipment based on the intermediate switching instruction, and if the second initial state information is inconsistent with the target state information, maintaining to display the target state information on the interface.
And finally, receiving third initial state information returned by the Internet of things equipment based on the final switching instruction, wherein at the moment, the third initial state information is consistent with the target state information, displaying the target state information on the interface, and changing the preset zone bit into a second target value, so that the interface does not need to jump frequently.
As can be seen from the above, in the embodiment of the present application, at least two switching instructions for the internet of things device connected to the terminal are acquired first, and the target state information corresponding to the final switching instruction is displayed on the interface of the terminal, where the final switching instruction is the last acquired switching instruction of the at least two switching instructions. And then, sending at least two switching instructions to the Internet of things equipment connected with the terminal, and setting a preset zone bit on the terminal as a first target value, wherein the first target value indicates that the terminal is waiting for the state information returned by the Internet of things equipment. And then receiving first initial state information returned by the Internet of things equipment based on the initial switching instruction, wherein the initial switching instruction is the switching instruction which is acquired earliest in the at least two switching instructions. If the target state information is inconsistent with the first initial state information and the preset zone bit is the first target value, the target state information is maintained to be displayed on the interface.
In the embodiment of the application, when the target state information is inconsistent with the first initial state information, the target state information is updated to the first initial state information, and the preset zone bit is checked, and because the first target value indicates that the state information is waiting for the internet of things equipment to return, if the preset zone bit is the first target value, it is indicated that the internet of things equipment has the state information which is not returned yet, at the moment, the target state is maintained to be displayed on the interface, so that the interface does not jump frequently.
In some embodiments, when the target state information is consistent with the first initial state information, the preset flag bit is set to a second target value (the second target value may be a false or 1), where the second target value indicates that the state information is not waiting for the internet of things device to return. However, when the same switching instruction exists in at least two switching instructions, an error occurs in setting the preset flag bit to the second target value if the target state information is identical to the first initial state information.
For example, when the terminal receives the initial switching instruction, the intermediate switching instruction and the final switching instruction, the initial switching instruction and the final switching instruction are the same switching instruction (for example, the initial switching instruction and the final switching instruction are both instructions for switching the temperature of the air conditioner to 28 ℃), when the terminal receives first initial state information returned by the internet of things equipment based on the initial switching instruction, the target state information is consistent with the first initial state, and the preset zone bit is a first target value, the target state information is maintained to be displayed on the interface, and the preset zone bit is set to a second target value.
When the terminal receives second initial state information returned by the Internet of things equipment based on the intermediate switching instruction, the second initial state information is inconsistent with the target state information, but at the moment, the preset zone bit is a second target value, and an error occurs.
Thus, in other embodiments, after receiving the first initial state information returned by the internet of things device based on the initial switching instruction, the method further includes:
if the target state information is consistent with the first initial state information, starting a timer;
when the timing time of the timer reaches the first preset time, setting a preset zone bit to be a second target value, wherein the second target value indicates that the state information is not returned by the equipment waiting for the Internet of things.
In this embodiment, if the target state information is consistent with the first initial state information, the preset flag bit is not set to the second target value immediately, but is set to the second target value after the timing time of the timer reaches the first preset time. In the process of timing by the timer, the second initial state information is received, and even if the second initial state information is inconsistent with the target state information, the preset flag bit is still the first target value at this time, so that no error occurs. Therefore, in the present embodiment, even if the same switching instruction exists in at least two switching instructions, an error can be made not to occur.
Because the terminal sets the preset flag bit as the second target value after the timing time of the timer reaches the first preset time. Therefore, the terminal may receive the switching instruction again during the timing of the timer, and thus, in other embodiments, after acquiring at least two switching instructions for the internet of things device connected to the terminal, the method further includes:
Determining the state of a timer;
if the state of the timer is a timing state, the state of the timer is modified to be an untimed state.
In other embodiments, before acquiring at least two switching instructions for the internet of things device connected to the terminal, the method further includes:
and setting a preset zone bit and setting the preset zone bit as a second target value.
In this embodiment, the preset flag bit is set as the second target value by default, and when the terminal receives the switching instruction, the second target value is set as the first target value.
Because the internet of things device can bind two users, i.e. the internet of things device can bind two terminals, one is a master terminal and the other is a slave terminal. Therefore, when the slave terminal transmits the slave switching instruction to the internet of things device, the internet of things device can transmit slave state information corresponding to the slave switching instruction to the master terminal. If the slave state information is inconsistent with the current state information of the interface of the master terminal, the current state information on the interface is updated to the slave state information.
If the master terminal defaults the preset zone bit to be the second target value, and the master terminal sets the preset zone bit to be the first target value after receiving the switching instruction, when the slave state information actively sent by the internet of things equipment is received, the master terminal does not receive the switching instruction, so that at the moment, the preset zone bit is the second target value. Therefore, in other embodiments, if the slave state information is inconsistent with the current state information of the interface, and the preset flag bit is the second target value, the current state information of the interface is updated to the slave state information.
In other embodiments, since the slave terminal may also send a plurality of slave switching instructions to the internet of things device, in order for the interface to hop infrequently, if the slave state information is inconsistent with the current state information of the interface, and the preset flag bit is the second target value, the current state information of the interface is not immediately updated to the slave state information, but a timer is started. And when the timing time of the timer reaches a second preset time, updating the current state information of the interface into slave state information.
The terminal updates the current state information of the interface into the slave state information only when the timing time of the timer reaches the second preset time, so that the terminal can store the slave state information into the local database after receiving the slave state information, acquire the slave state information from the local database when the timing time of the timer reaches the second preset time, and finally update the current state information of the interface into the slave state information.
The method described in the above embodiments is described in further detail below by way of example.
In this embodiment, an information display device is integrated in a terminal, refer to fig. 2, and fig. 2 is a schematic diagram of an information display method according to an embodiment of the present application. The information display method may include:
And the terminal sets the preset flag as false, wherein false indicates that the terminal is not waiting for the state information returned by the Internet of things equipment. The terminal acquires at least two switching instructions, displays target state information corresponding to the final switching instructions on an interface of the terminal, wherein the final switching instructions are the switching instructions which are finally acquired from the at least two switching instructions, and sends the at least two switching instructions to the Internet of things equipment connected with the terminal.
It is determined whether the timer is in a timed state. If the state of the timer is a timing state, the terminal modifies the state of the timer to an untimed state.
And setting the flag to true, wherein true indicates that the terminal is waiting for the equipment of the Internet of things to return the state information. And then receiving first initial state information returned by the Internet of things equipment based on the initial switching instruction, wherein the initial switching instruction is the switching instruction which is acquired earliest in the at least two switching instructions.
If the target state information is inconsistent with the first initial state information and the flag is true, the target state information is maintained to be displayed on the interface.
If the target state information is consistent with the first initial state information, a timer is started. When the timing time of the timer reaches the first preset time, the flag is set to false.
If the terminal receives the slave state information actively sent by the Internet of things equipment, the slave state information is inconsistent with the current state information of the interface, and the flag is false, a timer is started, and the slave state information is stored in a local database. When the timing time of the timer reaches the second preset time, the slave state information is acquired from the local database, and the current state information of the interface is updated to the slave state information.
The specific implementation manner and the corresponding beneficial effects in this embodiment may refer to the above information display method embodiment, and the present application is not described herein.
In order to facilitate better implementation of the information display method provided by the embodiment of the application, the embodiment of the application also provides a device based on the information display method. The meaning of the nouns is the same as that of the information display method, and specific implementation details can be referred to the description of the method embodiment.
For example, as shown in fig. 3, the information display apparatus may include:
the acquiring module 301 is configured to acquire at least two switching instructions for an internet of things device connected to a terminal, display target state information corresponding to a final switching instruction on an interface of the terminal, where the final switching instruction is a switching instruction that is finally acquired from the at least two switching instructions;
The sending module 302 is configured to send at least two switching instructions to the internet of things device, and set a flag bit preset on the terminal to a first target value, where the first target value indicates that the terminal is waiting for the state information returned by the internet of things device;
the receiving module 303 is configured to receive first initial state information returned by the internet of things device based on an initial switching instruction, where the initial switching instruction is a switching instruction that is acquired earliest in at least two switching instructions;
the maintaining module 304 is configured to maintain displaying the target state information on the interface if the target state information is inconsistent with the first initial state information and the preset flag bit is the first target value.
Optionally, the information display device further includes:
the starting module is used for starting a timer if the target state information is consistent with the first initial state information; when the timing time of the timer reaches the first preset time, setting a preset zone bit to be a second target value, wherein the second target value indicates that the state information is not returned by the equipment waiting for the Internet of things.
Optionally, the information display device further includes:
the state determining module is used for determining the state of the timer; if the state of the timer is a timing state, the state of the timer is modified to be an untimed state.
Optionally, the information display device further includes:
the setting module is used for setting a preset zone bit and setting the preset zone bit as a second target value.
Optionally, the receiving module 303 is further configured to perform:
the method comprises the steps of receiving slave state information actively sent by the internet of things equipment, wherein the slave state information is sent by the internet of things equipment after receiving a slave switching instruction sent by a slave terminal;
accordingly, the information display device further includes:
and the updating module is used for updating the current state information of the interface into the slave state information if the slave state information is inconsistent with the current state information of the interface.
Optionally, the updating module is specifically configured to perform:
if the slave state information is inconsistent with the current state information of the interface and the preset zone bit is the second target value, the current state information of the interface is updated to the slave state information.
Optionally, the updating module is specifically configured to perform:
if the slave state information is inconsistent with the current state information of the interface and the preset zone bit is the second target value, starting a timer;
and when the timing time of the timer reaches a second preset time, updating the current state information of the interface into slave state information.
In the specific implementation, each module may be implemented as an independent entity, or may be combined arbitrarily, and implemented as the same entity or a plurality of entities, and the specific implementation and the corresponding beneficial effects of each module may be referred to the foregoing method embodiments, which are not described herein again.
The embodiment of the application also provides an electronic device, which may be a server or a terminal, as shown in fig. 4, and shows a schematic structural diagram of the electronic device according to the embodiment of the application, specifically:
the electronic device may include one or more processing cores 'processors 401, one or more computer-readable storage media's memory 402, power supply 403, and input unit 404, among other components. Those skilled in the art will appreciate that the electronic device structure shown in fig. 4 is not limiting of the electronic device and may include more or fewer components than shown, or may combine certain components, or may be arranged in different components. Wherein:
the processor 401 is a control center of the electronic device, connects various parts of the entire electronic device using various interfaces and lines, and performs various functions of the electronic device and processes data by running or executing computer programs and/or modules stored in the memory 402, and calling data stored in the memory 402, thereby performing overall monitoring of the electronic device. Optionally, processor 401 may include one or more processing cores; preferably, the processor 401 may integrate an application processor and a modem processor, wherein the application processor mainly processes an operating system, a user interface, an application program, etc., and the modem processor mainly processes wireless communication. It will be appreciated that the modem processor described above may not be integrated into the processor 401.
The memory 402 may be used to store computer programs and modules, and the processor 401 executes various functional applications and data processing by executing the computer programs and modules stored in the memory 402. The memory 402 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, a computer program (such as a sound playing function, an image playing function, etc.) required for at least one function, and the like; the storage data area may store data created according to the use of the electronic device, etc. In addition, memory 402 may include high-speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid-state storage device. Accordingly, the memory 402 may also include a memory controller to provide the processor 401 with access to the memory 402.
The electronic device further comprises a power supply 403 for supplying power to the various components, preferably the power supply 403 may be logically connected to the processor 401 by a power management system, so that functions of managing charging, discharging, and power consumption are performed by the power management system. The power supply 403 may also include one or more of any of a direct current or alternating current power supply, a recharging system, a power failure detection circuit, a power converter or inverter, a power status indicator, and the like.
The electronic device may further comprise an input unit 404, which input unit 404 may be used for receiving input digital or character information and generating keyboard, mouse, joystick, optical or trackball signal inputs in connection with user settings and function control.
Although not shown, the electronic device may further include a display unit or the like, which is not described herein. In particular, in this embodiment, the processor 401 in the electronic device loads executable files corresponding to the processes of one or more computer programs into the memory 402 according to the following instructions, and the processor 401 executes the computer programs stored in the memory 402, so as to implement various functions, for example:
acquiring at least two switching instructions aiming at the Internet of things equipment connected with the terminal, and displaying target state information corresponding to the final switching instruction on an interface of the terminal, wherein the final switching instruction is the switching instruction finally acquired from the at least two switching instructions;
at least two switching instructions are sent to the Internet of things equipment, a preset zone bit on the terminal is set to be a first target value, and the first target value indicates that the terminal is waiting for the state information returned by the Internet of things equipment;
Receiving first initial state information returned by the Internet of things equipment based on an initial switching instruction, wherein the initial switching instruction is the switching instruction which is acquired earliest in at least two switching instructions;
if the target state information is inconsistent with the first initial state information and the preset zone bit is the first target value, the target state information is maintained to be displayed on the interface.
The specific embodiments and the corresponding beneficial effects of the above operations can be referred to the detailed description of the information display method, and are not described herein.
It will be appreciated by those of ordinary skill in the art that all or part of the steps of the various methods of the above embodiments may be performed by a computer program, or by computer program control related hardware, which may be stored in a computer readable storage medium and loaded and executed by a processor.
To this end, an embodiment of the present application provides a computer-readable storage medium in which a computer program is stored, the computer program being capable of being loaded by a processor to perform the steps of any one of the information display methods provided by the embodiment of the present application. For example, the computer program may perform the steps of:
Acquiring at least two switching instructions aiming at the Internet of things equipment connected with the terminal, and displaying target state information corresponding to the final switching instruction on an interface of the terminal, wherein the final switching instruction is the switching instruction finally acquired from the at least two switching instructions;
at least two switching instructions are sent to the Internet of things equipment, a preset zone bit on the terminal is set to be a first target value, and the first target value indicates that the terminal is waiting for the state information returned by the Internet of things equipment;
receiving first initial state information returned by the Internet of things equipment based on an initial switching instruction, wherein the initial switching instruction is the switching instruction which is acquired earliest in at least two switching instructions;
if the target state information is inconsistent with the first initial state information and the preset zone bit is the first target value, the target state information is maintained to be displayed on the interface.
The specific embodiments and the corresponding beneficial effects of each of the above operations can be found in the foregoing embodiments, and are not described herein again.
Wherein the computer-readable storage medium may comprise: read Only Memory (ROM), random access Memory (RAM, random Access Memory), magnetic or optical disk, and the like.
Since the computer program stored in the computer readable storage medium may execute the steps in any information display method provided by the embodiments of the present application, the beneficial effects that any information display method provided by the embodiments of the present application can be achieved, which are detailed in the previous embodiments and are not described herein.
Wherein according to an aspect of the application, a computer program product or a computer program is provided, the computer program product or computer program comprising computer instructions stored in a computer readable storage medium. The processor of the computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device performs the above-described information display method.
The foregoing has described in detail the methods, apparatuses, electronic devices and computer readable storage medium for displaying information provided by the embodiments of the present application, and specific examples have been applied to illustrate the principles and embodiments of the present application, and the above description of the embodiments is only for aiding in understanding the methods and core ideas of the present application; meanwhile, as those skilled in the art will have variations in the specific embodiments and application scope in light of the ideas of the present application, the present description should not be construed as limiting the present application.

Claims (10)

1. An information display method, comprising:
acquiring at least two switching instructions aiming at the Internet of things equipment connected with a terminal, and displaying target state information corresponding to a final switching instruction on an interface of the terminal, wherein the final switching instruction is a switching instruction finally acquired from the at least two switching instructions;
the at least two switching instructions are sent to the Internet of things equipment, and a preset zone bit on the terminal is set to be a first target value, wherein the first target value indicates that the terminal is waiting for the Internet of things equipment to return state information;
receiving first initial state information returned by the Internet of things equipment based on an initial switching instruction, wherein the initial switching instruction is the switching instruction which is acquired earliest in the at least two switching instructions;
and if the target state information is inconsistent with the first initial state information and the preset zone bit is the first target value, maintaining to display the target state information on the interface.
2. The information display method according to claim 1, further comprising, after the receiving the first initial state information returned by the internet of things device based on the initial switching instruction:
If the target state information is consistent with the first initial state information, starting a timer;
when the timing time of the timer reaches the first preset time, setting the preset flag bit to be a second target value, wherein the second target value indicates that the state information is not returned by the equipment waiting for the Internet of things.
3. The information display method according to claim 2, further comprising, after the acquiring at least two switching instructions for the internet of things device connected to the terminal:
determining a state of the timer;
and if the state of the timer is a timing state, modifying the state of the timer into an untimed state.
4. The information display method according to any one of claims 1 to 3, characterized by further comprising, before the acquiring at least two switching instructions for an internet of things device connected to the terminal:
setting the preset flag bit, and setting the preset flag bit as a second target value.
5. The information display method according to claim 4, characterized by further comprising, after said setting the preset flag bit to the second target value:
The method comprises the steps of receiving slave state information actively sent by the internet of things equipment, wherein the slave state information is sent by the internet of things equipment after receiving a slave switching instruction sent by a slave terminal;
and if the slave state information is inconsistent with the current state information of the interface, updating the current state information of the interface into the slave state information.
6. The information display method according to claim 5, wherein if the slave state information does not coincide with the current state information of the interface, updating the current state information of the interface to the slave state information includes:
and if the slave state information is inconsistent with the current state information of the interface and the preset zone bit is the second target value, updating the current state information of the interface into the slave state information.
7. The method of claim 6, wherein if the slave status information is inconsistent with the current status information of the interface and the preset flag bit is the second target value, updating the current status information of the interface to the slave status information includes:
If the slave state information is inconsistent with the current state information of the interface and the preset flag bit is the second target value, starting a timer;
and when the timing time of the timer reaches a second preset time, updating the current state information of the interface into the slave state information.
8. An information display device, comprising:
the terminal comprises an acquisition module, a display module and a display module, wherein the acquisition module is used for acquiring at least two switching instructions aiming at the Internet of things equipment connected with the terminal, and displaying target state information corresponding to a final switching instruction on an interface of the terminal, wherein the final switching instruction is the switching instruction finally acquired in the at least two switching instructions;
the sending module is used for sending the at least two switching instructions to the internet of things equipment, and setting a preset zone bit on the terminal as a first target value, wherein the first target value indicates that the terminal is waiting for the state information returned by the internet of things equipment;
the receiving module is used for receiving first initial state information returned by the Internet of things equipment based on initial switching instructions, wherein the initial switching instructions are switching instructions which are obtained earliest in the at least two switching instructions;
And the maintaining module is used for maintaining the display of the target state information on the interface if the target state information is inconsistent with the first initial state information and the preset zone bit is the first target value.
9. An electronic device comprising a processor and a memory, the memory storing a computer program, the processor being configured to execute the computer program in the memory to perform the information display method of any one of claims 1 to 7.
10. A computer readable storage medium, characterized in that the computer readable storage medium stores a computer program adapted to be loaded by a processor for performing the information display method of any one of claims 1 to 7.
CN202111580088.5A 2021-12-22 2021-12-22 Information display method, information display device, electronic equipment and computer readable storage medium Active CN114327331B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111580088.5A CN114327331B (en) 2021-12-22 2021-12-22 Information display method, information display device, electronic equipment and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111580088.5A CN114327331B (en) 2021-12-22 2021-12-22 Information display method, information display device, electronic equipment and computer readable storage medium

Publications (2)

Publication Number Publication Date
CN114327331A CN114327331A (en) 2022-04-12
CN114327331B true CN114327331B (en) 2023-09-19

Family

ID=81054611

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111580088.5A Active CN114327331B (en) 2021-12-22 2021-12-22 Information display method, information display device, electronic equipment and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN114327331B (en)

Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2010012608A1 (en) * 2008-07-31 2010-02-04 International Business Machines Corporation Transport control channel program processing
CN106302055A (en) * 2016-09-26 2017-01-04 Tcl集团股份有限公司 The synchronous updating method of a kind of smart machine state and system
JP2017022568A (en) * 2015-07-10 2017-01-26 ブラザー工業株式会社 Image processing apparatus
CN108224683A (en) * 2017-12-28 2018-06-29 惠州Tcl家电集团有限公司 Method of data synchronization, user equipment and computer readable storage medium
CN109874042A (en) * 2017-12-05 2019-06-11 中兴通讯股份有限公司 A kind of method, apparatus and terminal of controlling terminal
CN110119243A (en) * 2019-05-17 2019-08-13 北京达佳互联信息技术有限公司 Command processing method, device, terminal and storage medium
CN112099968A (en) * 2020-08-26 2020-12-18 珠海格力电器股份有限公司 Equipment control method, device, system, storage medium and electronic device
CN112291373A (en) * 2020-12-29 2021-01-29 武汉慧联无限科技有限公司 Control method and device of Internet of things equipment, controller and storage medium
CN112822594A (en) * 2021-01-14 2021-05-18 深圳市芯中芯科技有限公司 Interaction method and system based on Bluetooth headset
CN113507500A (en) * 2021-06-04 2021-10-15 上海闻泰信息技术有限公司 Terminal control method, terminal control device, computer equipment and computer-readable storage medium
CN113783968A (en) * 2019-10-14 2021-12-10 支付宝(杭州)信息技术有限公司 Method and device for generating prompt message and mobile terminal

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP2731297B8 (en) * 2012-11-12 2020-03-11 Samsung Electronics Co., Ltd Method for transmitting user interface
EP3484134B1 (en) * 2015-02-02 2022-03-23 Apple Inc. Device, method, and graphical user interface for establishing a relationship and connection between two devices

Patent Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2010012608A1 (en) * 2008-07-31 2010-02-04 International Business Machines Corporation Transport control channel program processing
JP2017022568A (en) * 2015-07-10 2017-01-26 ブラザー工業株式会社 Image processing apparatus
CN106302055A (en) * 2016-09-26 2017-01-04 Tcl集团股份有限公司 The synchronous updating method of a kind of smart machine state and system
CN109874042A (en) * 2017-12-05 2019-06-11 中兴通讯股份有限公司 A kind of method, apparatus and terminal of controlling terminal
CN108224683A (en) * 2017-12-28 2018-06-29 惠州Tcl家电集团有限公司 Method of data synchronization, user equipment and computer readable storage medium
CN110119243A (en) * 2019-05-17 2019-08-13 北京达佳互联信息技术有限公司 Command processing method, device, terminal and storage medium
CN113783968A (en) * 2019-10-14 2021-12-10 支付宝(杭州)信息技术有限公司 Method and device for generating prompt message and mobile terminal
CN112099968A (en) * 2020-08-26 2020-12-18 珠海格力电器股份有限公司 Equipment control method, device, system, storage medium and electronic device
CN112291373A (en) * 2020-12-29 2021-01-29 武汉慧联无限科技有限公司 Control method and device of Internet of things equipment, controller and storage medium
CN112822594A (en) * 2021-01-14 2021-05-18 深圳市芯中芯科技有限公司 Interaction method and system based on Bluetooth headset
CN113507500A (en) * 2021-06-04 2021-10-15 上海闻泰信息技术有限公司 Terminal control method, terminal control device, computer equipment and computer-readable storage medium

Also Published As

Publication number Publication date
CN114327331A (en) 2022-04-12

Similar Documents

Publication Publication Date Title
CN106663032B (en) Method and computer-readable storage device for managing tasks on a device
US9478195B2 (en) Transferring state information between electronic devices
US20180107353A1 (en) Electronic device and method for playing multimedia content by electronic device
CN109408751B (en) Data processing method, terminal, server and storage medium
CN109324857B (en) User guide implementation method, device and storage medium
AU2015324794A1 (en) Information sharing method and electronic device thereof
CN103647756A (en) Advertisement broadcasting method, server, client and system
JP5395967B1 (en) Data processing system, information terminal, data processing method, and data processing program
EP3570567B1 (en) Method and device for operating instance resources
US20170134364A1 (en) Note update method and device
CN114221985A (en) Device control method, device, electronic device and computer-readable storage medium
JP2013230226A (en) Game management server apparatus, program for game management server apparatus, and program for terminal device
CN108111598B (en) Cloud disk data issuing method and device and storage medium
CN114327331B (en) Information display method, information display device, electronic equipment and computer readable storage medium
CN115934076B (en) Cross-platform client micro-service providing device and method and electronic equipment
CN112044061A (en) Game picture processing method and device, electronic equipment and storage medium
US20220382599A1 (en) Method and apparatus for processing resource, electronic device and storage medium
US10652157B2 (en) Systems and methods of receiving informational content based on transmitted application information
KR102590347B1 (en) Data management method, electronic device and server for managing data
CN114117178A (en) Information processing method and device and electronic equipment
CN109189498B (en) Android horizontal and vertical screen data synchronization method and device, terminal and readable medium
CN114217833A (en) Application updating method and device, computer equipment and computer-readable storage medium
CN113163257A (en) Screen projection method, device, equipment and storage medium
CN112861041B (en) Media content display method and device, electronic equipment and storage medium
CN117412109A (en) Device connection method, device, electronic device and computer storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant