CN114327331A - 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
CN114327331A
CN114327331A CN202111580088.5A CN202111580088A CN114327331A CN 114327331 A CN114327331 A CN 114327331A CN 202111580088 A CN202111580088 A CN 202111580088A CN 114327331 A CN114327331 A CN 114327331A
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.)
Granted
Application number
CN202111580088.5A
Other languages
Chinese (zh)
Other versions
CN114327331B (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

Images

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 obtained, and target state information corresponding to the final switching instruction is displayed on an interface of the terminal; sending at least two switching instructions to the Internet of things equipment, and setting a flag bit preset on the terminal as 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 acquired earliest in 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 the display of the target state information on the interface. The method and the device for achieving the interface jump can solve the problem of frequent jump of the interface.

Description

Information display method, information display device, electronic equipment and computer readable storage medium
Technical Field
The present application relates to the field of intelligent device technologies, and in particular, to an information display method and apparatus, 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, the internet of things equipment is generally controlled through an application program. When the internet of things equipment is controlled through the application program, the state information of the interface of the application program needs to be kept consistent with the state information of the internet of things equipment. And if the difference is not consistent, the state information of the interface of the application program needs to be updated to the state information of the equipment of the Internet of things.
However, since the speed of updating the state information of the interface of the application program based on the instruction is high, and the speed of returning the state information of the internet of things device to the application program is low, when a plurality of switching instructions are received in a short time, that is, when a user frequently clicks a 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, and 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 for 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 acquired last in the at least two switching instructions;
sending the at least two switching instructions to the internet of things equipment, and setting a flag bit preset on the terminal as 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 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 flag bit is a first target value, maintaining the display of the target state information on the interface.
Optionally, after receiving the first initial state information returned by the internet of things device based on the initial handover instruction, the method further includes:
if the target state information is consistent with the first initial state information, starting a timer;
and when the timing time of the timer reaches a first preset time, setting the preset zone bit as a second target value, wherein the second target value indicates that the internet of things equipment is not waiting for returning the state information.
Optionally, after the obtaining of the at least two handover 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 obtaining of the at least two handover instructions for the internet of things device connected to the terminal, the method further includes:
and setting the preset zone bit as a second target value.
Optionally, after the setting of the preset flag to the second target value, the method further includes:
receiving slave state information actively sent by the Internet of things equipment, wherein the slave state information is state information 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 not consistent with the current state information of the interface, updating the current state information of the interface to the slave state information.
Optionally, if the slave state information does not match 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 flag bit is the second target value, updating the current state information of the interface to the slave state information.
Optionally, if the slave status information is not consistent with the current status information of the interface and the preset flag 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 the timer;
and updating the current state information of the interface to the slave state information when the time counted by the timer reaches a second preset time.
Accordingly, an embodiment of the present application provides an information display device, including:
the terminal comprises an acquisition module, a display module and a processing module, wherein the acquisition module is used for acquiring at least two switching instructions for 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, and the final switching instruction is the switching instruction acquired last in the at least two switching instructions;
a sending module, configured to send the 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 internet of things device to return status information;
a receiving module, 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 obtained earliest in the at least two switching instructions;
and a maintaining module, configured to maintain the target state information displayed on the interface if the target state information is inconsistent with the first initial state information and the preset flag is a first target value.
In addition, an electronic device is further provided in an embodiment of the present application, and includes a processor and a memory, where the memory stores a computer program, and the processor is configured to run the computer program in the memory to implement the information display method provided in the embodiment of the present application.
In addition, an embodiment of the present application further provides a computer-readable storage medium, where a computer program is stored, and the computer program is suitable for being loaded by a processor to execute any one of the information display methods provided in the embodiment of the present application.
In addition, the embodiment of the present application further provides a computer program product, which includes a computer program, and when the computer program is executed by a processor, the computer program implements any one of the information display methods provided in the embodiment of the present application.
In the embodiment of the application, at least two switching instructions for the internet of things equipment connected with the terminal are obtained 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 obtained last in the at least two switching instructions. And then sending the at least two switching instructions to the Internet of things equipment connected with the terminal, and setting a flag bit preset on the terminal as 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. 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 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 the display of the target state information on the interface.
That is, in the embodiment of the 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 a preset flag is checked, because the first target value indicates that the internet of things equipment is waiting for the state information to be returned, if the preset flag is the first target value, it indicates that the internet of things equipment has the state information that has not been returned, 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 in the embodiments of the present application, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
Fig. 1 is a schematic flowchart of an information display method provided in an embodiment of the present application;
fig. 2 is a schematic flow chart of another information display method provided in the 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 provided in an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present 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, and the electronic device 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 basic cloud computing services such as cloud service, a cloud database, cloud computing, a cloud function, cloud storage, Network service, cloud communication, middleware service, domain name service, security service, Network acceleration service (CDN), big data and an artificial intelligence platform.
The terminal may be, but is not limited to, a smart phone, a tablet computer, a laptop 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 application is not limited herein.
In addition, "a 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 the description, and are not to be construed as implying relative importance.
The following are detailed below. It should be noted that the following description of the embodiments is not intended to limit the preferred order of the embodiments.
When the internet of things equipment is controlled through the application program, the state information of the interface of the application program needs to be kept consistent with the state information of the internet of things equipment. And if the difference is not consistent, the state information of the interface of the application program needs to be updated to the state information of the equipment of the Internet of things.
However, since the speed of updating the state information of the interface of the application program based on the instruction is high, and the speed of returning the state information of the internet of things device to the application program is low, when a plurality of switching instructions are received in a short time, that is, when a user frequently clicks a 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 a first switching instruction, the interface of the application program displays 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, the application program receives a second switching instruction, displays the state information corresponding to the second switching instruction on the interface, and sends the second switching instruction to the internet of things device.
If the state information returned by the internet of things device based on the first switching instruction is received, 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 device based on the first switching instruction because the state information corresponding to the second switching instruction is displayed on the interface.
And then receiving 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, 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 jumped.
In order to solve the problem that an interface jumps frequently, the application provides an information display method, in the method, at least two switching instructions for Internet of things equipment connected with a terminal are obtained, target state information corresponding to a final switching instruction is displayed on the interface of the terminal, and the final switching instruction is the last obtained switching instruction in the at least two switching instructions. And then sending the at least two switching instructions to the Internet of things equipment connected with the terminal, and setting a flag bit preset on the terminal as 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. 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 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 the display of the target state information on the interface.
That is, in the embodiment of the 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 a preset flag is checked, because the first target value indicates that the internet of things equipment is waiting for the state information to be returned, if the preset flag is the first target value, it indicates that the internet of things equipment has the state information that has not been returned, 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 a 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 flag bit preset on the terminal to be a first target value. And when the state information returned by the Internet of things equipment based on the first switching instruction is not received, the application program receives the second switching instruction, displays the state information corresponding to the second switching instruction on the interface, and sends the second switching instruction 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, although the state information corresponding to the second switching instruction is displayed on the interface at the moment, the preset flag bit is set to be the first target value to indicate that the state information corresponding to the second switching instruction which is not returned 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 when the state information returned by the internet of things equipment based on the second switching instruction is received subsequently, 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 is not required to be updated. Therefore, in the embodiment of the application, the interface can not jump frequently.
In the present embodiment, the information display device will be described in terms of being specifically integrated in a device such as a server or a terminal, and for convenience of description of the information display method of the present application, the information display device will be described in detail below with the information display device integrated in the terminal, that is, with the terminal as an execution subject.
Referring to fig. 1, fig. 1 is a schematic flow chart illustrating an information display method according to an embodiment of the present application. The information display method may include:
s101, at least two switching instructions for the Internet of things equipment connected with the terminal are obtained, 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 obtained in the last of the at least two switching instructions.
When a user wants to switch the current state of the Internet of things equipment, the user can operate the terminal, and the terminal responds to the operation of the user to obtain a switching instruction.
When the terminal receives at least two switching instructions, the terminal displays the state information corresponding to the switching instruction received firstly on the interface of the terminal, and then displays the state information corresponding to the switching instruction received later, so that the target state information corresponding to the final switching instruction is displayed on the interface finally.
For example, the terminal receives the first switching instruction first and then receives the second switching instruction, at this time, the final switching instruction is the second switching instruction, the terminal displays the state information corresponding to the first switching instruction on the interface first, 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.
It should be noted that, when the internet of things device is controlled by the application program on the terminal, the user may operate on the application program on the terminal, and the state information corresponding to the switching instruction may be displayed on the interface of the application program. If the Internet of things equipment is controlled through the remote control, the user can operate on the remote control, and the state information corresponding to the switching instruction can be displayed on a remote control interface.
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 the terminal.
The internet of things equipment connected with the terminal is equipment for executing the switching instruction. When receiving at least two switching instructions, the terminal can already establish connection with the internet of things device, and the terminal can also establish connection with the internet of things device based on the switching instructions after receiving the switching instructions.
The switching instruction refers to an instruction for switching a 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 for switching a temperature of the air conditioner from 26 degrees celsius to 28 degrees celsius, an instruction for switching a humidity of the air conditioner from 40% to 50%, and an instruction for switching a 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 command is a command for switching the temperature of the air conditioner from 26 degrees celsius to 28 degrees celsius, the state information corresponding to the switching command is 28 degrees celsius.
S102, at least two switching instructions are sent to the Internet of things equipment, a flag bit preset on the terminal is set to be a first target value, and the first target value indicates that the terminal is waiting for the Internet of things equipment to return state information.
After the terminal acquires the at least two switching instructions, the at least two switching instructions are sent to the Internet of things equipment, so that the Internet of things equipment can execute the at least two switching instructions. And the terminal sets the preset flag bit as a first target value. Namely, after the terminal acquires the switching instruction, the terminal sets the preset flag bit as the first target value.
The preset flag bit may be implemented in the form of a global variable. The first target value may be true or 0.
In the process of sending the 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 for obtaining the at least two switching instructions, namely, the terminal sends the switching instruction received firstly to the internet of things equipment, and sends the switching instruction 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 establish a connection with the internet of things device before the terminal sends the at least two switching instructions to the internet of things device. The connection mode includes, but is not limited to, bluetooth connection, Access Point (AP), Near Field Communication (NFC) connection, local area network (lan) connection, and the like.
S103, 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 acquired earliest in the at least two switching instructions.
The Internet of things equipment executes the switching instruction received firstly when receiving the at least two switching instructions, and returns state information corresponding to the switching instruction received firstly to the terminal after executing the switching instruction received firstly. And after the switching instruction is executed, returning the state information corresponding to the switching instruction received later to the terminal after the switching instruction received earlier after the execution is finished.
For example, the internet of things device receives a first switching instruction, receives a second switching instruction, and receives a third switching instruction, the internet of things device executes the first switching instruction, returns first initial state information corresponding to the first switching instruction to the terminal, executes the second switching instruction, returns second initial state information corresponding to the second switching instruction to the terminal, and 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 the 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 instruction, and the initial switching instruction is the switching instruction 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 the display of the target state information on the interface.
Since 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 device based on the initial switching instruction is received, the target state information is inconsistent with the first initial state information. If the preset flag bit is the first target value, it indicates that the internet of things device has status information which is not returned yet, and therefore the target status 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 state information corresponding to the initial switching instruction, state information corresponding to the intermediate switching instruction, and target state information corresponding to the final switching instruction on the interface, that is, finally displays the target state information on the interface. After the Internet of things equipment executes the initial switching instruction, 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, 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, wherein at the moment, the second initial state information is inconsistent with the target state information, and then maintaining the display of the target state information on the interface.
And finally, third initial state information returned by the Internet of things equipment based on the final switching instruction is received, at the moment, the third initial state information is consistent with the target state information, the target state information is maintained to be displayed on the interface, and the preset zone bit is changed 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 application, at least two switching instructions for the internet of things device connected to the terminal are obtained 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 switching instruction obtained last in the at least two switching instructions. And then sending the at least two switching instructions to the Internet of things equipment connected with the terminal, and setting a flag bit preset on the terminal as 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. 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 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 the display of the target state information on the interface.
That is, 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, but a preset flag is checked, because the first target value indicates that the internet of things device is waiting for returning the state information, if the preset flag is the first target value, it indicates that the internet of things device has the state information that has not been returned, at this time, the target state is maintained to be displayed on the interface, so that the interface does not frequently jump.
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 set to false or 1), where the second target value indicates that the internet of things device is not waiting for returning the state information. However, when the same switching instruction exists in at least two switching instructions, if the target state information is consistent with the first initial state information, an error may occur in setting the preset flag bit to the second target value.
For example, the terminal receives an initial switching instruction, an intermediate switching instruction and a final switching instruction, where 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 degrees celsius), and when the terminal receives first initial state information returned by the internet of things device based on the initial switching instruction, the target state information is consistent with the first initial state, and the preset flag bit is a first target value, the target state information is maintained to be displayed on the interface, and the preset flag bit is set to be a second target value.
When the terminal receives second initial state information returned by the internet of things device based on the intermediate switching instruction, the second initial state information is inconsistent with the target state information, but an error occurs when the preset flag bit is a second target value.
Therefore, in other embodiments, after receiving the first initial state information returned by the internet of things device based on the initial handover 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, the preset zone bit is set to be a second target value, and the second target value indicates that the internet of things equipment is not waiting for returning the state information.
In this embodiment, if the target state information is consistent with the first initial state information, the preset flag bit is not set as the second target value immediately, but is set as the second target value after the time counted by 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, so that errors cannot occur. Therefore, in the present embodiment, it is possible to prevent an error from occurring even if the same switching instruction exists in at least two switching instructions.
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 handover command during the timing of the timer, and in other embodiments, after obtaining at least two handover commands for the internet of things device connected to the terminal, the method further includes:
determining a state of a timer;
and if the state of the timer is a timing state, modifying the state of the timer into an untimed state.
In other embodiments, before obtaining at least two handover 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 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.
The internet of things equipment can bind two users, namely the internet of things equipment can bind two terminals, wherein one terminal is a master terminal and the other terminal is a slave terminal. Therefore, when the slave terminal sends the slave switching instruction to the internet of things device, the internet of things device can send the slave state information corresponding to the slave switching instruction to the master terminal. And if the slave state information is inconsistent with the current state information of the interface of the master terminal, updating the current state information on the interface into the slave state information.
If the preset zone bit is set as the second target value by default by the main terminal, and the preset zone bit is set as the first target value by the main terminal after receiving the switching instruction, the main terminal does not receive the switching instruction when receiving the slave state information actively sent by the internet of things device, so that the preset mark is the second target value at the moment. Therefore, in other embodiments, if the slave status information is not consistent with the current status information of the interface and the preset flag is the second target value, the current status information of the interface is updated to the slave status 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 to make the interface jump 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 to the slave state information when the timing time of the timer reaches the second preset time, so that the terminal can store the slave state information to 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 to the slave state information.
The method described in the above embodiments is further illustrated in detail by way of example.
In the present embodiment, taking an information display device integrated in a terminal as an example, please refer to fig. 2, and fig. 2 is a schematic diagram of an information display method provided in the present embodiment. The information display method may include:
the terminal sets a preset flag bit flag to false, and the 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, target state information corresponding to the final switching instruction is displayed on an interface of the terminal, the final switching instruction is the switching instruction acquired last in the at least two switching instructions, and the at least two switching instructions are sent to the Internet of things equipment connected with the terminal.
It is determined whether the timer is in a timed state. And if the state of the timer is a timing state, the terminal modifies the state of the timer into a non-timing state.
And setting flag to true, wherein true represents 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 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 flag is true, maintaining to display the target state information on the interface.
If the target state information is consistent with the first initial state information, a timer is started. And when the timing time of the timer reaches a first preset time, setting flag to false.
And if the terminal receives 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, starting a timer and storing the slave state information into a local database. And when the timing time of the timer reaches a second preset time, acquiring slave state information from the local database, and updating the current state information of the interface into the slave state information.
The specific implementation manner and the corresponding beneficial effects in this embodiment may refer to the above-mentioned embodiment of the information display method, and are not described herein again.
In order to better implement the information display method provided by the embodiment of the present application, the embodiment of the present application further provides a device based on the information display method. The terms are the same as those in the above information display method, and specific implementation details can be referred to the description in the method embodiment.
For example, as shown in fig. 3, the information display apparatus may include:
the obtaining module 301 is configured to obtain at least two switching instructions for the internet of things device connected to the terminal, and 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 obtained last in the at least two switching instructions;
a sending module 302, 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 internet of things device to return status information;
a receiving module 303, 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 obtained earliest in the at least two switching instructions;
the maintaining module 304 is configured to maintain 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 flag is the first target value.
Optionally, the information display device further comprises:
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, the preset zone bit is set to be a second target value, and the second target value indicates that the internet of things equipment is not waiting for returning the state information.
Optionally, the information display device further comprises:
the state determining module is used for 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, the information display device further comprises:
and 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:
receiving slave state information actively sent by the equipment of the Internet of things, wherein the slave state information is the state information sent by the equipment of the Internet of things 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 update module is specifically configured to perform:
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.
Optionally, the update 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 a 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 specific implementation, the above modules may be implemented as independent entities, or may be combined arbitrarily to be implemented as the same or several entities, and specific implementation manners and corresponding beneficial effects of the above modules may refer to the foregoing method embodiments, which are not described herein again.
An embodiment of the present application further provides an electronic device, where the electronic device may be a server or a terminal, and as shown in fig. 4, a schematic structural diagram of the electronic device according to the embodiment of the present application is shown, specifically:
the electronic device may include components such as a processor 401 of one or more processing cores, memory 402 of one or more computer-readable storage media, a power supply 403, and an input unit 404. Those skilled in the art will appreciate that the electronic device configuration shown in fig. 4 does not constitute a limitation of the electronic device and may include more or fewer components than those shown, or some components may be combined, or a different arrangement of components. Wherein:
the processor 401 is a control center of the electronic device, connects various parts of the whole electronic device by various interfaces and lines, performs various functions of the electronic device and processes data by operating or executing computer programs and/or modules stored in the memory 402 and calling data stored in the memory 402, thereby monitoring the whole electronic device. Optionally, processor 401 may include one or more processing cores; preferably, the processor 401 may integrate an application processor, which mainly handles operating systems, user interfaces, application programs, etc., and a modem processor, which mainly handles wireless communications. 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 operating the computer programs and modules stored in the memory 402. The memory 402 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, a computer program required by at least one function (such as a sound playing function, an image playing function, etc.), and the like; the storage data area may store data created according to use of the electronic device, and the like. Further, the 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 access to the memory 402.
The electronic device further comprises a power supply 403 for supplying power to the various components, and preferably, the power supply 403 is logically connected to the processor 401 through a power management system, so that functions of managing charging, discharging, and power consumption are realized through the power management system. The power supply 403 may also include any component of one or more dc or ac power sources, recharging systems, power failure detection circuitry, power converters or inverters, power status indicators, and the like.
The electronic device may further include an input unit 404, and the input unit 404 may be used to receive input numeric or character information and generate keyboard, mouse, joystick, optical or trackball signal inputs related to user settings and function control.
Although not shown, the electronic device may further include a display unit and the like, which are not described in detail herein. Specifically, in this embodiment, the processor 401 in the electronic device loads the executable file corresponding to the process of one or more computer programs into the memory 402 according to the following instructions, and the processor 401 runs the computer program stored in the memory 402, so as to implement various functions, such as:
acquiring at least two switching instructions for 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 acquired last in the at least two switching instructions;
sending at least two switching instructions to the Internet of things equipment, and setting a flag bit preset on the terminal as 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 acquired earliest in 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 the display of the target state information on the interface.
The above detailed embodiments of the operations and the corresponding advantageous effects may refer to the above detailed description of the information display method, which is not repeated herein.
It will be understood by those skilled in the art that all or part of the steps of the methods of the above embodiments may be performed by a computer program, which may be stored in a computer-readable storage medium and loaded and executed by a processor, or by related hardware controlled by the computer program.
To this end, embodiments of the present application provide a computer-readable storage medium, in which a computer program is stored, where the computer program can be loaded by a processor to execute the steps in any one of the information display methods provided by the embodiments of the present application. For example, the computer program may perform the steps of:
acquiring at least two switching instructions for 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 acquired last in the at least two switching instructions;
sending at least two switching instructions to the Internet of things equipment, and setting a flag bit preset on the terminal as 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 acquired earliest in 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 the display of the target state information on the interface.
The specific implementation of the above operations and the corresponding beneficial effects can be referred to the foregoing embodiments, and are not described herein again.
Wherein the computer-readable storage medium may include: read Only Memory (ROM), Random Access Memory (RAM), magnetic or optical disks, and the like.
Since the computer program stored in the computer-readable storage medium can execute the steps in any information display method provided in the embodiments of the present application, the beneficial effects that can be achieved by any information display method provided in the embodiments of the present application can be achieved, which are detailed in the foregoing embodiments and will not be described herein again.
According to an aspect of the application, there is provided, among other things, a 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 executes the information display method.
The foregoing detailed description is directed to an information display method, an information display apparatus, an electronic device, and a computer-readable storage medium, which are provided by embodiments of the present application, and specific examples are applied in the present application to explain the principles and implementations of the present application, where the descriptions of the foregoing embodiments are only used to help understand the methods and the core ideas of the present application; meanwhile, for those skilled in the art, according to the idea of the present application, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present application.

Claims (10)

1. An information display method, comprising:
acquiring at least two switching instructions for 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 acquired last in the at least two switching instructions;
sending the at least two switching instructions to the Internet of things equipment, and setting a flag bit preset on the terminal as 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 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 a first target value, maintaining the display of the target state information on the interface.
2. The information display method according to claim 1, wherein after the receiving first initial state information returned by the internet of things device based on an initial switching instruction, further comprising:
if the target state information is consistent with the first initial state information, starting a timer;
when the timing time of the timer reaches a first preset time, the preset zone bit is set to be a second target value, and the second target value indicates that the internet of things equipment is not waiting for returning the state information.
3. The information display method according to claim 2, further comprising, after the obtaining of the 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 a non-timing state.
4. The information display method according to any one of claims 1 to 3, wherein before the obtaining of the at least two switching instructions for the Internet of things device connected to the terminal, the method further comprises:
and setting the preset zone bit as a second target value.
5. The information display method according to claim 4, further comprising, after the setting of the preset flag to the second target value:
receiving slave state information actively sent by the equipment of the Internet of things, wherein the slave state information is state information sent by the equipment of the Internet of things 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 to the slave state information.
6. The information display method according to claim 5, wherein if the slave state information is not consistent 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 flag bit is the second target value, updating the current state information of the interface to the slave state information.
7. The information display method according to claim 6, wherein if the slave status information is inconsistent with the current status information of the interface and the preset flag 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 zone 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 to the slave state information.
8. An information display device characterized by comprising:
the terminal comprises an acquisition module, a display module and a processing module, wherein the acquisition module is used for acquiring at least two switching instructions for 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, and the final switching instruction is the switching instruction acquired last 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 flag bit preset on the terminal as 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;
a receiving module, configured to receive first initial state information returned by the internet of things device based on an initial handover instruction, where the initial handover instruction is a handover instruction obtained earliest in the at least two handover instructions;
and the maintaining module is used for maintaining the target state information displayed on the interface if the target state information is inconsistent with the first initial state information and the preset zone bit is a 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 according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that it stores a computer program adapted to be loaded by a processor to execute 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 true CN114327331A (en) 2022-04-12
CN114327331B 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 (13)

* 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
US20140132504A1 (en) * 2012-11-12 2014-05-15 Samsung Electronics Co., Ltd. Method for controlling and displaying electronic apparatus
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
US20190334782A1 (en) * 2015-02-02 2019-10-31 Apple Inc. Device, method, and graphical user interface for establishing a relationship and connection between two devices
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

Patent Citations (13)

* 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
US20140132504A1 (en) * 2012-11-12 2014-05-15 Samsung Electronics Co., Ltd. Method for controlling and displaying electronic apparatus
US20190334782A1 (en) * 2015-02-02 2019-10-31 Apple Inc. Device, method, and graphical user interface for establishing a relationship and connection between two devices
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
CN114327331B (en) 2023-09-19

Similar Documents

Publication Publication Date Title
US10620782B2 (en) Apparatus and method for remotely controlling peripheral devices in mobile communication terminal
CA2955974C (en) Cross device task continuity
CN109324857B (en) User guide implementation method, device and storage medium
CN111282268B (en) Plot showing method, plot showing device, plot showing terminal and storage medium in virtual environment
CN108804153B (en) Application program preloading method and device, storage medium and terminal
EP3262846B1 (en) Sensor data availability from remote devices
CN111124412B (en) Game page drawing method, device, equipment and storage medium
CN103810010A (en) Information processing method and first electronic device terminal
CN114221985A (en) Device control method, device, electronic device and computer-readable storage medium
CN112044061B (en) Game picture processing method and device, electronic equipment and storage medium
CN112163174A (en) Message display method and device, storage medium and computer equipment
CN114327331B (en) Information display method, information display device, electronic equipment and computer readable storage medium
CN105320532B (en) Method, device and terminal for displaying interactive interface
CN115904447A (en) Version updating system, method, electronic equipment and storage medium
CN115762503A (en) Vehicle-mounted voice system, vehicle-mounted voice autonomous learning method, device and medium
CN114116090A (en) Information display method and device, electronic equipment and computer readable storage medium
CN114217833A (en) Application updating method and device, computer equipment and computer-readable storage medium
CN113835846B (en) Method and device for creating k8s cluster and computer-readable storage medium
CN117421070A (en) Data updating method, device, electronic equipment and computer readable storage medium
CN117412109A (en) Device connection method, device, electronic device and computer storage medium
CN116028009A (en) Man-machine interaction method, device, equipment and storage medium in projection display
CN115695414A (en) Test file downloading method and device, computer equipment and storage medium
CN104598258B (en) Application software starting method and device
CN114222361A (en) Information acquisition method and device, computer equipment and computer readable storage medium
CN116599921A (en) Message refreshing method and device, computer equipment and 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