CN111901231B - Method and system for realizing virtual key of home gateway - Google Patents

Method and system for realizing virtual key of home gateway Download PDF

Info

Publication number
CN111901231B
CN111901231B CN202010508879.6A CN202010508879A CN111901231B CN 111901231 B CN111901231 B CN 111901231B CN 202010508879 A CN202010508879 A CN 202010508879A CN 111901231 B CN111901231 B CN 111901231B
Authority
CN
China
Prior art keywords
virtual
state
physical port
key
virtual key
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202010508879.6A
Other languages
Chinese (zh)
Other versions
CN111901231A (en
Inventor
李行革
肖军
邓文博
徐诗理
程聪
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Fiberhome Telecommunication Technologies Co Ltd
Original Assignee
Fiberhome Telecommunication Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Fiberhome Telecommunication Technologies Co Ltd filed Critical Fiberhome Telecommunication Technologies Co Ltd
Priority to CN202010508879.6A priority Critical patent/CN111901231B/en
Publication of CN111901231A publication Critical patent/CN111901231A/en
Application granted granted Critical
Publication of CN111901231B publication Critical patent/CN111901231B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/66Arrangements for connecting between networks having differing types of switching systems, e.g. gateways

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The invention discloses a method for realizing a virtual key of a home gateway, which comprises the following steps: detecting the plug-pull state change of a physical port of the home gateway, and generating a virtual information group according to the plug-pull state change of the physical port; generating virtual keys according to the at least two virtual information groups; and executing the virtual key. The invention realizes the expansion of different key functions by a virtual key mode, replaces the entity key with extremely low utilization rate in the life cycle of the product, reduces the research and development cost of gateway equipment materials and hardware under the condition of not reducing the product functions, and improves the expandability of the product functions. The invention also provides a corresponding system for realizing the virtual key of the home gateway.

Description

Method and system for realizing virtual key of home gateway
Technical Field
The invention belongs to the technical field of computer communication, and particularly relates to a method and a system for realizing a virtual key of a home gateway.
Background
At present, the mainstream home gateway in the market generally carries the entity key function with very low use frequency in the life cycle of the product. These keys are generally ignored by the user for everyday use, but the functionality is indispensable. With the evolution of broadband access, the home gateway is more and more popular, and the market competition is increasingly intense. How to reduce the material cost, enrich the individual functions of the product and improve the competitiveness of the product is a problem which is urgently needed to be solved at present. In order to enrich the key functions, ー touch screen modes are proposed in the prior art, and the extension of different key functions can be realized. But the research and development cost of the product is increased invisibly, the competitive power of the price advantage of the product is reduced, and the economic burden of the target user is increased. Because the market competition of the home gateway is increasingly intense, how to reduce the material cost, enrich the functions of individual products and improve the product competitiveness is a problem which is urgently needed to be solved at present.
Disclosure of Invention
Aiming at the defects or improvement requirements of the prior art, the invention provides a method and a system for realizing a virtual key of a home gateway, aiming at realizing various virtual keys by utilizing various existing physical ports on the home gateway, saving materials, enriching product functions and improving product competitiveness.
In order to achieve the above object, according to an aspect of the present invention, there is provided a method for implementing a virtual key of a home gateway, including:
detecting the plug-pull state change of a physical port of the home gateway, and generating a virtual information group according to the plug-pull state change of the physical port;
generating virtual keys according to the at least two virtual information groups;
and executing the virtual key.
In an embodiment of the present invention, the virtual information group includes a physical port number and a physical port plugging signal.
In an embodiment of the present invention, the generating a virtual key according to at least two virtual information groups includes: and generating a virtual information group sequence according to at least two virtual information groups, and determining a corresponding virtual key according to the virtual information group sequence.
In an embodiment of the present invention, the generating a virtual key according to at least two virtual information groups includes: and driving a virtual key state machine to generate virtual keys through the virtual information group.
In an embodiment of the present invention, the driving a virtual key state machine by a virtual information group to generate a virtual key includes:
the virtual key state machine is transferred to the next state within the set overtime by the current state, and the state is composed of a plurality of virtual information groups generated by one-time plugging and unplugging action of a physical port;
if the state is transferred to a virtual key definition state, determining the virtual key and returning to an initialization state again, wherein the virtual key corresponds to a virtual information group sequence formed by each virtual information group of the virtual key state machine transfer state; if the state is transferred to the undefined state, the state is restored to the initialized state;
if the state transition time is exceeded, the virtual key state machine is restored to the initialization state.
In one embodiment of the present invention, each time the state machine transitions to a new state, the count of the Timeout timer is cleared, if the Timeout timer exceeds the state transition time T, a Timeout signal Timeout is sent to the state machine, and the state machine closes the Timeout timer in the initialization state.
In an embodiment of the present invention, the physical ports are multiple physical ports of the same type, or multiple physical ports of different types.
In an embodiment of the present invention, when the physical port is a plurality of physical ports of different types, the virtual information group further includes a physical port type.
In an embodiment of the present invention, the plugging/unplugging state of the physical port is: physical port insertion signals or physical port extraction signals; the physical port insertion signal includes an instant insertion signal or a physical port insertion sub-signal generated according to a physical port insertion duration.
According to another aspect of the present invention, there is also provided a system for implementing a virtual key of a home gateway, including a port virtualization module, a key definition module, a signal detection module, a virtual information group generation module, a virtual key state machine module, and a key execution module, where:
the port virtualization module is used for defining the physical port type and the physical port number and defining a virtual information group corresponding to each physical port in a plugging state;
the key definition module is used for predefining virtual information group sequences corresponding to different virtual keys and functions corresponding to the virtual keys;
the signal detection module is used for detecting a physical port plugging signal;
the virtual information group generating module is used for generating a virtual information group according to the detected physical port type, the physical port plugging signal and the physical port number;
the virtual key state machine module is used for receiving the virtual information group and transferring the state within the set overtime time T;
and the key execution module is used for executing the functions of the virtual keys.
Generally, compared with the prior art, the technical scheme of the invention has the following beneficial effects:
the invention realizes the expansion of different key functions by a virtual key mode, replaces the entity key with extremely low utilization rate in the life cycle of the product, reduces the research and development cost of gateway equipment materials and hardware under the condition of not reducing the product functions, and improves the expandability of the product functions.
Drawings
Fig. 1 is a flowchart of a method for implementing a virtual key of a home gateway in an embodiment of the present invention;
fig. 2 is a flowchart of another method for implementing a virtual key of a home gateway according to an embodiment of the present invention;
fig. 3 is a method for defining a virtual physical port plugging signal of a home gateway according to an embodiment of the present invention;
fig. 4 is a schematic diagram of a physical port of a home gateway in an embodiment of the present invention;
fig. 5 is a schematic structural diagram of a system for implementing a virtual key of a home gateway in an embodiment of the present invention;
fig. 6 is a schematic diagram of a state transition process of a home network virtual key state machine according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention. In addition, the technical features involved in the embodiments of the present invention described below may be combined with each other as long as they do not conflict with each other.
Example 1
The invention provides a method for realizing a virtual key of a home gateway, which comprises the following steps:
s1, detecting the plug state change of the physical port of the home gateway, and generating a virtual information group according to the plug state change of the physical port;
the virtual information group comprises a physical port number and a physical port plugging signal;
the physical ports are multiple physical ports of the same type (for example, all network ports), or multiple physical ports of different types (physical ports may include, but are not limited to, network ports, USB ports, and voice ports); for example, if the port numbered L2 is detected to be inserted, a virtual information group (I, L2) is generated, wherein I represents the port insertion;
when the physical port is a plurality of physical ports of different types, the virtual information group further comprises a physical port type; for example, the physical port types of the network port, USB port, and voice port are numbered as C1, C2, and C3, respectively; generating a virtual information group (C1, I, L2) if the network port numbered L2 is detected to be inserted;
further, the plugging and unplugging state of the physical port is as follows: physical port insertion signals or physical port extraction signals;
namely, when the physical port is inserted, the physical port is defined as a physical port insertion signal I, and when the physical port is pulled out, the physical port is defined as a physical port pulling-out signal O;
or further, the physical port insertion signal includes an instant insertion state, or a physical port insertion sub-signal generated according to a physical port insertion duration;
that is, when a physical port is plugged in, various plugging states are generated in combination with the timing signal, for example, when the physical port is plugged in, it is defined as a physical port plugging sub-signal I, and the timing generator is started, and the time period t can be set to 1 second. The physical port insertion sub-signal I1 is defined when the insertion state is maintained for 1 time period, and the physical port insertion sub-signal I2 is defined when the insertion state is maintained for 3 time periods. When the physical port is pulled out, defining the signal state as a physical port pulling-out signal O, and closing the time sequence generation signal;
s2, generating virtual keys according to the at least two virtual information groups;
specifically, a virtual information group sequence may be generated according to at least two virtual information groups, and a corresponding virtual key may be determined according to the virtual information group sequence; only according to the virtual information group sequence generated in the plugging process, then searching the virtual key corresponding to the virtual information group sequence defined in the system; for example, sequentially plugging and unplugging the network port L1L 2L 3, a virtual information group sequence (I, L1), (O, L1), (I, L2), (O, L2), (I, L3), and (O, L3) are generated, and if the virtual key corresponding to the virtual information group sequence is a Reset key, it is determined that the virtual key to be executed at this time is a Reset key;
or, the virtual key state machine can be driven by the virtual information group to generate a virtual key; namely, the plug-in state is used for driving a state machine to realize the confirmation of the virtual key;
and S3, executing the virtual key.
E.g. Reset key or WebLock key, but also any definable function on the gateway device.
Further, log information is also recorded after the virtual key is executed.
Example 2
Fig. 2 is a flowchart of a method for implementing a virtual key of a home gateway in an embodiment of the present invention, where the flow of the method for implementing a virtual key includes:
s101, defining a virtual information group, a virtual information group sequence and a virtual key of the home gateway.
According to the use scene of the virtual key system of the gateway equipment, the type and the number of a physical port are defined, and a virtual information group corresponding to each physical port in a plugging state is defined.
And predefining virtual information group sequences corresponding to different virtual keys and functions corresponding to the virtual keys. The set of virtual information includes, but is not limited to, a physical port type, a physical port number, and a physical port plug signal.
S102, changing the plugging state of the physical port.
The user controls the change of the plugging signal of the physical port of the device through plugging action (further combining with plugging duration).
S103, detecting a physical port plugging signal.
The states mainly include two states of insertion IN and extraction OUT.
Furthermore, besides detecting the plug-in and plug-out states of the ports in time, a time sequence generator can be additionally used for assisting in detecting the physical port plug-in and plug-out signals which deviate along with time.
When insertion is detected, the timing generator is turned on.
When a pull-out is detected, the timing generator is turned off.
The periodic signal of the timing generator can trigger again whether the detection port is in the insertion state. That is, in the whole insertion duration process, the port is detected whether to be in an insertion state or not by a periodic signal of the timing generator for a plurality of times, so that the insertion duration process is expanded into a plurality of insertion physical port insertion sub-signals.
Fig. 3 is a timing diagram illustrating a physical port plugging signal detection according to an embodiment of the invention.
When a physical port is inserted, an insertion signal I is detected. The timing generator is started simultaneously and the time period t can be set to 1 second.
When the physical port is unplugged, the unplugging signal O is detected. While turning off the timing generation signal.
When the 1 time period signal is received, the insertion signal I1 is detected.
When the 3 time period signal is received, the insertion signal I2 is detected.
And S104, generating a virtual information group according to the detected physical port type, the physical port plugging signal and the physical port number.
And S105, driving the virtual key state machine to generate a virtual key by the virtual information group.
The virtual key state machine transitions the state within the set timeout T based on the set of virtual information received from S104. Each state of the virtual key state machine is composed of a plurality of virtual information groups generated by one-time plugging and unplugging action of the physical port.
If the state transition time T is exceeded, a Timeout signal Timeout is received, the Timeout state is entered, log information is recorded, and the state is recovered to the initialization state; if the state is transferred to an undefined state, recording the log information and restoring to an initialized state; and if the state is transferred to the virtual key definition state, recording the log information, sending corresponding virtual key information to the key execution module, and returning to the initialization state again. And the state machine is transferred to a new state every time, and the count of the overtime timer is cleared. If the Timeout timer exceeds the state transition time T, a Timeout signal Timeout is sent to the state machine. The state machine closes the timeout timer in the INIT state.
When the virtual key state machine sends the state transition, the user can be prompted through the alarm module, and the virtual key detection is carried out.
In step 106, the function of the virtual key is executed and log information is recorded.
The virtual key sent in step S105 is buffered using the first-in first-out queue.
Further, the virtual key defined in step S101 may also be retrieved. And if the corresponding virtual key is retrieved, executing the corresponding key task and recording log information. And if the corresponding virtual key cannot be retrieved, ignoring the virtual key and recording log information.
Example 4
As shown in FIG. 4, the physical port names are IF1(Interface1), IF2(Interface2), IF3(Interface3), and IF4(Interface4), respectively. In order to better manage the port physical port plugging and unplugging signals, the names of the physical ports can be virtualized into physical port numbers according to a specific sequence. For example: physical port number L1 for IF1, physical port number L2 for IF2, physical port number L3 for IF3, and physical port number L4 for IF 4; alternatively, the physical ports may be virtually encoded in other orders. The physical ports may include, but are not limited to, network ports, USB ports, and voice ports, and the physical port types of the network ports, the USB ports, and the voice ports may be numbered as C1, C2, and C3, respectively.
A virtual information group (C1, I, L2) is generated IF a network port named IF2 is detected to be plugged in, and a virtual information group (C1, O, L2) is generated IF a network port named IF2 is detected to be unplugged.
The virtual information set can be deleted or added on the basis. For example, the [ (C1, I, L2) (C1, O, L2) ] virtual information group can be optimally represented as [ (C1, L2) ] according to the usage scenario. Further, in the scenario of not distinguishing the physical port types, it can be sub-optimized to [ (L2) ] virtual information group.
Example 5
As shown in table 5, an embodiment of the present invention provides a data model for defining a virtual key of a home gateway. The data model defines the following virtual keys:
and Reset: the home gateway restores the factory settings, and the virtual information group sequence of the Reset virtual key can be defined as: (C1, I, L1) (C1, O, L1) (C1, I, L2) (C1, O, L2) (C1, I, L2) (C1, O, L2) (C1, I, L3) (C1, O, L3). Generally stated, virtual key Reset is activated by plugging in and out the IF1, IF2, IF2 and IF3 ports in sequence. If a physical port plugging signal I1 is introduced (i.e. a physical port plugging sub-signal generated by a timing generator according to a physical port plugging duration), each plugging action is completed within a time period T of the timing generator, otherwise, each action is completed within a state expiration time T.
WebLock: the user self-defines a virtual key WebLock, and the virtual information group sequence of the key can be defined as: (C1, I, L3) (C1, O, L3) (C1, I, L2) (C1, O, L2) (C1, I, L4) (C1, O, L4). Generally stated, virtual key WebLock is activated by plugging in and out the IF3, IF2 and IF4 ports in sequence. If a physical port plugging signal I1 is introduced, each plugging action is completed within a time period T of the timing generator, otherwise, each action is completed within a state expiration time T.
Different virtual information group sequences can be combined by referring to the content defined by the physical port plugging signal. The virtual information group sequence can further define the virtual key and map to a specific execution function, thereby completing the definition of the virtual key data model.
Table 5 data model defined by virtual keys of home gateway
Figure BDA0002527664200000091
Example 6
Fig. 5 is a system block diagram of a home gateway virtual key implementation system in an embodiment of the present invention, where the virtual key implementation system includes: the device comprises a port virtualization module 401, a key definition module 402, a signal detection module 403, a virtual information group generation module 404, a virtual key state machine module 404, a key execution module 405, a log output module 406 and an alarm module 407.
The port virtualization module 401 is configured to define a physical port type and a physical port number, and define a virtual information group corresponding to each physical port in a plug-in/pull-out state.
The physical ports include, but are not limited to, network ports, USB ports, and voice ports.
The key definition module 402 is configured to predefine virtual information group sequences corresponding to different virtual keys and functions corresponding to the virtual keys.
The signal detection module 403 is configured to detect a physical port plugging signal.
A virtual information group generating module 404, configured to generate a virtual information group according to the detected physical port type, the physical port plugging signal, and the physical port number.
The virtual key state machine module 405 is configured to receive the virtual information group and transition the state within the set timeout T.
If the state transition time T is exceeded, the Timeout signal is received to enter a Timeout state and the state is recovered to an initialization state; if the state is transferred to the undefined state, the state is restored to the initialized state; if the state is transferred to the virtual key definition state, the corresponding virtual key information is sent to the key execution module 406, and the initialization state is returned again. And the state machine is transferred to a new state every time, and the count of the overtime timer is cleared. If the timeout timer exceeds the state transition time T, a timeout signal is sent to the state machine. The state machine closes the timeout timer in the INIT state.
And a key execution module 406 for executing the function of the virtual key.
For example, the virtual keys sent by the virtual key state machine module 405 may be buffered using a first-in-first-out queue, and the tasks of the virtual keys are executed in sequence.
Further, the system may further include a log output module 407, where the log output module 407 is configured to record key information of each module, so as to facilitate maintenance and fault analysis of the virtual key system.
For example: signal detection data in the signal detection module 403, a state transition information log of the virtual key state machine module 405, and task execution details of the key execution module 406.
And an alarm module 408 for prompting the user that the virtual key state machine detection state has been entered. The alarm module can be a certain LED lamp on the gateway equipment flickering at a fixed frequency, and can also be prompt information on WEB or APP.
Example 7
In the embodiment of the present invention, a transition process of a home network virtual key state machine is described with reference to fig. 6. As shown in FIG. 6, the virtual key state machine states may include, but are not limited to: an initialization state (INIT)501, a Timeout state (Timeout)502, an Undefined state (Undefined)503, an intermediate transition state 504, a user defined key state 505, and a system defined key state 506. Specifically, the method comprises the following steps:
the initialization state 501 is the initial state for the state machine to transition to another state.
And a timeout state 502, in the state transition process, the state machine does not receive a new signal after exceeding the time T, the state machine transitions to the timeout state, and enters the initialization state again after recording information such as logs and the like. If the state machine is in the initialization state, the timeout mechanism is not initiated.
Undefined state 503, the state machine transfers to the state contained in the non-predefined virtual key path during the state transfer process, and enters the initialized state again after recording the information such as the log and the like.
Intermediate transition state 504, the state machine may be triggered by the set of virtual signals to enter a non-virtual key state during the state transition. For example, P4_3 is an intermediate transition state.
User defined key state 505 represents a user-defined virtual key.
The system definition key state 506 represents a system factory defined virtual key. In contrast to the user definition, the system defines that the key states have higher execution rights.
User-defined key states 505 and system-defined key states 506 are generic to a series of virtual key states, not representing specific virtual keys, and states 505 and 506 may each include multiple sets of virtual key states.
Example 8
The embodiment of the invention, with reference to fig. 6, describes a state transition process of a home network virtual key state machine, including:
predefining a virtual key state transition process;
virtual key Reset status procedure: the virtual state machine starts in the INIT state, and sequentially transfers to the P35 1_1 state, the P2_2 state, the P3_2 state and the P4_3 state by receiving 403 module virtual information groups [ (C1, I, L1) (C1, O, L1) ], [ (C1, I, L2) (C1, O, L2) ], [ (C1, I, L2) (C1, O, L2) ], [ (C1, I, L3) (C1, O, L3) ], and finally enters the Reset state. Records the related log information in the Reset state and sends the Reset key information to the key execution module 406, and then returns to the INIT state again.
The WebLock state process of the virtual key is as follows: the virtual state machine starts in the INIT state, and sequentially transfers to a P1_3 state, a P2_2 state and a P3_4 state by receiving 403 module virtual information groups [ (C1, I, L3) (C1, O, L3) ], [ (C1, I, L2) (C1, O, L2) ], [ (C1, I, L4) (C1, O, L4) ], and finally enters into a WebLock state. Records the related log information in the WebLock state and sends the WebLock key information to the key execution module 406, and then returns to the INIT state again.
Detecting a non-predefined virtual key state transition process;
an unfolded state transition process: the virtual state machine starts in the INIT state, and sequentially transfers to a P35 1_1 state, a P2_2 state, a P3_2 state and a P4_1 state by receiving 403 module virtual information groups [ (C1, I, L1) (C1, O, L1) ], [ (C1, I, L2) (C1, O, L2) ], [ (C1, I, L2) (C1, O, L2) ], [ (C1, I, L1) (C1, O, L1) ], and finally enters an unfolded state. Recording the related log information in the defined state, and then returning to the INIT state again.
The intermediate transition state receives the overtime state transition process of the state overtime;
timeout state transition procedure: the virtual state machine starts in the INIT state, and sequentially transfers to a P1_3 state, a P2_2 state and a P3_4 state by receiving 403 virtual information groups [ (C1, I, L3) (C1, O, L3) ], [ (C1, I, L2) (C1, O, L2) ], [ (C1, I, L4) (C1, O, L4) ], and receives a Timeout signal Timeout in the P3_4 state, so that the Timeout state is entered. The relevant log information is recorded in the Timeout state and then returned to the INIT state.
During the transition, the state machine goes through intermediate transition states, labeled P1_1, P2_2, P2_3, etc., collectively described herein as Pn _ m.
The underdefined state and Timeout state transition procedures described above are only one type of transition procedure that may occur in an embodiment state machine. It will be appreciated that the underdefined state and the Timeout state may occur at any intermediate transition state Pn _ m that passes through, and are not limited to P4_1 of the underdefined state transition process and P3_4 of the Timeout state transition process described above.
The virtual key state machine systematically plans a definition method of the virtual key, and can effectively avoid the problem of path conflict for defining a virtual key signal group. When the state is transferred to the non-predefined virtual key path state, the state can be quickly entered into the defined state, and then the state is returned to the INIT state, and the next state detection is started. The state machine Timeout signal Timeout effectively restricts the input time sequence of the virtual signal group, and further can greatly reduce the false triggering probability.
In the above embodiments, the implementation may be wholly or partially realized by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When loaded and executed on a computer, cause the processes or functions described in accordance with the embodiments of the invention to occur, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a network of computers, or other programmable system. The computer instructions may be stored in a computer readable storage medium or transmitted from one computer readable storage medium to another, for example, from one website site, computer, server, or data center to another website site, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, Digital Subscriber Line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device, such as a server, a data center, etc., that incorporates one or more of the available media. The usable medium may be a magnetic medium (e.g., floppy Disk, hard Disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., Solid State Disk (SSD)), among others.
In some of the flows described in the present specification and claims and in the above-described figures, a number of operations are included that occur in a particular order, but it should be clearly understood that these operations may be performed out of order or in parallel as they occur herein, the order of the operations merely being used to distinguish between the various operations, and the order of execution does not itself represent any order of execution. Additionally, the flows may include more or fewer operations, and the operations may be performed sequentially or in parallel.
It will be understood by those skilled in the art that the foregoing is only a preferred embodiment of the present invention, and is not intended to limit the invention, and that any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention should be included in the scope of the present invention.

Claims (8)

1. A method for realizing virtual keys of a home gateway is characterized by comprising the following steps:
detecting the plug-pull state change of a physical port of the home gateway, and generating a virtual information group according to the plug-pull state change of the physical port;
generating virtual keys according to the at least two virtual information groups; the generating of the virtual key according to the at least two virtual information groups includes: driving a virtual key state machine to generate virtual keys through a virtual information group; the virtual key is generated by driving a virtual key state machine through a virtual information group, and the method comprises the following steps: the virtual key state machine is transferred to the next state within the set overtime by the current state, and the state is composed of a plurality of virtual information groups generated by one-time plugging and unplugging action of a physical port; if the state is transferred to a virtual key definition state, determining the virtual key and returning to an initialization state again, wherein the virtual key corresponds to a virtual information group sequence formed by each virtual information group of the virtual key state machine transfer state; if the state is transferred to the undefined state, the state is restored to the initialized state; if the state transition time is exceeded, the virtual key state machine is recovered to an initialization state;
and executing the virtual key.
2. The method for implementing the virtual key of the home gateway as claimed in claim 1, wherein the virtual information group comprises a physical port number and a physical port plug signal.
3. The method for implementing the virtual key of the home gateway according to claim 1 or 2, wherein the generating the virtual key according to at least two virtual information groups comprises:
and generating a virtual information group sequence according to at least two virtual information groups, and determining a corresponding virtual key according to the virtual information group sequence.
4. The method as claimed in claim 1, wherein the Timeout timer is cleared each time the state machine transitions to a new state, and if the Timeout timer exceeds the state transition time T, a Timeout signal Timeout is sent to the state machine, and the state machine closes the Timeout timer when in an initialized state.
5. The method for implementing the virtual key of the home gateway as claimed in claim 1 or 2, wherein the physical ports are a plurality of physical ports of the same type or a plurality of physical ports of different types.
6. The method as claimed in claim 5, wherein when the physical port is a plurality of physical ports of different types, the virtual information group further includes a physical port type.
7. The method for implementing the virtual key of the home gateway according to claim 2, wherein the plugging/unplugging state of the physical port is as follows:
physical port insertion signals or physical port extraction signals; the physical port insertion signal includes an instant insertion signal or a physical port insertion sub-signal generated according to a physical port insertion duration.
8. The utility model provides a virtual button of home gateway realizes system which characterized in that, includes port virtualization module, button definition module, signal detection module, virtual information group generation module, virtual button state machine module, button execution module, wherein:
the port virtualization module is used for defining the physical port type and the physical port number and defining a virtual information group corresponding to each physical port in a plugging state;
the key definition module is used for predefining virtual information group sequences corresponding to different virtual keys and functions corresponding to the virtual keys;
the signal detection module is used for detecting a physical port plugging signal;
the virtual information group generating module is used for generating a virtual information group according to the detected physical port type, the physical port plugging signal and the physical port number;
the virtual key state machine module is used for receiving the virtual information group and transferring the state within the set overtime time T;
and the key execution module is used for executing the functions of the virtual keys.
CN202010508879.6A 2020-06-06 2020-06-06 Method and system for realizing virtual key of home gateway Active CN111901231B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010508879.6A CN111901231B (en) 2020-06-06 2020-06-06 Method and system for realizing virtual key of home gateway

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010508879.6A CN111901231B (en) 2020-06-06 2020-06-06 Method and system for realizing virtual key of home gateway

Publications (2)

Publication Number Publication Date
CN111901231A CN111901231A (en) 2020-11-06
CN111901231B true CN111901231B (en) 2021-12-14

Family

ID=73208032

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010508879.6A Active CN111901231B (en) 2020-06-06 2020-06-06 Method and system for realizing virtual key of home gateway

Country Status (1)

Country Link
CN (1) CN111901231B (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106020704A (en) * 2016-05-30 2016-10-12 乐视控股(北京)有限公司 Virtual key triggering method and mobile terminal thereof
CN107193476A (en) * 2017-05-10 2017-09-22 北京百度网讯科技有限公司 Data inputting method and device, computer equipment and computer-readable recording medium

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1684467B (en) * 2004-04-16 2011-01-05 华为技术有限公司 Control method of plug-in and plug-out end of interface plate and plug-in and plug-out end device of interface plate
JP5074457B2 (en) * 2009-06-04 2012-11-14 株式会社日立製作所 Computer system, switch switching method, and PCI switch
US9098644B2 (en) * 2013-08-29 2015-08-04 Lenovo Enterprise Solutions (Singapore) Pte. Ltd. Asserting physical presence to a trusted platform module by physically connecting or disconnecting a hot pluggable device
US9306865B2 (en) * 2014-03-12 2016-04-05 Oracle International Corporation Virtual port mappings for non-blocking behavior among physical ports

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106020704A (en) * 2016-05-30 2016-10-12 乐视控股(北京)有限公司 Virtual key triggering method and mobile terminal thereof
CN107193476A (en) * 2017-05-10 2017-09-22 北京百度网讯科技有限公司 Data inputting method and device, computer equipment and computer-readable recording medium

Also Published As

Publication number Publication date
CN111901231A (en) 2020-11-06

Similar Documents

Publication Publication Date Title
CN102591834B (en) Single wire bus system
US20110055627A1 (en) Seamless Application Session Reconstruction Between Devices
CN104765466B (en) The key control method and device of mobile terminal
CN106502371A (en) A kind of electricity-saving control method and device
CN103067578A (en) Intelligent lock screen function achieving method based on mobile terminal and mobile terminal
CN102968335A (en) Terminal and terminal memory management method
CN106507180A (en) A kind of method of Video processing and terminal
CN103324549A (en) Method for realizing sleep standby and communication terminal
CN114095776B (en) Screen recording method and electronic equipment
CN110266505A (en) A kind of method and apparatus managing session group
CN112765082A (en) Multi-host arbitration method and device and readable storage medium
CN109902056A (en) A kind of method, apparatus of serial transmission, equipment and computer readable storage medium
CN1896948B (en) Low power digital audio decoding/playing system for computing devices
CN103870319B (en) Information processing method, device and electronic equipment
CN111901231B (en) Method and system for realizing virtual key of home gateway
CN100481895C (en) Method and device for carrying out TV set software upgrade
CN103310001A (en) Method and device for setting video list
CN110162563A (en) A kind of data storage method, system and electronic equipment and storage medium
CN105306985A (en) Method and system for intelligent locking and unlocking of video playing interface, and mobile terminal
WO2023246638A1 (en) Information processing method and apparatus, wearable device and electronic device
CN101458672B (en) Hot plug equipment, computer and data-transmission indicating method
CN108490824B (en) Intelligent electric appliance control method, device and mobile terminal
CN104867508B (en) A kind of method and apparatus that audio files continuously plays
CN110795369A (en) Method and terminal for realizing MIDO slave function based on GPIO pin
CN104519091A (en) Method for system start-up optimization, and device

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