CN104636103A - Keyboard data transmission method and device - Google Patents

Keyboard data transmission method and device Download PDF

Info

Publication number
CN104636103A
CN104636103A CN201410855697.0A CN201410855697A CN104636103A CN 104636103 A CN104636103 A CN 104636103A CN 201410855697 A CN201410855697 A CN 201410855697A CN 104636103 A CN104636103 A CN 104636103A
Authority
CN
China
Prior art keywords
key
button
message
key assignments
pressed
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201410855697.0A
Other languages
Chinese (zh)
Other versions
CN104636103B (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.)
Huawei Technologies Co Ltd
Original Assignee
Huawei 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 Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to CN201410855697.0A priority Critical patent/CN104636103B/en
Publication of CN104636103A publication Critical patent/CN104636103A/en
Application granted granted Critical
Publication of CN104636103B publication Critical patent/CN104636103B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/02Input arrangements using manually operated switches, e.g. using keyboards or dials
    • G06F3/023Arrangements for converting discrete items of information into a coded form, e.g. arrangements for interpreting keyboard generated codes as alphanumeric codes, operand codes or instruction codes
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/03Arrangements for converting the position or the displacement of a member into a coded form
    • G06F3/033Pointing devices displaced or positioned by the user, e.g. mice, trackballs, pens or joysticks; Accessories therefor
    • G06F3/038Control and interface arrangements therefor, e.g. drivers or device-embedded control circuitry

Landscapes

  • Engineering & Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Input From Keyboards Or The Like (AREA)

Abstract

The invention discloses a keyboard data transmission method and device which are used for solving the problem that in the prior art, due to the situations that network is not stable and the message delay is long, keyboard data are repeatedly transmitted. The method includes the steps that when a key on a keyboard of a client side is detected to be pressed, key information used for indicating that the key is pressed is generated and sent to a server, and the key information carries the key value corresponding to the pressed key; before the key is detected to be released, when the time interval between the current time to the time when the key information is sent last time exceeds the preset duration threshold value in each time of judgment, the generated key information stops being sent to the server again till the key is detected to be released; the preset duration threshold value is the experience duration value needed when the key is recognized to be normally pressed.

Description

A kind of keyboard data transmission method and device
Technical field
The present invention relates to communication technical field, particularly relate to a kind of keyboard data transmission method and device.
Background technology
Long-range KVM (the abbreviation of Key, Vedio and Mouse, keyboard, mouse and display) technology i.e. KVM Over IP technology, that the video data of server is packaged into the client of IP data packet transmission to far-end, client is reduced into original KVM data through process and shows, thus client reaches the object of monitoring.Client returns to server in the same way the mouse of user operation and keyboard data again, thus completes the interactive function of data.
Existing KVM is undertaken by the mode of simulation local hardware keyboard, and transmitting a complete button needs dependence two message, one be key assignments press message, the release message of a key assignments.Far-end server end determines the input number of user's character according to the time interval of these two message.If user presses the k key of lower keyboard, then within the normal time, (this time can first be determined, can be about 50 milliseconds) unclamps at once, and now server can think that user is input k; If but user just unclamps after waiting for 150ms after pressing k key, now, server determines that user inputs multiple k key.
Prior art shows well in the low-down LAN (Local Area Network) of network delay, but when using in the higher LAN (Local Area Network) of network delay or wide area network, then there will be serious keyboard Multiple Bonds problem.Such as: that user inputs at local client is root, after being transmitted by network delay or processing time delay, may be roooooot in the identification of far-end server end, namely the time delay in transmitting procedure of the release event of o is long, user inputs roooooot to cause server end to be determined, instead of real root, there is serious keyboard error of transmission phenomenon, thus the demand of user can not be met.
Summary of the invention
The embodiment of the present invention provides a kind of transmission method and device of keyboard data, in order to solve the problem due to situation lower keyboard data transmission repetitions such as unstable networks, message delay height existed in prior art.
First aspect, embodiments provides a kind of keyboard data transmission method, comprising:
When the button detecting on client keyboard is pressed, generates and be used to indicate press key message that described button is pressed and send to server, in described press key message, carry the key assignments that the button that is pressed is corresponding;
Before detecting that described button is released, when each judgement time interval obtained when current time distance once sending described press key message exceedes preset duration threshold value, the described press key message generated is sent to server, again until detect that described button terminates when being released;
Described preset duration threshold value is the experience duration value required when normally being pressed of key range.
In conjunction with first aspect, in the first possible implementation of first aspect, the described press key message by generation sends to server, comprising:
By key assignments buffer memory corresponding for the button be pressed;
The key assignments of buffer memory is carried in press key message and sends to described server;
Described method also comprises:
When detecting that described button is released, the described key assignments of buffer memory is deleted.
In conjunction with the first possible implementation of first aspect, in the implementation that the second of first aspect is possible, after key assignments buffer memory corresponding for the button that is pressed, the key assignments of buffer memory is carried in press key message before sending to described server, comprises:
Determine that the key assignments of buffer memory is effective.
In conjunction with the first of first aspect and first aspect to any one in the possible implementation of the second, in the third possible implementation of first aspect, also comprise:
When detecting that described button is released, the key assignments that described button is corresponding if determine is key assignments corresponding to function key, generates corresponding button release message and also sends to described server.
In conjunction with the third possible implementation of first aspect, in the 4th kind of possible implementation of first aspect, described the press key message of generation or button release message are sent to described server, comprising:
The press key message of generation or button release message are sent to described server by network.
Second aspect, the embodiment of the present invention additionally provides a kind of keyboard data transmission method, comprising:
When receiving the press key message of client transmission, identify the key assignments carried in described press key message;
Receiving in the first preset duration threshold value that press key message starts, during button release message corresponding to the described press key message that client sends if do not receive, confirm that the described key assignments identified is pressed once on described client keyboard;
Described first preset duration threshold value is the experience duration value required when normally being pressed of key range.
In conjunction with second aspect, in the first possible implementation of second aspect, the described key assignments that described confirmation identifies is pressed once on described client keyboard, comprising:
The button release message that the press key message that structure receives is corresponding;
According to the described button release message of structure, confirm that the described key assignments identified is pressed once on described client keyboard.
In conjunction with the first possible implementation of second aspect, in the implementation that the second of second aspect is possible, when the described key assignments determining to identify is key assignments corresponding to function key entirely, the described key assignments that described confirmation identifies is pressed once on described client keyboard, comprising:
If determine, this receives the press key message carrying described key assignments and is greater than the second preset duration threshold value with the last mistiming receiving the press key message carrying described key assignments, then confirm that the described key assignments identified is pressed once on described client keyboard;
Described second preset duration threshold value is worth by the experience continuing to press required for twice for key range interval time.
In conjunction with the implementation that the second of second aspect is possible, in the third possible implementation of second aspect, if determine, this receives the press key message that carries described key assignments when being less than or equal to the second preset duration threshold value with the last mistiming receiving the press key message carrying described key assignments, abandons the described press key message that this receives.
The third aspect, embodiments provides a kind of keyboard data transmitting device, comprising:
Detecting unit, for detecting that the button on client keyboard is pressed;
Generation unit, when the button for detecting on client keyboard at described detecting unit is pressed, generates the press key message being used to indicate described button and being pressed; The key assignments that the button that is pressed is corresponding is carried in described press key message;
Transmitting element, sends to server for the press key message generated by described generation unit;
Judging unit, before detecting that described button is released at described detecting unit, judges that current time exceedes preset duration threshold value apart from time interval during the described press key message of last transmission; Described preset duration threshold value is the experience duration value required when normally being pressed of key range;
Described transmitting element, time also for judging that obtaining current time exceedes preset duration threshold value apart from time interval during the described press key message of last transmission at every turn, the described press key message generated by described generation unit sends to server again, until described detecting unit detects that described button terminates when being released.
In conjunction with the third aspect, in the first possible implementation of the third aspect, also comprise buffer unit, when the button for detecting on client keyboard at described detecting unit is pressed, by key assignments buffer memory corresponding for the button that is pressed;
Described transmitting element, specifically for the key assignments of described buffer unit buffer memory is carried at described generation unit generate press key message in send to described server;
Also comprise delete cells, for when described detecting unit detects that described button is released, the described key assignments of described buffer unit buffer memory is deleted.
In conjunction with the first possible implementation of the third aspect, in the implementation that the second of the third aspect is possible, also comprise:
Determining unit, before the key assignments buffer memory button that is pressed is corresponding at described buffer unit, determines that the key assignments that the button that is pressed is corresponding is effective.
In conjunction with the first of the third aspect and the third aspect to any one in the possible implementation of the second, in the third possible implementation of the third aspect, also comprise:
Second determining unit, for when described detecting unit detects that described button is released, determines that whether key assignments that described button is corresponding is key assignments corresponding to function key;
Described generation unit, time also for determining that in described second determining unit key assignments that described button is corresponding is key assignments corresponding to function key, generates corresponding button release message;
Described transmitting element, the button release message also for being generated by described generation unit sends to described server.
In conjunction with the third possible implementation of the third aspect, in the 4th kind of possible implementation of the third aspect, described transmitting element, sends to described server specifically for the press key message that generated by described generation unit or button release message by network.
Fourth aspect, the embodiment of the present invention additionally provides a kind of keyboard data transmitting device, comprising:
Receiving element, for receiving the press key message that client sends;
Recognition unit, for receive at described receiving element client send press key message time, identify the key assignments carried in described press key message;
Determining unit, receive in the first preset duration threshold value that press key message starts for receiving element described in this, if when described receiving element does not receive button release message corresponding to described press key message that client sends all the time, confirm that the described key assignments identified is pressed once on described client keyboard;
Described first preset duration threshold value is the experience duration value required when normally being pressed of key range.
In conjunction with fourth aspect, in the first possible implementation of fourth aspect, also comprise:
Tectonic element, for constructing button release message corresponding to press key message that receiving element described in this receives;
Described determining unit, the described button release message specifically for constructing according to described tectonic element confirms that the described key assignments identified is pressed once on described client keyboard.
In conjunction with the first possible implementation of fourth aspect, in the implementation that the second of fourth aspect is possible, described determining unit, also before confirming that the described key assignments identified is pressed once on described client keyboard, when the described key assignments identified if determine is key assignments corresponding to function key entirely, determine that this receives the press key message carrying described key assignments and is greater than the second preset duration threshold value with the last mistiming receiving the press key message carrying described key assignments, then confirm that the described key assignments identified is pressed once on described client keyboard;
Described second preset duration threshold value is worth by the experience continuing to press required for twice for key range interval time.
In conjunction with the implementation that the second of fourth aspect is possible, in the third possible implementation of fourth aspect, discarding unit, if for described determining unit determine this receive the press key message that carries described key assignments be less than or equal to the second preset duration threshold value with the last mistiming receiving the press key message carrying described key assignments time, abandon the described press key message that this receives.
In the embodiment of the present invention, client is when detecting that on keyboard, certain button is pressed, generate the press key message being used to indicate described button and being pressed, then this press key message is sent to server, before detecting that described button is released, when each judgement time interval obtained when current time distance once sending described press key message exceedes preset duration threshold value, the described press key message generated is sent to server again, until detect that described button terminates when being released, thus make server determine the number of times of the key assignments that user inputs according to the number of times of the press key message received, when unstable networks or message delay is high, can not because of receive client send key assignments release message delay and cause server to judge identification receives this key assignments multiple, keyboard data is caused to transmit the problem repeated.
Accompanying drawing explanation
A kind of keyboard data transmission method process flow diagram that Fig. 1 provides for the embodiment of the present invention;
A kind of keyboard data transmission schematic diagram that Fig. 2 provides for the embodiment of the present invention;
The another kind of keyboard data transmission method process flow diagram that Fig. 3 provides for the embodiment of the present invention;
Another keyboard data transmission method process flow diagram that Fig. 4 provides for the embodiment of the present invention;
Another keyboard data transmission method process flow diagram that Fig. 5 provides for the embodiment of the present invention;
A kind of keyboard data transmitting device schematic diagram that Fig. 6 provides for the embodiment of the present invention;
The client device schematic diagram that Fig. 7 provides for the embodiment of the present invention;
The another kind of keyboard data transmitting device schematic diagram that Fig. 8 provides for the embodiment of the present invention;
The server-side devices schematic diagram that Fig. 9 provides for the embodiment of the present invention.
Embodiment
In order to make the object, technical solutions and advantages of the present invention clearly, below in conjunction with accompanying drawing, the present invention is described in further detail, and obviously, described embodiment is only the present invention's part embodiment, instead of whole embodiments.Based on the embodiment in the present invention, those of ordinary skill in the art, not making other embodiments all obtained under creative work prerequisite, belong to the scope of protection of the invention.
The embodiment of the present invention provides a kind of transmission method and device of keyboard data, in order to solve the problem due to situation lower keyboard data transmission repetitions such as unstable networks, message delay height existed in prior art.Wherein, method and apparatus is based on same inventive concept, and the principle of dealing with problems due to method and device is similar, and therefore the enforcement of apparatus and method can cross-reference, repeats part and repeats no more.
In the embodiment of the present invention, client is when detecting that on keyboard, certain button is pressed, generate the press key message being used to indicate described button and being pressed, then this press key message is sent to server, before detecting that described button is released, when each judgement time interval obtained when current time distance once sending described press key message exceedes preset duration threshold value, the described press key message generated is sent to server again, until detect that described button terminates when being released, thus make server determine the number of times of the key assignments that user inputs according to the number of times of the press key message received, when unstable networks or message delay is high, can not because of receive client send key assignments release message delay and cause server to judge identification receives this key assignments multiple, keyboard data is caused to transmit the problem repeated.
Embodiments provide a kind of keyboard data transmission method, the method is realized by client, and as shown in Figure 1, the method comprises:
Step 101, when the button detecting on the keyboard of client is pressed, generates and is used to indicate press key message that described button is pressed and sends to server, carries the key assignments that the button that is pressed is corresponding in described press key message.
Wherein, key assignments specifically can comprise key assignments corresponding to single key, can also be the key assignments that Macintosh is corresponding.Concrete detection method can pass through existing techniques in realizing, and the embodiment of the present invention does not do concrete restriction.
Step 102, before detecting that described button is released, when each judgement time interval obtained when current time distance once sending described press key message exceedes preset duration threshold value, the described press key message generated is sent to server, again until detect that described button terminates when being released.
Concrete, the press key message of generation is sent to server by network.
Wherein, described preset duration threshold value is the experience duration value required when normally being pressed of key range.
Alternatively, when each judgement time interval obtained when current time distance once sending described press key message exceedes preset duration threshold value, can be after the described press key message of each transmission, reach preset duration threshold value and do not detect that button is released, then the described press key message generated be sent to server again.Wherein, preset duration threshold value can be the keyboard scan cycle.That is, before detecting that described button is released, periodically the press key message of generation is sent to server.Thus make server each time when the press key message receiving described button reaches preset duration threshold value, confirm that the described key assignments identified is pressed once on described client keyboard.
Alternatively, will detect that the press key message of described key assignments is packaged into encrypted message and sends to server.
Such as, as shown in Figure 2, for K key.Client timing detects the state of keyboard, when being pressed of K key being detected, generate the press key message of K key, and press key message carries the key assignments of K key, and the press key message of the K key of generation is sent to server.The press key message of this K key can be packaged into encrypted message, send to server by network cycle, until detect that this K key is released.
Wherein in an embodiment, when the button detecting on client keyboard is pressed, by key assignments buffer memory corresponding for the button that is pressed; Then the key assignments of buffer memory being carried in the press key message of generation and sending to described server, when detecting that described button is released, the described key assignments of buffer memory being deleted.
Particularly, the key assignments that the button that buffer memory is pressed is corresponding, the order of the press key message corresponding with generating button is not construed as limiting, and then can generate press key message by first buffer memory key assignments, now can also generate press key message and carry out buffer memory, certainly can also carry out simultaneously.
Wherein, by key assignments buffer memory corresponding for the button that is pressed, can be specifically that this key assignments is saved in buffer zone.
Wherein in an embodiment, before key assignments buffer memory corresponding for the button that is pressed, the method can also comprise: determine that the key assignments that the button that is pressed is corresponding is effective.
Wherein, if when confirming invalid, do not carry out caching process, and the press key message carrying this key assignments can not be sent to server.
Alternatively, can also after the key assignments buffer memory corresponding at the button that will be pressed, determine that whether the key assignments of this buffer memory is effective.If determine, this key assignments is effective, before detecting that described button is released, when each judgement time interval obtained when current time distance once sending described press key message exceedes preset duration threshold value, the described press key message generated is sent to server again, until detect that described button terminates when being released, if determine, this key assignments is invalid, is deleted by this key assignments of buffer memory.Thus ensure the key assignments that can not there is buffer memory, namely the press key message that key-value pair is answered can not be sent to server.
Concrete, when the button detecting on the keyboard of client is pressed, by the buffer area that key assignments corresponding for this button is preserved at every turn.When detecting that this button is released, the key assignments being kept at buffer zone is deleted.Then periodically can determine whether preserve key assignments at buffer area, if when determining the key assignments preserved buffer zone, determine that whether this key assignments is effective.Determining effectively, before detecting that described button is released, the press key message carrying this key assignments generated periodically is sent to server, if determine, this key assignments is invalid, is deleted by this key assignments of buffer memory.If when determining that key assignments is not preserved in buffer zone, then can not send carry this key assignments press key message to server.
Such as, as shown in Figure 3, keyboard data transmission method specifically can realize in the following manner:
Step 301, when the button detecting on the keyboard of client is pressed, generates the press key message being used to indicate described button and being pressed; Perform step 302.
Step 302, is saved in buffer area by described key assignments; Perform step 303.
Step 303, determines that whether the key assignments being kept at buffer zone is effective, if so, performs step 304, if not, perform step 303.
Step 304, sends to server by the press key message carrying the key assignments being kept at buffer zone; Perform step 305.
Whether step 305, detect that the button that described key-value pair is answered is released when judging the time delay keyboard scan cycle, if not, performs step 303, if so, perform step 306.
Step 306, deletes the described key assignments being kept at buffer zone.
Wherein in an embodiment, when detecting that described button is released, the key assignments that described button is corresponding if determine is key assignments corresponding to function key, generates corresponding button release message and also sends to described server.
Concrete, send to described server by generating corresponding button release message by network.
Embodiments provide a kind of keyboard data transmission method, the method is realized by server end, and as shown in Figure 4, the method comprises:
Step 401, when receiving the press key message of client transmission, identifies the key assignments carried in described press key message.
Step 402, receiving in the first preset duration threshold value that press key message starts, during button release message corresponding to the described press key message that client sends if do not receive, confirms that the described key assignments identified is pressed once on described client keyboard.
Wherein, described first preset duration threshold value is the experience duration value required when normally being pressed of key range.
Concrete, the first preset time threshold can equal the keyboard scan cycle, can also be less than the keyboard scan cycle.
Wherein in an embodiment, confirm that the described key assignments that identifies is pressed once on described client keyboard, specifically can in the following manner:
The button release message that the press key message that structure receives is corresponding;
Described button release message according to structure confirms that the described key assignments identified is pressed once on described client keyboard.
Wherein, the button release message that the press key message received of structure is corresponding can be identical with the button release message that client in prior art sends.Can be specifically the d/d release data of button being configured to indicate described key-value pair to answer, release data can be set to zero, or other designation data, and the present invention does not do concrete restriction.
When being key assignments corresponding to function key entirely for the described key assignments determining to identify, confirm that the described key assignments identified is pressed once on described client keyboard, specifically can also in the following manner: when receiving button release message corresponding to press key message, determine that the described key assignments identified is pressed once on described client keyboard.
Concrete, confirm that the described key assignments identified is pressed the processing mode that once can be provided by prior art on described client keyboard according to the described button release message of structure, the present invention does not do concrete restriction.
Wherein in an embodiment, when the described key assignments determining to identify is key assignments corresponding to function key entirely, the described key assignments that described confirmation identifies is pressed once especially by with under type on described client keyboard:
If determine, this receives the press key message carrying described key assignments and is greater than the second preset duration threshold value with the last mistiming receiving the press key message carrying described key assignments, then confirm that the described key assignments identified is pressed once on described client keyboard.
Wherein, described second preset duration threshold value is worth by the experience continuing to press required for twice for key range interval time.
Wherein, function key can be Alt shift key, Shift shift, or Ctrl operating key etc.Can be numerical key for NOT-function key, letter key etc.
Concrete, when the described key assignments determining to identify is key assignments corresponding to function key entirely, receiving in the first preset duration threshold value that press key message starts, during button release message corresponding to described press key message that client sends if do not receive, determine that this receives the key assignments that press key message carries identical with the key assignments that the press key message that the last time receives carries, and determine that this receives press key message and is greater than the second preset duration threshold value with the last mistiming receiving press key message, confirm that the described key assignments identified is pressed once on described client keyboard.
Wherein in an embodiment, if determine, this receives the press key message that carries described key assignments when being less than or equal to the second preset duration threshold value with the last mistiming receiving the press key message carrying described key assignments, abandons the described press key message that this receives.
Such as, as shown in Figure 5, keyboard data transmission method specifically can realize in the following manner:
Step 501, when receiving the press key message of client transmission, identifies the key assignments carried in described press key message.Perform step 502.
Step 502, determines that whether the described key assignments that identifies is the key assignments of function key entirely, if so, performs step 503, if not, perform step 506.
Step 503, determines that the key assignments that carries in this press key message received and last time receive the key assignments carried in press key message identical, if so, performs step 504, if not, perform step 506.
Step 504, whether this this press key message received is less than the second preset duration threshold value with the last mistiming receiving this press key message, if so, performs step 505, if not, performs step 506.
Step 505, abandons the press key message that this receives.
Step 506, receives in the first preset duration threshold value that press key message starts at this, during button release message corresponding to the described press key message that client sends if do not receive all the time, constructs the button release message that this press key message received is corresponding; Described button release message according to structure confirms that the described key assignments identified is pressed once on described client keyboard.
The embodiment of the present invention additionally provides a kind of keyboard data transmitting device, and as shown in Figure 6, this device comprises:
Detecting unit 601, for detecting that the button on client keyboard is pressed.
Generation unit 602, when the button for detecting on client keyboard at described detecting unit 601 is pressed, generates the press key message being used to indicate described button and being pressed; The key assignments that the button that is pressed is corresponding is carried in described press key message.
Transmitting element 603, sends to server for the press key message generated by described generation unit 602.
Judging unit 604, before detecting that described button is released at described detecting unit 601, judges that current time exceedes preset duration threshold value apart from time interval during the described press key message of last transmission.
Wherein, described preset duration threshold value is the experience duration value required when normally being pressed of key range.
Described transmitting element 603, when also judging that obtaining current time exceedes preset duration threshold value apart from time interval during the described press key message of last transmission for each described judging unit 604, the described press key message that described generation unit 602 generates is sent to server again, until described detecting unit 601 detects that described button terminates when being released.
Wherein in an embodiment, this device also comprises buffer unit, when the button for detecting on client keyboard at detecting unit 601 is pressed, by key assignments buffer memory corresponding for the button that is pressed.
Described transmitting element 603, specifically for the key assignments of described buffer unit buffer memory is carried at described generation unit generate press key message in send to described server.
Also comprise delete cells, for when described detecting unit 601 detects that described button is released, the described key assignments of buffer memory is deleted.
Optionally, this device also comprises: the first determining unit, before the key assignments buffer memory button that is pressed is corresponding at described buffer unit, determines that the key assignments that the button that is pressed is corresponding is effective.
Wherein in an embodiment, this device also comprises: the second determining unit, for when described detecting unit 601 detects that described button is released, determines that whether key assignments that described button is corresponding is key assignments corresponding to function key;
Described generation unit 602, time also for determining that in described second determining unit key assignments that described button is corresponding is key assignments corresponding to function key, generates corresponding button release message;
Described transmitting element 603, the button release message also for being generated by described generation unit 602 sends to described server.
Concrete, described transmitting element 603, sends to described server specifically for the press key message that generated by described generation unit 602 or button release message by network.
The embodiment of the present invention additionally provides a kind of client device for keyboard data transmission, and this client device comprises keyboard 701, processor 702, storer 703, transceiver 704.Wherein, processor 702 is connected with keyboard 701, storer 703 and transceiver 704 respectively.The concrete connecting media between above-mentioned parts is not limited in the embodiment of the present invention, the embodiment of the present invention is in the figure 7 to connect by bus between storer 703, processor 702, transceiver 704, bus represents with thick line in the figure 7, connected mode between other parts, be only schematically illustrate, do not regard it as and be limited.
Storer 703 in the embodiment of the present invention, for the program code that storage of processor 702 performs, can be that ROM (read-only memory) is (English: read-only memory, be called for short: ROM), random access memory (random-access memory, be called for short: RAM), also can be EEPROM (Electrically Erasable Programmable Read Only Memo) (Electrically Erasable Programmable Read-Only Memory, be called for short: EEPROM), magnetic disk storage medium or other magnetic storage apparatus, or the program code that can be used in carrying or storing the expectation with instruction or data structure form also can by any other medium of computer access, but be not limited thereto, such as storer 703 can be the combination of above-mentioned storer.
Processor 702, can call the program code that storer 703 stores, and performs following operation according to described program code:
When processor 702 detects that the button on keyboard 701 is pressed, generate and be used to indicate the press key message that described button is pressed, and indicate transceiver that this press key message is sent to server, in described press key message, carry the key assignments that the button that is pressed is corresponding.
Before processor 702 detects that described button is released, when each judgement time interval obtained when current time distance once sending described press key message exceedes preset duration threshold value, the described press key message that processor 702 generates by transceiver 704 sends to server again, until processor 702 detects that described button terminates when being released.
Alternatively, processor 702 each judge that the time interval obtained when current time distance once sending described press key message exceedes preset duration threshold value time, can be each send described press key message after reach preset duration threshold value and do not detect that button is released time.Wherein, preset duration threshold value can be the keyboard scan cycle.
Wherein in a kind of implementation, before the press key message of generation is sent to server by transceiver 704, key assignments corresponding for the button be pressed is buffered in storer 703 by processor 702; Then the key assignments of buffer memory is carried in press key message and sends to described server by transceiver 704, when detecting that described button is released, is deleted by the described key assignments of buffer memory.
Wherein in an embodiment, before key assignments corresponding for the button be pressed is cached in storer 703 by processor 702, determine that the key assignments that the button that is pressed is corresponding is effective.Wherein, if when confirming invalid, do not carry out caching process, and can not indicate transceiver 704 that the press key message carrying this key assignments is sent to server.
Processor 702 is when detecting that described button is released, and whether the key assignments that described button is corresponding if determine is key assignments corresponding to function key, generates corresponding button release message, and indicates transceiver 704 that the button release message of generation is sent to described server.
The embodiment of the present invention additionally provides a kind of keyboard data transmitting device, and as shown in Figure 8, this device can be arranged at server, and this device comprises:
Receiving element 801, for receiving the press key message that client sends;
Recognition unit 802, for receive at described receiving element 801 client send press key message time, identify the key assignments carried in described press key message;
Determining unit 803, for receiving in the first preset duration threshold value that press key message starts at described receiving element 801, if when described receiving element 801 does not receive button release message corresponding to described press key message that client sends all the time, confirm that the described key assignments identified is pressed once on described client keyboard.
Wherein, described first preset duration threshold value is the experience duration value required when normally being pressed of key range.
Wherein in an embodiment, this device also comprises:
Tectonic element, for constructing button release message corresponding to press key message that described receiving element 801 receives;
Described determining unit 803, the described button release message specifically for constructing according to described tectonic element confirms that the described key assignments identified is pressed once on described client keyboard.
Optionally, described determining unit 803, also for before confirming that the described key assignments that identifies is pressed once on described client keyboard, determines that the described key assignments identified is not key assignments corresponding to function key entirely.
Optionally, described determining unit 803, also before confirming that the described key assignments identified is pressed once on described client keyboard, when the described key assignments identified if determine is key assignments corresponding to function key entirely, determine that this receives the press key message carrying described key assignments and is greater than the second preset duration threshold value with the last mistiming receiving the press key message carrying described key assignments, then confirm that the described key assignments identified is pressed once on described client keyboard;
Described second preset duration threshold value is worth by the experience continuing to press required for twice for key range interval time.
Optionally, this device also comprises: discarding unit, if for described determining unit 803 determine this receive the press key message that carries described key assignments be less than or equal to the second preset duration threshold value with the last mistiming receiving the press key message carrying described key assignments time, abandon the described press key message that this receives.
The embodiment of the present invention additionally provides a kind of server-side devices for keyboard data transmission, and this server-side devices comprises processor 901, storer 902, transceiver 903.Wherein, processor 901 is connected with storer 902 and transceiver 903 respectively.The concrete connecting media between above-mentioned parts is not limited in the embodiment of the present invention, the embodiment of the present invention is in fig .9 to connect by bus between storer 902, processor 901, transceiver 903, bus represents with thick line in fig .9, connected mode between other parts, be only schematically illustrate, do not regard it as and be limited.
Storer 902 in the embodiment of the present invention, for the program code that storage of processor 901 performs, can be that ROM (read-only memory) is (English: read-only memory, be called for short: ROM), random access memory (random-access memory, be called for short: RAM), also can be EEPROM (Electrically Erasable Programmable Read Only Memo) (Electrically Erasable Programmable Read-Only Memory, be called for short: EEPROM), magnetic disk storage medium or other magnetic storage apparatus, or the program code that can be used in carrying or storing the expectation with instruction or data structure form also can by any other medium of computer access, but be not limited thereto, such as storer 902 can be the combination of above-mentioned storer.
Processor 901, can call the program code that storer 902 stores, and performs following operation according to described program code:
When transceiver 903 receives the press key message of client transmission, processor 901 identifies the key assignments carried in described press key message;
Processor 901 receiving in the first preset duration threshold value that press key message starts, during button release message corresponding to the described press key message that client sends if do not receive all the time, confirms that the described key assignments identified is pressed once on described client keyboard.
Wherein in a kind of implementation, process 901 constructs button release message corresponding to the press key message that receives; Then confirm that the described key assignments identified is pressed once on described client keyboard according to the described button release message of structure.
Alternatively, if processor 901 is before confirming that the described key assignments identified is pressed once on described client keyboard, when the described key assignments identified if determine is key assignments corresponding to function key entirely, determine that this transceiver 903 receives the press key message carrying described key assignments and is greater than the second preset duration threshold value with the last mistiming receiving the press key message carrying described key assignments, then confirm that the described key assignments identified is pressed once on described client keyboard.
Alternatively, if processor 901 determines that this transceiver 903 receives the press key message that carries described key assignments when being less than or equal to the second preset duration threshold value with the last mistiming receiving the press key message carrying described key assignments, abandon the described press key message that this receives.
In the embodiment of the present invention, client is when detecting that on keyboard, certain button is pressed, generate the press key message being used to indicate described button and being pressed, then this press key message is sent to server, before detecting that described button is released, when each judgement time interval obtained when current time distance once sending described press key message exceedes preset duration threshold value, the described press key message generated is sent to server again, until detect that described button terminates when being released, thus make server when receiving press key message, receive in the first preset duration threshold value that press key message starts at this, during button release message corresponding to described press key message that client sends if do not receive all the time, confirm that the described key assignments identified is pressed once on described client keyboard.Thus complete once the process of key assignments corresponding to described button.Thus when unstable networks or message delay is high, can not because of receive client send key assignments release message delay and cause server to judge identification receives this key assignments multiple, cause keyboard data transmit repetition problem.
Those skilled in the art should understand, embodiments of the invention can be provided as method, system or computer program.Therefore, the present invention can adopt the form of complete hardware embodiment, completely software implementation or the embodiment in conjunction with software and hardware aspect.And the present invention can adopt in one or more form wherein including the upper computer program implemented of computer-usable storage medium (including but not limited to magnetic disk memory, CD-ROM, optical memory etc.) of computer usable program code.
The present invention describes with reference to according to the process flow diagram of the method for the embodiment of the present invention, equipment (system) and computer program and/or block scheme.Should understand can by the combination of the flow process in each flow process in computer program instructions realization flow figure and/or block scheme and/or square frame and process flow diagram and/or block scheme and/or square frame.These computer program instructions can being provided to the processor of multi-purpose computer, special purpose computer, Embedded Processor or other programmable data processing device to produce a machine, making the instruction performed by the processor of computing machine or other programmable data processing device produce device for realizing the function of specifying in process flow diagram flow process or multiple flow process and/or block scheme square frame or multiple square frame.
These computer program instructions also can be stored in can in the computer-readable memory that works in a specific way of vectoring computer or other programmable data processing device, the instruction making to be stored in this computer-readable memory produces the manufacture comprising command device, and this command device realizes the function of specifying in process flow diagram flow process or multiple flow process and/or block scheme square frame or multiple square frame.
These computer program instructions also can be loaded in computing machine or other programmable data processing device, make on computing machine or other programmable devices, to perform sequence of operations step to produce computer implemented process, thus the instruction performed on computing machine or other programmable devices is provided for the step realizing the function of specifying in process flow diagram flow process or multiple flow process and/or block scheme square frame or multiple square frame.
Although describe the preferred embodiments of the present invention, those skilled in the art once obtain the basic creative concept of cicada, then can make other change and amendment to these embodiments.So claims are intended to be interpreted as comprising preferred embodiment and falling into all changes and the amendment of the scope of the invention.
Obviously, those skilled in the art can carry out various change and modification to the present invention and not depart from the spirit and scope of the present invention.Like this, if these amendments of the present invention and modification belong within the scope of the claims in the present invention and equivalent technologies thereof, then the present invention is also intended to comprise these change and modification.

Claims (18)

1. a keyboard data transmission method, is characterized in that, comprising:
When the button detecting on client keyboard is pressed, generates and be used to indicate press key message that described button is pressed and send to server, in described press key message, carry the key assignments that the button that is pressed is corresponding;
Before detecting that described button is released, when each judgement time interval obtained when current time distance once sending described press key message exceedes preset duration threshold value, the described press key message generated is sent to server, again until detect that described button terminates when being released;
Described preset duration threshold value is the experience duration value required when normally being pressed of key range.
2. the method for claim 1, is characterized in that, the described press key message by generation sends to server, comprising:
By key assignments buffer memory corresponding for the button be pressed;
The key assignments of buffer memory is carried in press key message and sends to described server;
Described method also comprises:
When detecting that described button is released, the described key assignments of buffer memory is deleted.
3. method as claimed in claim 2, is characterized in that, after key assignments buffer memory corresponding for the button that is pressed, is carried in press key message by the key assignments of buffer memory before sending to described server, comprises:
Determine that the key assignments of buffer memory is effective.
4. the method as described in any one of claims 1 to 3, is characterized in that, also comprises:
When detecting that described button is released, the key assignments that described button is corresponding if determine is key assignments corresponding to function key, generates corresponding button release message and also sends to described server.
5. method as claimed in claim 4, is characterized in that, described the press key message of generation or button release message is sent to described server, comprising:
The press key message of generation or button release message are sent to described server by network.
6. a keyboard data transmission method, is characterized in that, comprising:
When receiving the press key message of client transmission, identify the key assignments carried in described press key message;
Receiving in the first preset duration threshold value that press key message starts, during button release message corresponding to the described press key message that client sends if do not receive, confirm that the described key assignments identified is pressed once on described client keyboard;
Described first preset duration threshold value is the experience duration value required when normally being pressed of key range.
7. method as claimed in claim 6, it is characterized in that, the described key assignments that described confirmation identifies is pressed once on described client keyboard, comprising:
The button release message that the press key message that structure receives is corresponding;
According to the described button release message of structure, confirm that the described key assignments identified is pressed once on described client keyboard.
8. method as claimed in claim 7, is characterized in that, when the described key assignments determining to identify is key assignments corresponding to function key entirely, the described key assignments that described confirmation identifies is pressed once on described client keyboard, comprising:
If determine, this receives the press key message carrying described key assignments and is greater than the second preset duration threshold value with the last mistiming receiving the press key message carrying described key assignments, then confirm that the described key assignments identified is pressed once on described client keyboard;
Described second preset duration threshold value is worth by the experience pressed continuously required for twice for key range interval time.
9. method as claimed in claim 8, is characterized in that, also comprise:
If determine, this receives the press key message that carries described key assignments when being less than or equal to the second preset duration threshold value with the last mistiming receiving the press key message carrying described key assignments, abandons the described press key message that this receives.
10. a keyboard data transmitting device, is characterized in that, comprising:
Detecting unit, for detecting that the button on client keyboard is pressed;
Generation unit, when the button for detecting on client keyboard at described detecting unit is pressed, generates the press key message being used to indicate described button and being pressed; The key assignments that the button that is pressed is corresponding is carried in described press key message;
Transmitting element, sends to server for the press key message generated by described generation unit;
Judging unit, before detecting that described button is released at described detecting unit, judges that current time exceedes preset duration threshold value apart from time interval during the described press key message of last transmission; Described preset duration threshold value is the experience duration value required when normally being pressed of key range;
Described transmitting element, time also for judging that obtaining current time exceedes preset duration threshold value apart from time interval during the described press key message of last transmission at every turn, the described press key message generated by described generation unit sends to server again, until described detecting unit detects that described button terminates when being released.
11. devices as claimed in claim 10, is characterized in that, also comprise buffer unit, when the button for detecting on client keyboard at described detecting unit is pressed, by key assignments buffer memory corresponding for the button that is pressed;
Described transmitting element, specifically for the key assignments of described buffer unit buffer memory is carried at described generation unit generate press key message in send to described server;
Also comprise delete cells, for when described detecting unit detects that described button is released, the described key assignments of described buffer unit buffer memory is deleted.
12. devices as claimed in claim 11, is characterized in that, also comprise:
First determining unit, before the key assignments buffer memory button that is pressed is corresponding at described buffer unit, determines that the key assignments that the button that is pressed is corresponding is effective.
13. devices as described in any one of claim 10 ~ 12, is characterized in that, also comprise:
Second determining unit, for when described detecting unit detects that described button is released, determines that whether key assignments that described button is corresponding is key assignments corresponding to function key;
Described generation unit, time also for determining that in described second determining unit key assignments that described button is corresponding is key assignments corresponding to function key, generates corresponding button release message;
Described transmitting element, the button release message also for being generated by described generation unit sends to described server.
14. devices as claimed in claim 13, is characterized in that, described transmitting element, send to described server specifically for the press key message that generated by described generation unit or button release message by network.
15. 1 kinds of keyboard data transmitting devices, is characterized in that, comprising:
Receiving element, for receiving the press key message that client sends;
Recognition unit, for receive at described receiving element client send press key message time, identify the key assignments carried in described press key message;
Determining unit, receive in the first preset duration threshold value that press key message starts for receiving element described in this, if when described receiving element does not receive button release message corresponding to described press key message that client sends all the time, confirm that the described key assignments identified is pressed once on described client keyboard;
Described first preset duration threshold value is the experience duration value required when normally being pressed of key range.
16. devices as claimed in claim 15, is characterized in that, also comprise:
Tectonic element, for constructing button release message corresponding to press key message that receiving element described in this receives;
Described determining unit, the described button release message specifically for constructing according to described tectonic element confirms that the described key assignments identified is pressed once on described client keyboard.
17. devices as claimed in claim 16, it is characterized in that, described determining unit, also before confirming that the described key assignments identified is pressed once on described client keyboard, when the described key assignments identified if determine is key assignments corresponding to function key entirely, determine that this receives the press key message carrying described key assignments and is greater than the second preset duration threshold value with the last mistiming receiving the press key message carrying described key assignments, then confirm that the described key assignments identified is pressed once on described client keyboard;
Described second preset duration threshold value is worth by the experience continuing to press required for twice for key range interval time.
18. devices as claimed in claim 17, is characterized in that, also comprise:
Discarding unit, if for described determining unit determine this receive the press key message that carries described key assignments be less than or equal to the second preset duration threshold value with the last mistiming receiving the press key message carrying described key assignments time, abandon the described press key message that this receives.
CN201410855697.0A 2014-12-31 2014-12-31 A kind of keyboard data transmission method and device Expired - Fee Related CN104636103B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410855697.0A CN104636103B (en) 2014-12-31 2014-12-31 A kind of keyboard data transmission method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410855697.0A CN104636103B (en) 2014-12-31 2014-12-31 A kind of keyboard data transmission method and device

Publications (2)

Publication Number Publication Date
CN104636103A true CN104636103A (en) 2015-05-20
CN104636103B CN104636103B (en) 2017-12-22

Family

ID=53214910

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410855697.0A Expired - Fee Related CN104636103B (en) 2014-12-31 2014-12-31 A kind of keyboard data transmission method and device

Country Status (1)

Country Link
CN (1) CN104636103B (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107545198A (en) * 2017-05-18 2018-01-05 紫光华山信息技术有限公司 A kind of button management method and device
CN109492357A (en) * 2018-09-12 2019-03-19 华为技术有限公司 Identity identifying method, equipment and computer storage medium
CN109814735A (en) * 2019-01-25 2019-05-28 山东超越数控电子股份有限公司 Key assignments after key bounces sends processing method and system
CN110488989A (en) * 2019-07-02 2019-11-22 西安万像电子科技有限公司 Event-handling method and device

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1591296A (en) * 2003-09-03 2005-03-09 仁宝电脑工业股份有限公司 A computer device and method for coordinatingly controlling a touch panel and a keyboard
CN101533267A (en) * 2009-04-03 2009-09-16 白金颖 Button processing method and device based on button multiplexing remote controller
US20090305790A1 (en) * 2007-01-30 2009-12-10 Vitie Inc. Methods and Apparatuses of Game Appliance Execution and Rendering Service
US7712051B2 (en) * 2003-09-30 2010-05-04 Sap Ag Keyboard navigation in hierarchical user interfaces
CN101739805A (en) * 2009-12-21 2010-06-16 康佳集团股份有限公司 Method for releasing message by remote keying
CN102566920A (en) * 2011-12-22 2012-07-11 惠州Tcl移动通信有限公司 Electronic device and control method thereof

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1591296A (en) * 2003-09-03 2005-03-09 仁宝电脑工业股份有限公司 A computer device and method for coordinatingly controlling a touch panel and a keyboard
US7712051B2 (en) * 2003-09-30 2010-05-04 Sap Ag Keyboard navigation in hierarchical user interfaces
US20090305790A1 (en) * 2007-01-30 2009-12-10 Vitie Inc. Methods and Apparatuses of Game Appliance Execution and Rendering Service
CN101533267A (en) * 2009-04-03 2009-09-16 白金颖 Button processing method and device based on button multiplexing remote controller
CN101739805A (en) * 2009-12-21 2010-06-16 康佳集团股份有限公司 Method for releasing message by remote keying
CN102566920A (en) * 2011-12-22 2012-07-11 惠州Tcl移动通信有限公司 Electronic device and control method thereof

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107545198A (en) * 2017-05-18 2018-01-05 紫光华山信息技术有限公司 A kind of button management method and device
CN107545198B (en) * 2017-05-18 2020-02-11 新华三信息技术有限公司 Key management method and device
CN109492357A (en) * 2018-09-12 2019-03-19 华为技术有限公司 Identity identifying method, equipment and computer storage medium
CN109492357B (en) * 2018-09-12 2022-04-05 华为技术有限公司 Identity authentication method, identity authentication equipment and computer storage medium
CN109814735A (en) * 2019-01-25 2019-05-28 山东超越数控电子股份有限公司 Key assignments after key bounces sends processing method and system
CN109814735B (en) * 2019-01-25 2023-04-07 超越科技股份有限公司 Key value sending processing method and system after key bounce
CN110488989A (en) * 2019-07-02 2019-11-22 西安万像电子科技有限公司 Event-handling method and device

Also Published As

Publication number Publication date
CN104636103B (en) 2017-12-22

Similar Documents

Publication Publication Date Title
CN102801656B (en) Realize condition control method, the equipment and system of instant messaging application
CN104253741A (en) Information sending method and device and system thereof
CN104636103A (en) Keyboard data transmission method and device
CN110912805B (en) Synchronization method, terminal, server and system for message reading status
CN102594912A (en) Data processing method under server architecture, server and server architecture
CN104639646A (en) Method and equipment for processing user request
CN110851413A (en) Data synchronization method and device, electronic equipment and storage medium
CN102609409A (en) Online translation method, device, system and server
CN108809766A (en) A kind of method, apparatus and system obtaining RTT
CN112565062B (en) Processing method, related device, equipment and medium of instant messaging order
CN103139820A (en) Link detection method and network elements
CN103856644A (en) Voice over internet protocol prompting method and system
CN105490913A (en) Instant message processing method and device
CN104320766A (en) Spam short message identification method, device and equipment
CN104751327B (en) A kind of method and apparatus of activation card application
CN115883647B (en) Service log recording method, system, device, terminal, server and medium
CN105843612A (en) Method for switching virtual machines by terminal device and terminal device
CN110995780A (en) API calling method and device, storage medium and electronic equipment
CN105809056A (en) Communication message management method, device and related equipment
CN113595894B (en) Communication method, device, equipment and medium between service nodes and client nodes
CN105763511B (en) A kind of method for processing business and communication system
CN108512741A (en) Instant communication method, apparatus and system
CN103475574A (en) Method and device used for sending messages
CN115865734A (en) Fault detection method, data generation method, device, equipment and medium
CN113507407A (en) Information processing method, device, electronic equipment and storage medium

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20171222

Termination date: 20181231