CN113064753B - Host state acquisition method, system, intelligent terminal and storage medium - Google Patents
Host state acquisition method, system, intelligent terminal and storage medium Download PDFInfo
- Publication number
- CN113064753B CN113064753B CN201911399412.6A CN201911399412A CN113064753B CN 113064753 B CN113064753 B CN 113064753B CN 201911399412 A CN201911399412 A CN 201911399412A CN 113064753 B CN113064753 B CN 113064753B
- Authority
- CN
- China
- Prior art keywords
- state
- information
- host
- type identifier
- state type
- 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
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/07—Responding to the occurrence of a fault, e.g. fault tolerance
- G06F11/14—Error detection or correction of the data by redundancy in operation
- G06F11/1402—Saving, restoring, recovering or retrying
- G06F11/1415—Saving, restoring, recovering or retrying at system level
- G06F11/1417—Boot up procedures
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
- G06F9/445—Program loading or initiating
- G06F9/44505—Configuring for program initiating, e.g. using registry, configuration files
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Software Systems (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Quality & Reliability (AREA)
- Computer And Data Communications (AREA)
Abstract
The invention discloses a method and a system for acquiring a host state, an intelligent terminal and a storage medium, wherein the method comprises the following steps: the terminal equipment sends application starting request information to the host; the host responds to the application starting request information and feeds back byte code value information to the terminal equipment; the terminal equipment receives the character of the byte code and acquires a first state type identifier from the information of the byte code; the host sends state change information to the terminal equipment when the state changes; the terminal equipment receives the state change information and acquires a second type identifier from the state change information; and the terminal equipment determines the changed state of the host according to the first state type identifier and the second state type identifier. The invention can timely know the changed state of the host, so as to timely establish communication with the host after the abnormal recovery of the host, improve the communication efficiency and provide convenience for users.
Description
Technical Field
The invention relates to the technical field of intelligent terminals, in particular to a method and a system for acquiring a host state, an intelligent terminal and a storage medium.
Background
With the development of the intelligent terminal becoming faster and faster, the intelligent terminal has gone into thousands of households, and serves as an important role in the life of people. The intelligent terminal often has the phenomenon of no response when in use, for example, when a user needs to start a certain application program, the intelligent terminal does not respond to the starting operation of the user, namely, the starting fails. Which is basically related to the state information of the host. For example, when the board host is in a busy state (busy state), it cannot respond to the user's start request for starting the application; or when the host is in a crash state, the host cannot respond to the user's start request for starting the application.
In the prior art, whether the state of the host changes cannot be known in time, so that communication cannot be established with the host in time after the abnormal recovery of the host, the communication efficiency is affected, and inconvenience is brought to a user.
Thus, there is still a need for improvement and development of the prior art.
Disclosure of Invention
The present invention provides a host status obtaining method, an intelligent terminal and a storage medium, aiming at solving the problem that the prior art cannot timely know whether the status of the host changes, so that communication cannot be timely established with the host after the abnormal recovery of the host.
The technical scheme adopted by the invention for solving the problems is as follows:
in a first aspect, an embodiment of the present invention provides a host status acquiring method, where the host status acquiring method is applied to a terminal device in a host status acquiring system, where the host status acquiring system includes the terminal device and a host communicatively connected to the terminal device; the method comprises the following steps:
sending application starting request information to the host, wherein the application starting request information is used for accessing the host corresponding to a preset application program so as to acquire the state of the host;
receiving byte code value information fed back by the host in response to the application start request information, so as to obtain a first state type identifier according to the byte code information, wherein the first state type identifier is used for reflecting a state type of the host in response to the application start request information;
receiving state change information sent by the host when the state of the host is changed, wherein the state change information comprises a second state type identifier, and the second state type identifier is used for reflecting the state type of the host after the state of the host is changed;
and determining the changed state of the host according to the first state type identifier and the second state type identifier.
In one embodiment, the receiving byte code information fed back by the host in response to the application start request information to obtain a first state type identifier according to the byte code information includes:
receiving the byte code value information which is generated by the host in response to the application starting request and is used for reflecting the state information of the host;
and determining state information of the host and the first state type identifier corresponding to the state information according to the byte code value information, wherein the state information is used for indicating the state type of the host when the host responds to the application starting request.
In one embodiment, the determining, according to the bytecode information, the status information of the host and a first status type identifier corresponding to the status information includes:
acquiring a preset mapping relation table, and determining the state information corresponding to the byte code value information according to the mapping relation table, wherein the mapping relation table stores the corresponding relation between the byte code value information and the state information of the host;
sending state inquiry information to the host according to the state information, wherein the state inquiry information is used for acquiring a first state type identifier corresponding to the state information;
and receiving state type response information generated by the host responding to the state inquiry information, and acquiring the first state type identifier from the state type response information.
In one embodiment, the receiving the state change information sent by the host when the state change occurs, where the state change information includes a second state type identifier, includes:
receiving the state change information sent by the host, wherein the state change information is generated when the state of the host is changed, and the state change information comprises a second state type identifier used for reflecting the state type of the host after the state change and corresponding to the state type;
and analyzing the state change information, and extracting the second state type identifier from the state change information.
In one embodiment, the determining the changed state according to the first state type identifier and the second state type identifier includes:
comparing the first state type identifier with the state identifiers corresponding to the same state information in the second state type identifier one by one to obtain comparison results;
determining state identifiers corresponding to the same state information in the first state type identifier and the second state type identifier and different from each other according to the comparison result;
and determining the changed state of the host according to the different state identifiers.
In a second aspect, an embodiment of the present invention further provides a host status acquiring method, where the host status acquiring method is applied to a host in a host status acquiring system, where the host status acquiring system includes the host and a terminal device in communication connection with the host; the method comprises the following steps:
receiving application starting request information sent by the terminal equipment, wherein the application starting information is used for accessing a host corresponding to a preset application program so as to acquire the state of the host;
generating byte code value information according to the application starting request information, and sending the byte code value information to the terminal equipment, so that the terminal equipment obtains a first state type identifier according to the byte code value information, wherein the first state type identifier is used for reflecting a state type of the host when the host responds to the application starting request information;
when the state of the host is changed, sending state change information to the terminal device, where the state change information includes a second state type identifier, and the second state type identifier is used to reflect the state type of the host after the state change, so that the terminal device determines the changed state of the host according to the first state type identifier and the second state type identifier.
In one embodiment, the generating byte code value information according to the application start request information and sending the byte code value information to the terminal device, so that the terminal device obtains a first state type identifier according to the byte code value information includes:
accessing a preset application program according to the application starting request information;
generating byte code value information for reflecting state information of a host according to the starting state of the application program; the bytecode information is used for determining state information of the host and a first state type identifier corresponding to the state information, and the state information is used for representing a state type when the host responds to the application starting request;
and sending the byte code value information to the terminal equipment.
In one embodiment, the determining the status information of the host and the first status type identifier corresponding to the status information includes:
receiving state inquiry information sent by the host and generated by the terminal equipment according to the state information;
generating state type response information according to the state inquiry information;
and sending the state type response information to the terminal equipment so that the terminal equipment acquires the first state type identifier from the state type response information.
In one embodiment, the sending, when the host changes the state, state change information to the terminal device, where the state change information includes a second state type identifier, includes:
when the state change of the host is monitored, state change information is generated, wherein the state change information comprises a state type used for reflecting the state change of the host and a second state type identifier corresponding to the state type;
and sending the state change information to the terminal equipment so that the terminal equipment determines the changed state of the host according to the first state type identifier and the second state type identifier.
In a third aspect, an embodiment of the present invention further provides a host status acquiring system, where the host status acquiring system includes the terminal device and a host communicatively connected to the terminal device, where,
the terminal device includes:
a request information sending unit, configured to send application start request information to the host, where the application start request information is used to access a host corresponding to a preset application program to obtain a state of the host;
a first identifier receiving unit, configured to receive byte code value information fed back by the host in response to the application start request information, so as to obtain a first state type identifier according to the byte code information, where the first state type identifier is used to reflect a state type of the host in response to the application start request information;
a second identifier information receiving unit, configured to receive state change information sent when a state of the host changes, where the state change information includes a second state type identifier, and the second state type identifier is used to reflect a state type of the host after the state changes;
a state determining unit, configured to determine a state changed by the host according to the first state type identifier and the second state type identifier;
the host computer includes:
a request information receiving unit, configured to receive the application start request information sent by the terminal device;
a first identifier information sending unit, configured to generate byte code value information according to the application start request information, and send the byte code value information to the terminal device, so that the terminal device obtains a first state type identifier according to the byte code value information;
a second identifier information sending unit, configured to send, when a state of the host changes, state change information to the terminal device, where the state change information includes the second state type identifier, and the second state type identifier is used to reflect a state type of the host after the state change occurs, so that the terminal device determines, according to the first state type identifier and the second state type identifier, a state of the host that has changed.
In a fourth aspect, an embodiment of the present invention further provides an intelligent terminal, which includes a memory and one or more programs, where the one or more programs are stored in the memory, and the one or more programs are configured to be executed by the one or more processors, and include a module for executing the host status acquisition method described in any one of the above.
In a fifth aspect, an embodiment of the present invention further provides a non-transitory computer-readable storage medium, where instructions in the storage medium, when executed by a processor of an electronic device, enable the electronic device to perform the host status acquisition method as described in any one of the above.
The invention has the beneficial effects that: the terminal device in the embodiment of the present invention first sends application start request information to the host, where the application start request information is used to access the host corresponding to a preset application program, and therefore the terminal device in this embodiment may actively send the application start request information when starting a certain preset application program. After the host receives the application start request information, the host responds to the application start request information and sends byte code value information to the terminal equipment according to the start state of a preset application program, and the terminal equipment can obtain a first state type identifier according to the byte code value information, wherein the first state type identifier is used for reflecting the state type of the host when the host responds to the application start request information. Then, the host sends state change information to the terminal device when the state changes, and the terminal device can obtain a second state type identifier according to the state change information, wherein the second state type identifier is used for reflecting the state type of the host after the state changes. Therefore, the terminal device determines the changed state of the host according to the state type identifier and the second state type identifier. In other words, the terminal device can obtain which state or which state the host has changed according to the state type of the host when the host responds to the application start request information and the state type obtained after the host generates the state, so as to know the latest state of the host in time, facilitate the terminal device to establish communication with the host in time after the host recovers abnormally, improve communication efficiency, realize data interaction, and provide convenience for users.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments described in the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
Fig. 1 is a flowchart illustrating a host status obtaining method according to a preferred embodiment of the present invention.
Fig. 2 is a flowchart illustrating a host status acquiring method according to an embodiment of the present invention when the host status acquiring method is applied to a terminal device.
Fig. 3 is a schematic flowchart of acquiring a first status type identifier when the host status acquiring method provided by the embodiment of the present invention is applied to a terminal device.
Fig. 4 is a schematic flowchart of acquiring a second status type identifier when the host status acquiring method provided by the embodiment of the present invention is applied to a terminal device.
Fig. 5 is a flowchart illustrating a process of determining a changed state when the host status acquiring method according to the embodiment of the present invention is applied to a terminal device.
Fig. 6 is a flowchart illustrating a specific application embodiment of the host status obtaining method according to an embodiment of the present invention.
Fig. 7 is a flowchart illustrating a host status obtaining method according to an embodiment of the present invention when applied to a host.
Fig. 8 is a schematic flow chart illustrating byte code value information transmission when the host status acquisition method provided in the embodiment of the present invention is applied to a host.
Fig. 9 is a schematic flowchart of sending a second status type identifier when the host status acquiring method provided in the embodiment of the present invention is applied to a host.
Fig. 10 is a schematic block diagram of a host status acquiring system according to an embodiment of the present invention.
Fig. 11 is a schematic block diagram of an internal structure of an intelligent terminal according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention clearer and clearer, the present invention is further described in detail below with reference to the accompanying drawings and examples. It should be understood that the specific embodiments described herein are merely illustrative of the invention and do not limit the invention.
It should be noted that, if directional indications (such as upper, lower, left, right, front, rear, 8230; \8230;) are involved in the embodiment of the present invention, the directional indications are only used to explain the relative positional relationship between the components in a specific posture (as shown in the figure), the motion situation, etc., and if the specific posture is changed, the directional indications are correspondingly changed.
The intelligent terminal often has the phenomenon of no response when in use, for example, when a user needs to start a certain application program, the intelligent terminal does not respond to the starting operation of the user, namely, the starting fails. Which is basically related to the state information of the host. For example, when the board host is in a busy state (busy state), it cannot respond to a start request of a user to start an application; or when the host is in a crash state, the host cannot respond to the user's start request for starting the application. Researchers find that the state change of the host and the latest state of the host cannot be known in time in the prior art, so that the terminal equipment cannot establish communication with the host in time, the communication efficiency is influenced, and inconvenience is brought to the use of a user.
In order to solve the above problem, an embodiment of the present invention provides a method for acquiring a host status, where in the method, a terminal device in the embodiment of the present invention first sends application start request information to a host, where the application start request information is used to access a host corresponding to a preset application program, and therefore the terminal device in this embodiment may actively send the application start request information when starting a certain preset application program, so that the host feeds back its own status information according to a start status of the preset application program. Specifically, after the host receives the application start request information, the host responds to the application start request information and sends byte code value information to the terminal device, and the terminal device may obtain a first state type identifier according to the byte code value information, where the first state type identifier is used to reflect a state type of the host when the host responds to the application start request information. And then, the host sends state change information to the terminal equipment when the state is changed, the terminal equipment can acquire a second state type identifier according to the state change information, and the second state type identifier is used for reflecting the state type of the host after the state is changed. Therefore, the terminal device determines the changed state of the host according to the state type identifier and the second state type identifier. In other words, the terminal device can obtain which or which state the host has changed according to the state type of the host when responding to the application start request information and the state type obtained after the host has occurred, so as to timely know the latest state of the host, facilitate the terminal device to timely establish communication with the host after the host is abnormally recovered, realize data interaction, improve communication efficiency, and provide convenience for users.
For example, when the terminal device starts the wechat program, the application start request information is sent to the host corresponding to the wechat program. The host receives the application starting request information, responds to the application starting request information, and then sends byte code value information to the terminal equipment according to the starting state of the WeChat program. And after receiving the byte code value information, the terminal equipment obtains a first state type identifier according to the byte code value information, and if the obtained first state type identifier is Start OK, link 4 or Busy. Wherein, start OK represents that the starting state of the host computer is successful; link 4 indicates that the communication connection state of the host is to connect 4 applications (that is, 4 applications communicate with the same application); busy indicates that the running state of the host is Busy at this time. At this time, the terminal device acquires each state type of the host when responding to the application start request information. Then, when the busy state of the host changes to an idle state (i.e., the host has changed state), state change information including the second type identifier is sent to the terminal device, and at this time, the second type identifier is Start OK, link 4, and Free. Therefore, by using the first type identifier and the second type identifier, it can be known that the state that the host has changed is the running state of the host, i.e. the running state is changed from Busy state to Free state. Therefore, the terminal equipment can know the state information of the host machine in time so as to establish communication with the host machine in time and realize data interaction.
Exemplary method
The invention provides a host state acquisition method which can be applied to a host state acquisition system, wherein the host state acquisition system comprises terminal equipment and a host which is in communication connection with the terminal equipment. Therefore, the host state acquisition method can be applied to both terminal equipment and the host. Specifically, in one embodiment, as shown in FIG. 1, the method comprises the steps of:
step S1, the terminal equipment sends application starting request information to the host.
In this embodiment, the host in this embodiment refers to any computer device connected with an Internet device in a TCP/IP protocol, and similarly to a server, an application program of a terminal device may be in communication connection with the host. Therefore, when the terminal device starts a preset application program, the terminal device sends application start request information to the host corresponding to the preset application program so as to access the host corresponding to the application program, so as to acquire the state of the host. In this embodiment, the application start request information is information sent to a host corresponding to a preset application program when the terminal device starts the preset application program, and the application start request information is used to access the host corresponding to the application program to acquire a state of the host. For example, in the above example, when the terminal device starts the wechat program, the terminal device sends the application start request information to the host corresponding to the wechat program.
And S2, the host responds to the application starting request information and feeds back byte code value information to the terminal equipment.
In this embodiment, the host responds to the application start request information, first obtains a start state of a preset application program in the terminal device, then obtains a self state according to the start state of the preset application program, generates the bytecode value information, and sends the bytecode value information to the terminal device. For example, in the above example, if the start of the WeChat program in the terminal device fails, the host acquires the state of the host at this time, generates the byte code value information, and sends the byte code value information to the terminal device.
And S3, the terminal equipment receives the byte code value information and acquires a first state type identifier from the byte code value information.
In this embodiment, the byte code value information is code value information generated when the host responds to the application start request information, and the application start request information is sent to the host when the terminal device starts a preset application program, so that the byte code value information is used for reflecting a state of the terminal device when the preset application program is started. And after the terminal equipment receives the byte code value information, obtaining the first type identification according to the byte code value information, wherein the first type identification can reflect the state type of the host when the terminal equipment starts a preset application program. The first state type identifier may be in the form of a code or in the form of a character. For example, in the above example, after receiving the byte code value information, the terminal device obtains the first state type identifiers Start OK, link 4, and Busy according to the byte code value information. Wherein, start OK represents that the starting state of the host computer is successful; link 4 indicates that the communication connection state of the host is to connect 4 applications (that is, 4 applications communicate with the same application); busy indicates that the running state of the host is a Busy state at this time.
And S4, the host sends state change information to the terminal equipment when the state changes.
In this embodiment, in order to timely know whether the state of the host changes and timely acquire the latest state of the host, the host in this embodiment may acquire its own state again when the state changes, generate state change information, and send the state change information to the terminal device. A state change is a change in a state of a host. In one embodiment, the state change information may also be information consisting of various types of characters (i.e., changing from one state to another). As described above, for example, when the operation state of the host changes, the state change information is generated and sent to the terminal device.
And S5, the terminal equipment receives the state change information and acquires a second type identifier from the state change information.
In this embodiment, the state change information is generated when the host changes the state, and the state change information represents the state of the host after the state change. And after receiving the state change information, the terminal device obtains the second type identifier from the state change information, wherein the second state type identifier is used for reflecting the state type of the host after the state change occurs, and the second state type identifier can be in a code form or a character form. For example, in the above example, after receiving the state change information, the terminal device extracts the second state type identifiers Start OK, link 4, and Free from the state change information. Free indicates that the operating state of the host is idle at this time.
And S6, the terminal equipment determines the changed state of the host according to the first state type identifier and the second state type identifier.
In this embodiment, since the terminal device has already acquired the first state type identifier and the second state type identifier, and the first state type identifier is used to reflect a state type of the host when responding to the application start request information; the second state type identification is used for reflecting the state type of the host after the state change; therefore, by comparing the first state type identifier with the second state type identifier, the changed state of the host can be known, so that the latest state of the host can be known in time, the communication connection with the host can be established in time, and the data interaction is realized. As in the example above, the first state type is identified: start OK, link 4 as Busy; comparing with the second state type identifiers of Start OK, link 4 and Free, the state identifier corresponding to the running state of the host is found to be changed from Busy to Free, so that the running state of the host can be determined to be changed from Busy to idle.
In another embodiment, as shown in fig. 2, when the host status acquiring method is applied to a terminal device, the method includes the following steps:
and step S10, the terminal equipment sends application starting request information to the host, wherein the application starting request information is used for accessing the host corresponding to a preset application program so as to acquire the state of the host.
In this embodiment, many processes of the terminal device are associated with the state of the host, so to ensure stable operation of the terminal device and smooth communication with the host, when the terminal device starts a preset application program, the terminal device sends application start request information to the host corresponding to the preset application program to access the host corresponding to the application program, so as to obtain the state of the host. This step has already been described above and will not be described again here.
Step S20, the terminal device receives the byte code value information fed back by the host in response to the application start request information, so as to obtain a first status type identifier according to the byte code information, where the first status type identifier is used to reflect a status type of the host in response to the application start request information.
In this embodiment, the host may respond to the application start request information, acquire the start state of the application program preset in the terminal device, then acquire the state of the host according to the start state of the preset application program, generate the bytecode value information, and send the bytecode value information to the terminal device. And after receiving the byte code value information, the terminal equipment acquires the first state type identifier from the byte code value information, and can obtain the state type of the host when responding to the application starting request information according to the first state type identifier.
In one embodiment, as shown in fig. 3, the step S20 includes the following steps:
step S201, receiving the byte code value information which is generated by the host in response to the application starting request and is used for reflecting the state information of the host;
step S202, determining state information of the host and the first state type identifier corresponding to the state information according to the byte code value information, wherein the state information is used for indicating a state type when the host responds to the application starting request.
In this embodiment, after receiving the byte code value information sent by the host, the terminal device analyzes the byte code value information, and determines the state information of the host and the first state type identifier corresponding to the state information according to the byte code value information. In one embodiment, since the host is in different states, different byte code value information is generated, and the byte code value information includes various types of data, in addition to the data for reflecting the first state type identifier, other data, such as time data for acquiring the byte code value information. In order to accurately know the first state type identifier reflected by the byte code value information after receiving the byte code value information fed back by the host, a mapping relationship table is preset in this embodiment, and the mapping relationship table stores the corresponding relationship between the byte code value information and the state information. For example, byte code value information 0x01 is preset to correspond to the startup state information of the host; setting byte code value information 0x02 corresponding to connection state information of a host; the set byte code value information 0x03 corresponds to the operation state information of the host. Therefore, after the byte code value information is acquired, the byte code value information is matched with the mapping relation table to obtain the state information contained in the byte code value information. That is, the purpose of matching the byte code value information with the mapping relationship table in this embodiment is to determine which states of the host are reflected in the byte code value information.
In a further implementation manner, after the state information is obtained, the first state type identifier corresponding to the state information is further obtained in this embodiment. Specifically, in this embodiment, state query information may be sent to the host according to the state information, the host responds to the state query information after receiving the state query information, and generates state type response information, and the terminal device acquires the first state type identifier from the state type response information after receiving the state type response information. That is to say, the status query information in this embodiment is information sent by the terminal device to the host, and the status query information is used to obtain the first status type identifier corresponding to the status information. In addition, since there are a plurality of status information in this embodiment, including the startup status information of the host, the running status information of the host, and the connection status information of the host, etc., different status inquiry information may be sent to the host according to different status information, so that the status type response information fed back by the host may be different. The state type response message is sent by the host to the terminal device, and is used for responding to the state inquiry message, so that the state type response message includes the first state type identifier. In this embodiment, the corresponding state identifier is obtained from each state type response message, and then all the obtained state identifiers form the first state type identifier.
For example, as shown in fig. 6, fig. 6 shows an embodiment of the present invention, specifically, an interaction between a CICAM card (i.e. a network smart card in a terminal device) and a Host (Host). When the CICAM card sends application start request information to the Host through RequestStart (), the Host responds to the application start request information after receiving the application start request information and replies to the CICAM card through RequestStartAcck (AckCode), at this time, requestStartAck (AckCode) replied by the Host is byte code value information, because different AckCode values represent different state information, and the corresponding relation between the AckCode values and the state information is defined in the specification ETSI TS 103 205V1.1.1 (2014-03) of CIPLuss 1.4 (a specification protocol, which is equivalent to the preset mapping relation table). If the AckCode received in fig. 6 is 0x03, the corresponding status information is the operating status information of the host. Further, after receiving the AckCode value of 0x03, the CICAM card sends GetBusy (that is, sends status query information to the Host according to the status information) to query the Host to obtain the first status type identifier, and the Host may generate status type response information getbyack (busy type value) and return the status type response information getbyack (busy type value) to the CICAM card, and the CICAM card may obtain busy type value (equivalent to the first status type identifier) from the status type response information getbyack (busy type value). As can be seen from the next time, in this embodiment, the state information of the host and the corresponding first state type identifier may be acquired through interaction between the terminal device and the host. Similarly, the AckCode value sent by the terminal device represents different state information, and then different state inquiry information is sent to the host according to the different state information, so that the state type response information fed back by the host is also different, different state identifiers are obtained, and then all the state identifiers form the first state type identifier.
As an example, the first status type identifier obtained by the above steps may be StartOK, link 4, and Busy. Wherein, start OK represents that the starting state of the host computer is successful; link 4 indicates that the communication connection state of the host is to connect 4 applications (that is, 4 applications communicate with the same application); busy indicates that the running state of the host is Busy at this time.
Further, in step S30, the terminal device receives state change information sent by the host when a state change occurs, where the state change information includes a second state type identifier, and the second state type identifier is used to reflect a state type of the host after the state change occurs.
In this embodiment, in order to timely know whether the state of the host changes and timely acquire the latest state of the host, the host in this embodiment may acquire its own state again when the state changes, generate state change information, and send the state change information to the terminal device. And after receiving the state change information, the terminal equipment obtains the second type identifier from the state change information, wherein the second type identifier is used for reflecting the state type of the host after the state change occurs. For the acquisition of the second state type identifier, the second state type identifier may be actively acquired from the host by the terminal device, or may be actively sent to the intelligent terminal by the host. For example, the terminal device in this embodiment may set a polling program, where the polling program may send an inquiry request to the host at preset time intervals, send state change information to the terminal device through a response of the host to the inquiry request, and enable the terminal device to acquire the second state type identifier from the state change information. Or, in this embodiment, the host may also actively send the state change information to the terminal device after the state change occurs, so that the terminal device obtains the second state type identifier from the state change information.
In one embodiment, the step S30 is specifically shown in fig. 4, and includes the following steps:
step S301, receiving the state change information sent by the host, where the state change information is generated when the state of the host changes, and the state change information includes a second state type identifier used for reflecting a state type of the host after the state change and corresponding to the state type;
step S302, parsing the state change information, and extracting the second state type identifier from the state change information.
In this embodiment, when the state of the host changes, a state change message is generated and sent to the terminal device. Since the state change information is generated when the state of the host changes, the state change information includes a second state type identifier for reflecting the state type of the host after the state change and the state type. In this embodiment, the terminal device may parse the state change information after receiving the state change information, and then extract the second state type identifier from the state change information. In order to immediately generate the state change information when the state of the host changes in time, a monitor can be provided in this embodiment, and the monitor is utilized to monitor the state of the host in real time, so as to know whether the state of the host changes in time.
For example, as shown in fig. 6, the Host actively generates status change information busy request (busy type value) when a status change occurs, and then sends the busy request (busy type value) to the CICAM card, and the CICAM card can extract the busy type value (corresponding to the second status type identifier in this case) from the status change information busy request (busy type value).
As in the above example, the last obtained second status type identifier may be Start OK, link 4, and Free. Free indicates that the operating state of the host is idle at this time.
Further, step S40, the terminal device determines the changed state of the host according to the first state type identifier and the second state type identifier.
The intelligent terminal acquires the first state type identifier and the second state type identifier, and the first state type identifier is used for reflecting the state type of the host when responding to the application starting request information; the second state type identification is used for reflecting the state type of the host after the state change, so that the first state type identification is compared with the second state type identification, the changed state of the host can be known, the latest state of the host can be known in time, the terminal equipment can conveniently and timely establish communication with the host after the abnormal recovery of the host, the communication efficiency is improved, the data interaction is realized, and convenience is brought to the use of a user.
In one embodiment, as shown in fig. 5, the step S40 includes the steps of:
step S401, comparing the first state type identification with the state identification corresponding to the same state information in the second state type identification one by one to obtain a comparison result;
step S402, determining the state identifier corresponding to the same state information in the first state type identifier and the second state type identifier is different according to the comparison result;
and S403, determining the changed state of the host according to the different state identifiers.
Specifically, first state type sign with second state type sign all includes a plurality of state signs, in order to determine more swiftly the state that the host computer has changed, will respectively in this embodiment first state type sign with the same state information's of correspondence sign in the second state type sign contrast one by one, can know like this more directly perceivedly first state type sign with which the same state information's of correspondence state sign of second state type sign is inequality, has determined the state sign that corresponds same state information inequality, then can know the state that the host computer has changed.
For example, if the obtained first status type is identified as Start OK, link 4, and Busy. The obtained second state type identifiers are Start OK, link 4 and Free, wherein the Start OK represents that the starting state of the host is successful; link 4 indicates that the communication connection state of the host is to connect 4 applications (that is, 4 applications communicate with the same application); busy indicates that the running state of the host is a Busy state at the moment, and Free indicates that the running state of the host is an idle state at the moment. Therefore, comparing the first state type identifier with the state identifier corresponding to the same state information in the second state type identifier one by one, if the Start OK in the first state type identifier is the same as the Start OK in the second state type identifier; link 4 in the first state type identifier is the same as Link 4 in the second state type identifier; the Busy identifier in the first state type identifier is different from the Free identifier in the second state type identifier, so that the state identifier corresponding to the running state of the host is changed from the Busy identifier to the Free identifier, and the running state of the host can be determined to be changed from the Busy identifier to the idle identifier, namely the changed state of the host is the running state, and the latest state of the host is the state information corresponding to the second state identifier.
In another embodiment, as shown in fig. 7, when the host status acquiring method is applied to a host, the host refers to any computer device connected to an Internet device by TCP/IP protocol, and the method comprises the following steps:
step S100, the host receives application starting request information sent by the terminal equipment, and the application starting information is used for accessing the host corresponding to a preset application program so as to obtain the state of the host.
In this embodiment, many processes of the terminal device are associated with the state of the host, so to ensure stable operation of the terminal device and smooth communication with the host, when the terminal device starts a preset application program, the terminal device sends application start request information to the host corresponding to the preset application program, and the host receives the application start request information sent by the terminal device and responds to the application start request information. This step has already been described above and will not be described again here.
Step S200, the host generates byte code value information according to the application starting request information, and sends the byte code value information to the terminal equipment, so that the terminal equipment obtains a first state type identifier according to the byte code value information, wherein the first state type identifier is used for reflecting the state type of the host when the host responds to the application starting request information.
In this embodiment, after receiving the application start request information, the host responds to the application start request information, acquires a start state of a preset application program in the terminal device, then acquires a state of the host according to the start state of the preset application program, generates the bytecode value information, and sends the bytecode value information to the terminal device, so that the terminal device acquires the first state type identifier from the bytecode value information after receiving the bytecode value information, and obtains a state type of the host when responding to the application start request information according to the first state type identifier.
In one embodiment, as shown in fig. 8, the step S200 includes:
step S210, accessing a preset application program according to the application starting request information;
step S220, generating byte code value information for reflecting the state information of the host according to the starting state of the application program; the bytecode information is used for determining state information of the host and a first state type identifier corresponding to the state information, and the state information is used for representing a state type when the host responds to the application starting request;
and step S230, sending the byte code value information to the terminal equipment.
Specifically, after receiving the application start request information, the host accesses a preset application program according to the application start request information, and since the preset application program corresponds to the host, the accessed preset application program is also an application program corresponding to the host, such as the wechat program in the above example. And then the host acquires the starting state of the application program, generates byte code value information for reflecting the state information of the host according to the starting state of the application program, and sends the byte code value information to the terminal equipment. And after receiving the byte code value information sent by the host, the terminal equipment analyzes the byte code value information, and determines the state information of the host and the first state type identifier corresponding to the state information according to the byte code value information. In one embodiment, since the host is in different states, different byte code value information is generated, and the byte code value information includes various types of data, in addition to the data for reflecting the first state type identifier, other data, such as time data for acquiring the byte code value information. In order to accurately know the first state type identifier reflected by the byte code value information after receiving the byte code value information fed back by the host, a mapping relationship table is preset in this embodiment, and the mapping relationship table stores the corresponding relationship between the byte code value information and the state information. For example, byte code value information 0x01 is preset to correspond to the startup state information of the host; setting byte code value information 0x02 corresponding to connection state information of a host; the set byte code value information 0x03 corresponds to the operation state information of the host. Therefore, after the byte code value information is acquired, the byte code value information is matched with the mapping relation table to obtain the state information contained in the byte code value information. That is, the purpose of matching the byte code value information with the mapping relationship table in this embodiment is to determine which states of the host are reflected in the byte code value information.
In a further implementation manner, after the terminal device of this embodiment acquires the state information, the terminal device further acquires a first state type identifier corresponding to the state information. Specifically, in this embodiment, state query information may be sent to the host according to the state information, the host responds to the state query information after receiving the state query information, and generates state type response information, and the terminal device acquires the first state type identifier from the state type response information after receiving the state type response information. That is to say, the status query information in this embodiment is used to obtain the first status type identifier corresponding to the status information. In addition, since the plurality of state information in this embodiment includes the startup state information of the host, the operation state information of the host, the connection state information of the host, and the like, different state inquiry information is sent to the host according to different state information, and thus the state type response information fed back by the host is also different. In this embodiment, the corresponding state identifier is obtained from each state type response message, and then all the obtained state identifiers form the first state type identifier.
For example, as shown in fig. 6, fig. 6 shows an embodiment of the present invention, specifically, an interaction between a CICAM card (i.e. a network smart card in a terminal device) and a Host (Host). When the CICAM card sends application start request information to the Host through RequestStart (), the Host responds to the application start request information after receiving the application start request information and replies to the CICAM card through RequestStartAcck (AckCode), at this time, requestStartAck (AckCode) replied by the Host is byte code value information, because different AckCode values represent different state information, and the corresponding relation between the AckCode values and the state information is defined in the specification ETSI TS 103 205V1.1.1 (2014-03) of CIPLuss 1.4 (a specification protocol, which is equivalent to the preset mapping relation table). If the AckCode received in fig. 6 is 0x03, the corresponding status information is the operating status information of the host. Further, after receiving the AckCode value of 0x03, the CICAM card sends GetBusy (that is, sends status query information to the Host according to the status information) to query the Host to obtain the first status type identifier, and the Host may generate status type response information getbyack (busy type value) and return the status type response information getbyack (busy type value) to the CICAM card, and the CICAM card may obtain busy type value (equivalent to the first status type identifier) from the status type response information getbyack (busy type value). As can be seen from the next time, in this embodiment, the state information of the host and the corresponding first state type identifier may be acquired through interaction between the terminal device and the host. Similarly, the AckCode value sent by the terminal device represents different state information, and then different state inquiry information is sent to the host according to the different state information, so that the state type response information fed back by the host is also different, different state identifiers are obtained, and then all the state identifiers form the first state type identifier.
As an example, the first status type identifier obtained by the above steps may be StartOK, link 4, and Busy. Wherein, start OK represents that the starting state of the host computer is successful; link 4 indicates that the communication connection state of the host is to connect 4 applications (that is, 4 applications communicate with the same application); busy indicates that the running state of the host is Busy at this time.
Further, in step S300, when a state change occurs in the host, the host sends state change information to the terminal device, where the state change information includes a second state type identifier, and the second state type identifier is used to reflect a state type of the host after the state change occurs, so that the terminal device determines, according to the first state type identifier and the second state type identifier, a changed state of the host.
In this embodiment, in order to know whether the state of the host changes in time and acquire the latest state of the host in time, the host in this embodiment acquires its own state again when the state changes, generates state change information, and sends the state change information to the terminal device. Because the state change information includes the second state type identifier, after the terminal device receives the state change information, the second state type identifier is obtained from the state change information, and the second state type identifier is used for reflecting the state type of the host after the state change occurs. For the acquisition of the second state type identifier, the second state type identifier may be actively acquired by the terminal device to the host, or may be actively sent by the host to the intelligent terminal. For example, the terminal device in this embodiment may set a polling program, where the polling program may send an inquiry request to the host at preset time intervals, and send state change information to the terminal device through a response of the host to the inquiry request, so that the terminal device obtains the second state type identifier from the state change information. Or, in this embodiment, after the state change occurs, the host may actively send state change information to the terminal device, so that the terminal device obtains the second state type identifier from the state change information.
In one embodiment, as shown in fig. 9, the step S300 includes:
step S310, when the state change of the host is monitored, state change information is generated, wherein the state change information comprises a state type used for reflecting the state change of the host and a second state type identifier corresponding to the state type;
step S320, sending the state change information to the terminal device, so that the terminal device determines the changed state of the host according to the first state type identifier and the second state type identifier.
In this embodiment, when the state of the host changes, a state change message is generated and sent to the terminal device. Since the state change information is generated when the state of the host changes, the state change information includes a second state type identifier for reflecting the state type of the host after the state change and the state type. In this embodiment, the terminal device may parse the state change information after receiving the state change information, and then extract the second state type identifier from the state change information. In order to generate the state change information immediately when the host computer has a state change in time, this embodiment may set a monitor program, and the monitor program is utilized to monitor the state of the host computer in real time, so as to know in time whether the host computer has a state change.
For example, as shown in fig. 6, the Host actively generates status change information Busy Release Request (Busy type value) when a status change occurs, and then sends the Busy Release Request (Busy type value) to the CICAM card, and the CICAM card can extract the Busy type value (corresponding to the second status type identifier in this case) from the status change information Busy Release Request (Busy type value).
As in the above example, the last obtained second status type identifier may be Start OK, link 4, and Free. Here, free indicates that the operating state of the host is an idle state at this time.
Further, the intelligent terminal obtains the first state type identifier and the second state type identifier, and the first state type identifier is used for reflecting the state type of the host when responding to the application starting request information; the second state type identification is used for reflecting the state type of the host after the state change, so that the first state type identification is compared with the second state type identification, the changed state of the host can be known, the latest state of the host can be known in time, the terminal equipment can conveniently and timely establish communication with the host after the abnormal recovery of the host, the communication efficiency is improved, the data interaction is realized, and convenience is brought to the use of a user.
Specifically, first state type sign with second state type sign all includes a plurality of state signs, in order to determine more swiftly the state that the host computer has changed, in this embodiment will respectively first state type sign with the sign of corresponding same status information in the second state type sign carries out the contrast one by one, can know more directly perceivedly like this first state type sign with which the status sign that corresponds same status information of second state type sign is inequality, has determined to correspond the different status sign of same status information, then can know the state that the host computer has changed.
For example, if the obtained first status type is identified as Start OK, link 4, and Busy. The obtained second state type marks are Start OK, link 4 and Free, wherein the Start OK represents that the starting state of the host is successful; link 4 indicates that the communication connection state of the host is to connect 4 applications (that is, 4 applications communicate with the same application); busy indicates that the running state of the host is a Busy state at the moment, and Free indicates that the running state of the host is an idle state at the moment. Therefore, comparing the first state type identifier with the state identifier corresponding to the same state information in the second state type identifier one by one, if the Start OK in the first state type identifier is the same as the Start OK in the second state type identifier; link 4 in the first state type identifier is the same as Link 4 in the second state type identifier; the Busy information of the host is stored in the first state type identifier, the Busy information of the host is stored in the second state type identifier, and the Busy information of the host is stored in the second state type identifier.
In summary, in the embodiment of the present invention, the terminal device first sends the application start request information to the host, where the application start request information is used to access the host corresponding to the preset application program, and therefore the terminal device of this embodiment actively sends the application start request information when starting a certain preset application program. After the host receives the application start request information, the host responds to the application start request information and sends byte code value information to the terminal equipment according to the start state of a preset application program, and the terminal equipment can acquire a first state type identifier according to the byte code value information, wherein the first state type identifier is used for reflecting the state type of the host when the host responds to the application start request information. Then, the host sends state change information to the terminal device when the state changes, and the terminal device can obtain a second state type identifier according to the state change information, wherein the second state type identifier is used for reflecting the state type of the host after the state changes. Therefore, the terminal device determines the changed state of the host according to the state type identifier and the second state type identifier. In other words, the terminal device can obtain which state or which state the host has changed according to the state type of the host when the host responds to the application start request information and the state type obtained after the host generates the state, so as to know the latest state of the host in time, facilitate the terminal device to establish communication with the host in time after the host recovers abnormally, improve communication efficiency, realize data interaction, and provide convenience for users.
Exemplary device
As shown in fig. 10, an embodiment of the present invention provides a host status acquiring system, which includes the terminal device 10 and a host 20 communicatively connected to the terminal device 10. In particular, the amount of the solvent to be used,
the terminal device 10 includes: a request information transmitting unit 11, a first identification information receiving unit 12, a second identification information receiving unit 13, and a status determining unit 14.
The request information sending unit 11 is configured to send application start request information to the host 20, where the application start request information is used to access the host 20 corresponding to a preset application program to obtain a state of the host 20;
the first identifier receiving unit 12 is configured to receive byte code value information fed back by the host 20 in response to the application start request information, so as to obtain a first status type identifier according to the byte code information, where the first status type identifier is used to reflect a status type of the host 20 when responding to the application start request information;
the second identification information receiving unit 13 is configured to receive state change information sent when the state of the host 20 changes, where the state change information includes a second state type identifier, and the second state type identifier is used to reflect a state type of the host 20 after the state changes;
the state determining unit 14 is configured to determine the changed state of the host 20 according to the first state type identifier and the second state type identifier;
the host 20 includes: a request information receiving unit 21, a first identification information transmitting unit 22, and a second identification information transmitting unit 23.
The request information receiving unit 21 is configured to receive the application start request information sent by the terminal device 10;
the first identifier information sending unit 22 is configured to generate byte code value information according to the application start request information, and send the byte code value information to the terminal device 10, so that the terminal device 10 obtains a first state type identifier according to the byte code value information;
the second identification information sending unit 23 is configured to send, when the host 20 changes the state, state change information to the terminal device 10, where the state change information includes the second state type identifier, and the second state type identifier is used to reflect the state type of the host 20 after the state change occurs, so that the terminal device 10 determines the changed state of the host 20 according to the first state type identifier and the second state type identifier.
Based on the above embodiment, the present invention further provides an intelligent terminal, and a schematic block diagram thereof may be as shown in fig. 11. The intelligent terminal comprises a processor, a memory, a network interface, a display screen and a temperature sensor which are connected through a system bus. Wherein, the processor of the intelligent terminal is used for providing calculation and control capability. The memory of the intelligent terminal comprises a nonvolatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operating system and the computer program to run on the non-volatile storage medium. The network interface of the intelligent terminal is used for being connected and communicated with an external terminal through a network. The computer program is executed by a processor to implement a host status acquisition method. The display screen of the intelligent terminal can be a liquid crystal display screen or an electronic ink display screen, and the temperature sensor of the intelligent terminal is arranged inside the intelligent terminal in advance and used for detecting the operating temperature of internal equipment.
It will be understood by those skilled in the art that the block diagram of fig. 11 is only a block diagram of a part of the structure related to the solution of the present invention, and does not constitute a limitation to the intelligent terminal to which the solution of the present invention is applied, and a specific intelligent terminal may include more or less components than those shown in the figure, or combine some components, or have different arrangements of components.
In one embodiment, an intelligent terminal is provided that includes a memory, and one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the one or more processors, the one or more programs including instructions for:
sending application starting request information to the host, wherein the application starting request information is used for accessing the host corresponding to a preset application program so as to acquire the state of the host;
receiving byte code value information fed back by the host in response to the application start request information, so as to obtain a first state type identifier according to the byte code information, wherein the first state type identifier is used for reflecting a state type of the host in response to the application start request information;
receiving state change information sent by the host when the state of the host is changed, wherein the state change information comprises a second state type identifier, and the second state type identifier is used for reflecting the state type of the host after the state change;
and determining the changed state of the host according to the first state type identifier and the second state type identifier.
Alternatively, the instructions to:
receiving application starting request information sent by the terminal equipment, wherein the application starting information is used for accessing a host corresponding to a preset application program so as to acquire the state of the host;
generating byte code value information according to the application starting request information, and sending the byte code value information to the terminal equipment, so that the terminal equipment obtains a first state type identifier according to the byte code value information, wherein the first state type identifier is used for reflecting a state type of the host when the host responds to the application starting request information;
when the state of the host is changed, sending state change information to the terminal device, where the state change information includes a second state type identifier, and the second state type identifier is used to reflect the state type of the host after the state change, so that the terminal device determines the changed state of the host according to the first state type identifier and the second state type identifier.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above may be implemented by hardware instructions of a computer program, which may be stored in a non-volatile computer-readable storage medium, and when executed, may include the processes of the embodiments of the methods described above. Any reference to memory, storage, databases or other media used in the embodiments provided herein may include non-volatile and/or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically Programmable ROM (EPROM), electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double Data Rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous Link DRAM (SLDRAM), rambus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
In summary, the present invention discloses a method, a system, an intelligent terminal and a storage medium for acquiring a host status, wherein the method comprises: the terminal equipment sends application starting request information to the host; the host responds to the application starting request information and feeds back byte code value information to the terminal equipment; the terminal equipment receives the byte code value property and acquires a first state type identifier from the byte code value information; the host sends state change information to the terminal equipment when the state changes; the terminal equipment receives the state change information and acquires a second type identifier from the state change information; and the terminal equipment determines the changed state of the host according to the first state type identifier and the second state type identifier. The invention can timely know the changed state of the host, so as to timely establish communication with the host after the abnormal recovery of the host, improve the communication efficiency and provide convenience for users.
It is to be understood that the invention is not limited to the examples described above, but that modifications and variations may be effected thereto by those of ordinary skill in the art in light of the foregoing description, and that all such modifications and variations are intended to be within the scope of the invention as defined by the appended claims.
Claims (8)
1. A host state acquisition method is characterized by being applied to terminal equipment in a host state acquisition system, wherein the host state acquisition system comprises the terminal equipment and a host which is in communication connection with the terminal equipment; the method comprises the following steps:
sending application starting request information to the host, wherein the application starting request information is used for accessing the host corresponding to a preset application program so as to acquire the state of the host;
receiving byte code value information fed back by the host in response to the application start request information, so as to obtain a first state type identifier according to the byte code information, wherein the first state type identifier is used for reflecting a state type of the host in response to the application start request information;
receiving state change information sent by the host when the state of the host is changed, wherein the state change information comprises a second state type identifier, and the second state type identifier is used for reflecting the state type of the host after the state change;
determining the changed state of the host according to the first state type identifier and the second state type identifier;
the receiving the byte code value information fed back by the host in response to the application start request information to obtain a first state type identifier according to the byte code information includes:
receiving the byte code value information which is generated by the host in response to the application starting request and is used for reflecting the state information of the host;
determining state information of the host and the first state type identifier corresponding to the state information according to the byte code value information, wherein the state information is used for representing a state type when the host responds to the application starting request;
the determining the state information of the host and the first state type identifier corresponding to the state information according to the bytecode information includes:
acquiring a preset mapping relation table, and determining the state information corresponding to the byte code value information according to the mapping relation table, wherein the mapping relation table stores the corresponding relation between the byte code value information and the state information of the host;
sending state inquiry information to the host according to the state information, wherein the state inquiry information is used for acquiring a first state type identifier corresponding to the state information;
and receiving state type response information generated by the host responding to the state inquiry information, and acquiring the first state type identifier from the state type response information.
2. The method according to claim 1, wherein the receiving the status change information sent by the host when the status change occurs, the status change information including a second status type identifier comprises:
receiving the state change information sent by the host, wherein the state change information is generated when the state of the host is changed, and the state change information comprises a second state type identifier which is used for reflecting the state type of the host after the state change and corresponds to the state type;
and analyzing the state change information, and extracting the second state type identifier from the state change information.
3. The method according to claim 1, wherein the determining the changed state according to the first state type identifier and the second state type identifier comprises:
comparing the first state type identifier with the state identifiers corresponding to the same state information in the second state type identifier one by one to obtain comparison results;
determining state identifiers corresponding to the same state information in the first state type identifier and the second state type identifier and different from each other according to the comparison result;
and determining the changed state of the host according to the different state identifications.
4. A host state acquisition method is characterized by being applied to a host in a host state acquisition system, wherein the host state acquisition system comprises the host and terminal equipment in communication connection with the host; the method comprises the following steps:
receiving application starting request information sent by the terminal equipment, wherein the application starting information is used for accessing a host corresponding to a preset application program so as to acquire the state of the host;
generating byte code value information according to the application starting request information, and sending the byte code value information to the terminal equipment, so that the terminal equipment obtains a first state type identifier according to the byte code value information, wherein the first state type identifier is used for reflecting a state type of the host when the host responds to the application starting request information;
when the state of the host is changed, sending state change information to the terminal equipment, wherein the state change information comprises a second state type identifier, and the second state type identifier is used for reflecting the state type of the host after the state change, so that the terminal equipment determines the changed state of the host according to the first state type identifier and the second state type identifier;
generating byte code value information according to the application start request information, and sending the byte code value information to the terminal device, so that the terminal device obtains a first state type identifier according to the byte code value information, including:
accessing a preset application program according to the application starting request information;
generating byte code value information for reflecting state information of a host according to the starting state of the application program; the bytecode information is used for determining state information of the host and a first state type identifier corresponding to the state information, and the state information is used for representing a state type of the host when the host responds to the application starting request;
sending the byte code value information to the terminal equipment;
the determining the state information of the host and the first state type identifier corresponding to the state information includes:
receiving state inquiry information sent by the host and generated by the terminal equipment according to the state information;
generating state type response information according to the state inquiry information;
and sending the state type response information to the terminal equipment so that the terminal equipment acquires the first state type identifier from the state type response information.
5. The host status acquiring method according to claim 4, wherein the sending status change information to the terminal device when the host has a status change, the status change information including a second status type identifier, comprises:
when the state change of the host is monitored, state change information is generated, wherein the state change information comprises a state type used for reflecting the state change of the host and a second state type identifier corresponding to the state type;
and sending the state change information to the terminal equipment so that the terminal equipment determines the changed state of the host according to the first state type identifier and the second state type identifier.
6. The host state acquisition system is characterized by comprising a terminal device and a host which is in communication connection with the terminal device, wherein the terminal device comprises:
a request information sending unit, configured to send application start request information to the host, where the application start request information is used to access the host corresponding to a preset application program to obtain a state of the host;
a first identifier receiving unit, configured to receive byte code value information fed back by the host in response to the application start request information, so as to obtain a first state type identifier according to the byte code information, where the first state type identifier is used to reflect a state type of the host in response to the application start request information;
a second identification information receiving unit, configured to receive state change information sent when a state of the host changes, where the state change information includes a second state type identification, and the second state type identification is used to reflect a state type of the host after the state change occurs;
a state determining unit, configured to determine a state of the host that has changed according to the first state type identifier and the second state type identifier;
the first identifier information receiving unit is further configured to receive bytecode value information fed back by the host in response to the application start request information, so as to obtain a first state type identifier according to the bytecode information, and includes:
receiving the byte code value information which is generated by the host in response to the application starting request and is used for reflecting the state information of the host;
determining state information of the host and the first state type identifier corresponding to the state information according to the byte code value information, wherein the state information is used for representing a state type when the host responds to the application starting request;
the determining the state information of the host and the first state type identifier corresponding to the state information according to the bytecode information includes:
acquiring a preset mapping relation table, and determining the state information corresponding to the byte code value information according to the mapping relation table, wherein the mapping relation table stores the corresponding relation between the byte code value information and the state information of the host;
sending state inquiry information to the host according to the state information, wherein the state inquiry information is used for acquiring a first state type identifier corresponding to the state information;
receiving state type response information generated by the host responding to the state inquiry information, and acquiring the first state type identifier from the state type response information;
the host includes:
a request information receiving unit, configured to receive the application start request information sent by the terminal device;
a first identifier information sending unit, configured to generate byte code value information according to the application start request information, and send the byte code value information to the terminal device, so that the terminal device obtains a first state type identifier according to the byte code value information;
a second identifier information sending unit, configured to send, when a state of the host changes, state change information to the terminal device, where the state change information includes the second state type identifier, and the second state type identifier is used to reflect a state type of the host after the state change occurs, so that the terminal device determines, according to the first state type identifier and the second state type identifier, a state of the host that has changed;
the first identifier information sending unit is further configured to generate byte code value information according to the application start request information, and send the byte code value information to the terminal device, so that the terminal device obtains a first state type identifier according to the byte code value information, including:
accessing a preset application program according to the application starting request information;
generating byte code value information for reflecting state information of a host according to the starting state of the application program; the bytecode information is used for determining state information of the host and a first state type identifier corresponding to the state information, and the state information is used for representing a state type of the host when the host responds to the application starting request;
sending the byte code value information to the terminal equipment;
the determining the state information of the host and the first state type identifier corresponding to the state information includes:
receiving state inquiry information sent by the host and generated by the terminal equipment according to the state information;
generating state type response information according to the state inquiry information;
and sending the state type response information to the terminal equipment so that the terminal equipment acquires the first state type identifier from the state type response information.
7. An intelligent terminal comprising a memory, and one or more programs, wherein the one or more programs are stored in the memory, and wherein the one or more programs being configured to be executed by the one or more processors comprises instructions for performing the method of any of claims 1-3 or the method of any of claims 4-5.
8. A non-transitory computer readable storage medium having instructions which, when executed by a processor of an electronic device, enable the electronic device to perform the method of any of claims 1-3 or the method of any of claims 4-5.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201911399412.6A CN113064753B (en) | 2019-12-30 | 2019-12-30 | Host state acquisition method, system, intelligent terminal and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201911399412.6A CN113064753B (en) | 2019-12-30 | 2019-12-30 | Host state acquisition method, system, intelligent terminal and storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN113064753A CN113064753A (en) | 2021-07-02 |
CN113064753B true CN113064753B (en) | 2023-03-14 |
Family
ID=76558455
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201911399412.6A Active CN113064753B (en) | 2019-12-30 | 2019-12-30 | Host state acquisition method, system, intelligent terminal and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN113064753B (en) |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1612542A (en) * | 2003-10-30 | 2005-05-04 | 乐金电子(天津)电器有限公司 | Long-distance control system for home appliance |
CN101166129A (en) * | 2006-10-20 | 2008-04-23 | 华为技术有限公司 | Method, terminal, device and system for obtaining application server identifier information |
CN105282730A (en) * | 2014-05-26 | 2016-01-27 | 中国电信股份有限公司 | Method and system for acquiring terminal communication state in IMS (IP multimedia subsystem) and application server |
CN106888272A (en) * | 2017-04-11 | 2017-06-23 | 华东交通大学 | The client message method for refreshing of platform is pushed based on third party |
CN108632108A (en) * | 2018-01-11 | 2018-10-09 | 西门子电力自动化有限公司 | Monitoring method, device based on polling protocol and and readable storage medium storing program for executing |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110505177B (en) * | 2018-05-16 | 2023-06-30 | 杭州海康威视数字技术股份有限公司 | Information collection system, terminal equipment and remote host |
-
2019
- 2019-12-30 CN CN201911399412.6A patent/CN113064753B/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1612542A (en) * | 2003-10-30 | 2005-05-04 | 乐金电子(天津)电器有限公司 | Long-distance control system for home appliance |
CN101166129A (en) * | 2006-10-20 | 2008-04-23 | 华为技术有限公司 | Method, terminal, device and system for obtaining application server identifier information |
CN105282730A (en) * | 2014-05-26 | 2016-01-27 | 中国电信股份有限公司 | Method and system for acquiring terminal communication state in IMS (IP multimedia subsystem) and application server |
CN106888272A (en) * | 2017-04-11 | 2017-06-23 | 华东交通大学 | The client message method for refreshing of platform is pushed based on third party |
CN108632108A (en) * | 2018-01-11 | 2018-10-09 | 西门子电力自动化有限公司 | Monitoring method, device based on polling protocol and and readable storage medium storing program for executing |
Also Published As
Publication number | Publication date |
---|---|
CN113064753A (en) | 2021-07-02 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110389815A (en) | Task processing method, apparatus and system | |
CN110446273B (en) | Networking method and device based on electronic price tags | |
CN110750222A (en) | Printing method, printing device, computer equipment and storage medium | |
CN108170551B (en) | Crawler system based front-end and back-end error processing method, server and storage medium | |
CN111159269A (en) | Data processing method, device and system | |
CN108491466B (en) | Electronic device, access instruction information acquisition method, and storage medium | |
CN112685669A (en) | Page rendering method and system | |
CN113079482A (en) | Data transmission method, electronic price tag and computer equipment | |
CN107341007B (en) | Display terminal, timing starting method thereof and computer readable storage medium | |
CN113612814B (en) | Session information screening method, device, terminal and storage medium | |
CN113259942B (en) | Connection method, connection device, electronic equipment, connection system and computer-readable storage medium | |
CN111294288A (en) | Traffic identification method and device, application program interface gateway and storage medium | |
CN113064753B (en) | Host state acquisition method, system, intelligent terminal and storage medium | |
CN110505177B (en) | Information collection system, terminal equipment and remote host | |
CN109190412A (en) | The detection method and device of webpage tamper | |
CN109600738B (en) | User information updating method, device, equipment and storage medium | |
CN109951549B (en) | Network page access method and device and computer readable storage medium | |
CN109462649B (en) | Remote file analysis method, device and system and storage medium thereof | |
CN117119078A (en) | Privacy task scheduling method and device based on Kubernetes cluster interconnection scheduling framework | |
CN113138814A (en) | Remote assistance method, device, equipment and storage medium | |
CN114168876A (en) | Page display method and device, computer equipment and computer readable storage medium | |
CN112181785B (en) | Method, terminal and storage medium for automatically adding monitoring equipment | |
CN113133027B (en) | Communication method, server, terminal and communication system | |
CN112333686A (en) | Network distribution method, terminal device, image forming apparatus, and storage medium | |
CN110602655B (en) | Short message-based equipment communication address modification method and device and readable 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 |