CN112084081A - Keyboard detection method and device based on industrial control - Google Patents

Keyboard detection method and device based on industrial control Download PDF

Info

Publication number
CN112084081A
CN112084081A CN202010888960.1A CN202010888960A CN112084081A CN 112084081 A CN112084081 A CN 112084081A CN 202010888960 A CN202010888960 A CN 202010888960A CN 112084081 A CN112084081 A CN 112084081A
Authority
CN
China
Prior art keywords
keys
order
area
characters
ith
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.)
Pending
Application number
CN202010888960.1A
Other languages
Chinese (zh)
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.)
Suzhou RS Technology Co Ltd
Original Assignee
Suzhou RS Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Suzhou RS Technology Co Ltd filed Critical Suzhou RS Technology Co Ltd
Priority to CN202010888960.1A priority Critical patent/CN112084081A/en
Publication of CN112084081A publication Critical patent/CN112084081A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/22Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing
    • G06F11/2205Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing using arrangements specific to the hardware being tested
    • G06F11/2221Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing using arrangements specific to the hardware being tested to test input/output devices or peripheral units
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/22Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing
    • G06F11/2273Test methods
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/22Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing
    • G06F11/26Functional testing
    • G06F11/263Generation of test inputs, e.g. test vectors, patterns or sequences ; with adaptation of the tested hardware for testability with external testers

Abstract

The invention provides a keyboard detection method, which comprises the steps of dividing a keyboard into a plurality of areas and obtaining the number of keys in the areas; simultaneously pressing all keys in one area, receiving output information output after the keys are pressed, and obtaining the number of characters in the output information; judging whether the number of the keys is equal to the number of the characters; when the number of the keys is equal to the number of the characters, simultaneously pressing all the keys in other areas; and when the number of the keys is not equal to the number of the characters, subdividing the area into a plurality of areas, and not executing the continuous division of the area until the number of the keys in the divided area is the same as the number of the cylinders. The invention reduces the number of cylinders; the whole of each area is pressed, all keys are not directly pressed, and the detection efficiency is improved; the information output by the keyboard does not need to be converted into character strings to be matched with the character strings in the test instruction, and errors of data conversion caused by voltage fluctuation or electromagnetic fluctuation in the information conversion process are avoided.

Description

Keyboard detection method and device based on industrial control
Technical Field
The invention relates to the technical field of keyboard detection, in particular to a keyboard detection method and device based on industrial control.
Background
In the keyboard detection method in the prior art, a cylinder is controlled to press a keyboard, the keyboard to be detected is connected with an upper computer, the cylinder sequentially presses keys on the keyboard, and the pressed keys are displayed on a display screen of the upper computer. Whether a certain key in the keyboard works normally is known through a display screen of the upper computer.
However, in this detection method, each key in the keyboard needs to be pressed, the same number of cylinders as the number of keys needs to be arranged in the pressing mechanism, the cylinders correspond to the keys one to one, and the cylinders are sequentially controlled to drive the pressing fingers to press the corresponding keys to realize detection. In addition, in the conventional detection method, the information output by the keyboard needs to be converted into a character string to be matched with the character string in the test instruction to obtain a detection result, and in the information conversion process, errors of data conversion are easily caused by voltage fluctuation or electromagnetic fluctuation, so that the detection result is incorrect. In addition, all the keys are pressed in sequence for detection, so that the detection efficiency is too low, and large-scale detection cannot be realized.
Disclosure of Invention
Aiming at the defects in the prior art, the invention aims to provide a keyboard detection method and a keyboard detection device.
The technical scheme of the invention is summarized as follows:
in one aspect, the invention provides a keyboard detection method based on industrial control, which comprises the following steps:
dividing the keyboard into a plurality of ith-order areas, and obtaining the number Ni of keys in the ith-order areas;
simultaneously pressing all keys in the ith-order area, receiving output information output after the keys are pressed, and obtaining the number Mi of characters in the output information;
judging the number N of the keysiAnd the number M of charactersiWhether they are equal;
when the number of the keys is NiAnd the number M of charactersiWhen the number of the keys is equal, all the keys in other ith areas are pressed simultaneously;
when the number of the keys is NiAnd the number M of charactersiWhen the number of the keys in the (i + 1) th order area is not equal, the (i) th order area is subdivided into a plurality of (i + 1) th order areas, and all the keys are continuously pressed simultaneously in the (i + 1) th order area until the number of the keys in the (i + 1) th order area is Ni+1The continuation of the division of the (i + 1) th order region is not performed when the number of cylinders is the same.
Further, the subdividing the i-order region into a plurality of i + 1-order regions then includes:
obtaining the number N of keys in the i +1 th order areai+1
Simultaneously pressing all keys in the (i + 1) th order area, receiving output information output after the keys are pressed, and obtaining the number M of characters in the output informationi+1
Judging the number N of the keysi+1And the number M of charactersi+1Whether they are equal;
when the number of the keys is Ni+1And the number M of charactersi+1When the number of the keys is equal, all the keys in the (i + 1) th area are pressed simultaneously;
when the number of the keys is Ni+1And the number M of charactersiWhen the key number is not equal to the preset value, the (i + 1) th order area is divided again until the number N of the keys in the (i + 2) th order areai+2The continuation of the division of the i +2 th order region is not performed when the number of cylinders is the same.
Further, the pressing all the keys in the ith-stage area simultaneously comprises pressing all the keys in the ith-stage area simultaneously by the air cylinder driving pressing plate.
Further, the number N of the keys in the region up to the (i + 1) th orderi+1The same number of cylinders is notPerforming the continuous division of the (i + 1) th order region, including:
up to the number N of keys in the i +1 th areai+1And when the number of the cylinders is the same, the execution cylinder drives the pressing fingers to press the corresponding keys one by one, and the i +1 th area is not divided continuously.
Further, the keyboard is divided into a plurality of ith-order areas, and the number N of keys in the ith-order area is obtainediThe method comprises the following steps:
dividing the keyboard into a plurality of ith-order areas, and obtaining the number N of keys in the ith-order areaiAnd calling a pressing plate corresponding to the size of the ith-order area.
Further, all keys in the ith order area are pressed simultaneously, output information output after the keys are pressed is received, and the number M of characters in the output information is obtainediThe method comprises the following steps:
simultaneously pressing all keys in the ith-order area, receiving an output signal sent to the upper computer after the keys are pressed, and obtaining the number M of characters in the output signal sent to the upper computeri
Correspondingly, the invention also provides a keyboard detection device based on industrial control, which comprises:
a region dividing module for dividing the keyboard into multiple ith order regions to obtain the number N of keys in the ith order regioni
A character number obtaining module, configured to press all keys in the ith-order region simultaneously, receive output information output after the keys are pressed, and obtain a character number M in the output informationi
A judging module for judging the number N of the keysiAnd the number M of charactersiWhether they are equal;
when the number of the keys is NiAnd the number M of charactersiWhen the number of the keys is equal, all the keys in other ith-order areas are pressed simultaneously;
when the number of the keys is NiAnd the number M of charactersiWhen they are not equal, the ith order area is replacedDividing the key into a plurality of (i + 1) th-order areas, continuously pressing all keys in the (i + 1) th-order area simultaneously until the number N of the keys in the (i + 1) th-order areai+1The continuation of the division of the (i + 1) th order region is not performed when the number of cylinders is the same.
Further, the region dividing module is further configured to subdivide the i-order region into a plurality of i + 1-order regions, and then obtain the number N of keys in the i + 1-order regioni+1
The character number obtaining module is further configured to press all keys in the (i + 1) th order region simultaneously, receive output information output after the keys are pressed, and obtain the number M of characters in the output informationi+1
The judging module is also used for judging the number N of the keysi+1And the number M of charactersi+1Whether they are equal;
when the number of the keys is Ni+1And the number M of charactersi+1When the key pressing positions are equal, all keys in other (i + 1) th order areas are pressed simultaneously;
when the number of the keys is Ni+1And the number M of charactersiWhen the key number is not equal to the preset value, the (i + 1) th order area is divided again until the number N of the keys in the (i + 2) th order areai+2The continuation of the division of the (i + 1) th order region is not performed when the number of cylinders is the same.
Further, the pressing all the keys in the ith-stage area simultaneously comprises pressing all the keys in the ith-stage area simultaneously by the air cylinder driving pressing plate.
Further, the number N of the keys in the region up to the (i + 1) th orderi+1When the number of cylinders is the same, the i +1 th region is not divided, and the method comprises the following steps:
the number N of keys in the region up to the (i + 1) th orderi+1And when the number of the cylinders is the same, executing the cylinder to drive the pressing fingers to press the corresponding keys one by one, and not executing the continuous division of the (i + 1) th order area.
Compared with the prior art, the invention has the beneficial effects that:
the invention provides a keyboard detection method based on industrial control, which comprises the steps of dividing a keyboard into a plurality of areas, integrally pressing each area, judging whether the keys in the area are qualified or not by judging whether the number of the keys in the area is equal to the number of characters, and continuously dividing the area to narrow a search range when the number of the keys in the area is not equal to the number of characters until the number of the keys in the area is reduced to be equal to the number of cylinders. The number of the cylinders is reduced, and the electric quantity is saved. In addition, the method divides the keyboard into areas, integrally presses each area, does not need to directly press all keys, improves the detection efficiency, and can realize large-scale preliminary detection.
In addition, in the invention, only the number of characters in the output signal sent to the upper computer after the key press is obtained, and the detection result is obtained without converting the information output by the keyboard into the character string and matching the character string in the test instruction, thereby avoiding the data conversion error caused by voltage fluctuation or electromagnetic fluctuation in the information conversion process and ensuring the correctness of the detection result.
The foregoing description is only an overview of the technical solutions of the present invention, and in order to make the technical solutions of the present invention more clearly understood and to implement them in accordance with the contents of the description, the following detailed description is given with reference to the preferred embodiments of the present invention and the accompanying drawings. The detailed description of the present invention is given in detail by the following examples and the accompanying drawings.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the invention and together with the description serve to explain the invention without limiting the invention. In the drawings:
FIG. 1 is a process diagram of a keyboard inspection method based on industrial control according to the present invention;
FIG. 2 is a schematic flow chart of a keyboard detection method based on industrial control according to the present invention;
fig. 3 is a block diagram of an industrial control-based keyboard detecting device according to the present invention.
Detailed Description
The foregoing and other objects, features, aspects and advantages of the present invention will become more apparent from the following detailed description of the present invention when taken in conjunction with the accompanying drawings, which will enable those skilled in the art to practice the present invention with reference to the accompanying specification. In the drawings, the shape and size may be exaggerated for clarity, and the same reference numerals will be used throughout the drawings to designate the same or similar components. In the following description, terms such as center, thickness, height, length, front, back, rear, left, right, top, bottom, upper, lower, and the like are used based on the orientation or positional relationship shown in the drawings. In particular, "height" corresponds to the dimension from top to bottom, "width" corresponds to the dimension from left to right, and "depth" corresponds to the dimension from front to back. These relative terms are for convenience of description and are not generally intended to require a particular orientation. Terms concerning attachments, coupling and the like (e.g., "connected" and "attached") refer to a relationship wherein structures are secured or attached, either directly or indirectly, to one another through intervening structures, as well as both movable or rigid attachments or relationships, unless expressly described otherwise.
The present invention will be further described with reference to the accompanying drawings and the detailed description, and it should be noted that any combination of the embodiments or technical features described below can be used to form a new embodiment without conflict. It will be understood that terms such as "having," "including," and "comprising," as used herein, do not preclude the presence or addition of one or more other elements or groups thereof.
Example 1:
as shown in fig. 1 to 3, the keyboard detecting method based on industrial control of the present invention includes:
s10, dividing the keyboard into a plurality of ith-order areas with the same size, and obtaining the number Ni of keys in the ith area.
Step S10 further includes:
dividing the keyboard into a plurality of ith-order areas with the same size, and obtaining the number N of keys in the ith-order areaiThe pressing plate corresponding to the size of the ith stage area is called.
S20, simultaneously pressing all keys in the ith order area, receiving the output information output after the keys are pressed, and obtaining the number M of characters in the output informationi
In step S20, the step of simultaneously pressing all the keys in the ith-order region specifically includes that the air cylinder drives the pressing plate corresponding to the size of the ith-order region to simultaneously press all the keys in the ith-order region.
In step S20, the output information output after the key is pressed is received, and the number M of characters in the output information is obtainediThe method comprises the following steps:
receiving an output signal sent to the upper computer after the key is pressed, and obtaining the number M of characters in the output signal sent to the upper computeriOr obtaining the number of signals in the output signal sent to the upper computer by the keyboard as the number M of charactersi
In the process, only the number M of characters in an output signal sent to an upper computer by a keyboard is required to be obtainediOr the signal quantity in the output signal sent to the upper computer by the keyboard is obtained, the information output by the keyboard does not need to be converted into character strings, and then the character strings are compared with the character strings in the test instruction to obtain the detection result of whether the information is consistent, so that the error of data conversion caused by voltage fluctuation or electromagnetic fluctuation in the information conversion process is avoided, and the correctness of the detection result is ensured.
S30, judging the number N of keysiAnd the number of characters MiWhether they are equal;
when the number of keys is NiAnd the number of characters MiWhen the results are equal, executing step S40 to press all the keys in the other ith order area simultaneously;
when the number of keys is NiAnd the number of characters MiWhen the values are not equal, S50 is executed to subdivide the ith order area into a plurality of (i + 1) th order areas with the same size, and the (i + 1) th order area is continuously pressed simultaneously until the number N of the keys in the (i + 2) th order areai+2When the number of cylinders is the same, the continuous division of the (i + 1) th order region is not executedIs divided into a plurality of i +2 order areas with the same size.
Up to the number N of keys in the i +2 th order areai+2If the number of cylinders is the same, the step (i + 2) of continuously dividing the region is not executed, and the method comprises the following steps:
up to the number N of keys in the i +2 th order areai+2And when the number of the cylinders is the same as that of the cylinders, the execution cylinder drives the pressing fingers corresponding to the cylinders to press the corresponding keys one by one, and the i +2 th order area is not continuously divided.
It can be understood that, after the (i + 1) -th order area is reduced to a certain range, the number of the keys in the cylinder and the area is the same, and the keys which cause the number of the keys to be different from the number of the characters are found by performing one-to-one pressing detection.
Subdividing the i area into a plurality of i +1 th order areas with the same size, wherein the step S50 further includes:
s51, obtaining the number N of keys in the i +1 th order areai+1
S52, simultaneously pressing all keys in the (i + 1) th order area, receiving output information output after the keys are pressed, and obtaining the number M of characters in the output informationi+1
S53, judging the number N of keysi+1And the number of characters Mi+1Whether they are equal;
when the number of keys is Ni+1And the number of characters Mi+1When the key pressing positions are equal, all keys in other (i + 1) th order areas are pressed simultaneously;
when the number of keys is Ni+1And the number of characters MiWhen the number of the keys is not equal, the (i + 1) th order area is continuously divided into a plurality of (i + 2) th order areas with the same size until the number N of the keys in the (i + 2) th order areai+2The continuation of the division of the i +2 th order region is not performed when the number of cylinders is the same.
In specific embodiments, the present invention may specifically be:
s10, dividing the keyboard into 4-10 1 st order areas with the same size, and obtaining the number N of first keys in each 1 st order area1
Step S10 further includes:
dividing the keyboard into 4 to 10 1-order areas with the same size, and obtaining the number N of keys in each 1-order area1The pressing plate corresponding to the size of the 1 st step area is called.
S20, simultaneously pressing all keys in one 1 st order area, receiving output information output after the keys are pressed, and obtaining the first character number M in the output information1
In step S20, the simultaneous pressing of all the keys in the 1 st order area specifically includes the simultaneous pressing of all the keys in the 1 st order area by the air cylinder driving the pressing plate corresponding to the size of the 1 st order area.
In step S20, the output information outputted after the key is pressed is received, and the first character number M in the output information is obtained1The method comprises the following steps:
receiving an output signal sent to the upper computer after the key is pressed, and obtaining the first character number M in the output signal sent to the upper computer1
In the process, only the first character quantity M in the output signal sent to the upper computer by the keyboard is needed to be obtained1The information output by the keyboard does not need to be converted into character strings and then is compared with the character strings in the test instruction to obtain whether the detection results are consistent or not, so that the error of data conversion caused by voltage fluctuation or electromagnetic fluctuation in the information conversion process is avoided, and the correctness of the detection results is ensured.
S30, judging the number N of the first keys1And the first number of characters M1Whether they are equal;
when the number of the first keys is N1And the first number of characters M1When the two keys are equal, S40 is executed to press all the keys in the other 1 st step area simultaneously;
when the number of the first keys is N1And the first number of characters M1When the key number N is not equal to the preset value, S50 is executed to subdivide the 1 st order area into a plurality of 2 nd order areas with the same size, and the 2 nd order area is continuously pressed simultaneously for all keys until the number N of the keys in the 2 nd order area is equal to the preset value2The same number of cylinders is not performedAnd continuously dividing the 2 nd order area into a plurality of 3 rd order areas with the same size.
Up to the second number of keys N in the 2 nd order area2When the number of cylinders is the same, the step 2 area is not divided, and the step comprises the following steps:
up to the second number of keys N in the 2 nd order area2And when the number of the cylinders is the same, executing the cylinders to drive the pressing fingers corresponding to the cylinders, pressing the corresponding keys one by one, and not executing the continuous division of the 2 nd-order area.
It can be understood that, after the 2 nd order area is reduced to a certain range, the number of the keys in the cylinder and the area is the same, and the keys which cause the number of the keys to be different from the number of the characters are found by performing one-to-one pressing detection.
Subdividing the 1 region into a plurality of 2 nd order regions with the same size, and then, the step S50 further includes:
s51, obtaining the number N of second keys in the 2 nd order area2
S52, simultaneously pressing all keys in one 2 nd order area, receiving output information output after the keys are pressed, and obtaining the second character number M in the output information2
S53, judging the number N of second keys2And a second number M of characters2Whether they are equal;
when the number of the second keys is N2And a second number M of characters2If yes, executing S54 to press all the keys in the other 2 nd step area simultaneously;
when the number of the second keys is N2And a second number M of characters2If not, S55 is executed to continue dividing the 2 nd order area into multiple 3 rd order areas with the same size until the number N of the third keys in the 3 rd order area3The division of the 3 rd order region into a plurality of 4 th order regions is not performed when the number of cylinders is the same.
After the step S53 further includes the step of subdividing the 2 nd order area into a plurality of 3 rd order areas with the same size:
s531, obtaining the number of third keys in the 3 rd order areaN3
S532, simultaneously pressing all keys in the 3 rd order area, receiving output information output after the keys are pressed, and obtaining the third character number M in the output information3
S533, judging the number N of the third keys3And the third number of characters M3Whether they are equal;
when the number of the third keys is N3And the third number of characters M3When the key positions are equal, all keys in other 3 rd order areas are pressed simultaneously;
when the number of the third keys is N3And the third number of characters M3When the number of the fourth keys in the 4 th order area is not equal, the 3 rd order area is continuously divided into a plurality of 4 th order areas with the same size until the number N of the fourth keys in the 4 th order area4When the number of cylinders is the same, the division of the 3 rd order area into a plurality of 4 th order areas with the same size is not performed. Up to the fourth key number N in the 4 th order area4The division of the 4 th order region into the same number of cylinders is not performed.
Example 2:
referring to fig. 3, the present invention also provides an industrial control-based keyboard detecting apparatus, including:
and the region dividing module is used for S10 to divide the keyboard into a plurality of ith-order regions with the same size, and the number Ni of the keys in the ith-order regions is obtained.
Step S10 further includes:
dividing the keyboard into a plurality of ith-order areas with the same size, and obtaining the number N of keys in the ith-order areaiThe pressing plate corresponding to the size of the ith stage area is called.
And a character number obtaining module, configured to S20, press all the keys in the ith-order region simultaneously, receive output information output after the keys are pressed, and obtain the number Mi of characters in the output information.
In step S20, the step of simultaneously pressing all the keys in the ith-order region specifically includes that the air cylinder drives the pressing plate corresponding to the size of the ith-order region to simultaneously press all the keys in the ith-order region.
In step S20, the output information output after the key is pressed is received, and the number M of characters in the output information is obtainediThe method comprises the following steps:
receiving an output signal sent to the upper computer after the key is pressed, and obtaining the number M of characters in the output signal sent to the upper computeriOr obtaining the number of signals in the output signal sent to the upper computer by the keyboard as the number M of charactersi
In the process, only the number M of characters in an output signal sent to an upper computer by a keyboard is required to be obtainediOr the signal quantity in the output signal sent to the upper computer by the keyboard is obtained, the information output by the keyboard does not need to be converted into character strings, and then the character strings are compared with the character strings in the test instruction to obtain the detection result of whether the information is consistent, so that the error of data conversion caused by voltage fluctuation or electromagnetic fluctuation in the information conversion process is avoided, and the correctness of the detection result is ensured.
A judging module for judging the number N of the keys in S30iAnd the number of characters MiWhether they are equal;
when the number of keys is NiAnd the number of characters MiWhen the results are equal, executing step S40 to press all the keys in the other ith order area simultaneously;
when the number of keys is NiAnd the number of characters MiWhen the values are not equal, S50 is executed to subdivide the ith order area into a plurality of (i + 1) th order areas, and the (i + 1) th order areas are continuously executed to simultaneously press all keys until the number N of the keys in the (i + 2) th order areai+2The continuation of the division of the i +2 th region is not performed when the number of cylinders is the same.
Up to the number N of keys in the i +2 th order areai+2If the number of cylinders is the same, the step (i + 2) of continuously dividing the region is not executed, and the method comprises the following steps:
up to the number N of keys in the i +2 th order areai+2And when the number of the cylinders is the same as that of the cylinders, the execution cylinder drives the pressing fingers corresponding to the cylinders to press the corresponding keys one by one, and the i +2 th order area is not continuously divided.
It can be understood that, after the (i + 1) -th order area is reduced to a certain range, the number of the keys in the cylinder and the area is the same, and the keys which cause the number of the keys to be different from the number of the characters are found by performing one-to-one pressing detection.
And updating i to i +1, and calling the region division module.
The area dividing module is further used for subdividing the ith order area into a plurality of (i + 1) th order areas and then obtaining the number N of keys in the (i + 1) th order areai+1
The character number acquisition module is also used for simultaneously pressing all keys in the (i + 1) th order area, receiving output information output after the keys are pressed and acquiring the number M of characters in the output informationi+1
The judging module is also used for judging the number N of the keysi+1And the number of characters Mi+1Whether they are equal;
when the number of keys is Ni+1And the number of characters Mi+1When the key pressing positions are equal, all keys in other (i + 1) th order areas are pressed simultaneously;
when the number of keys is Ni+1And the number of characters MiWhen the number of the keys is not equal, the (i + 1) th order area is continuously divided into a plurality of (i + 2) th order areas with the same size until the number N of the keys in the (i + 2) th order areai+2The continuation of the division of the i +2 th order region is not performed when the number of cylinders is the same.
Compared with the prior art, the invention provides the keyboard detection method based on the industrial control, the keyboard is divided into a plurality of areas, each area is integrally pressed, whether the keys in the area are qualified or not is judged by judging whether the number of the keys in the area is equal to the number of the characters, and when the number of the keys in the area is not equal to the number of the characters, the area is continuously divided to reduce the search range until the number of the keys in the area is reduced to be equal to the number of the cylinders. The number of the cylinders is reduced, and the electric quantity is saved. In addition, the method divides the keyboard into areas, integrally presses each area, does not need to directly press all keys, improves the detection efficiency, and can realize large-scale preliminary detection.
In addition, in the invention, only the number of characters in the output signal sent to the upper computer after the key press is obtained, and the detection result is obtained without converting the information output by the keyboard into the character string and matching the character string in the test instruction, thereby avoiding the data conversion error caused by voltage fluctuation or electromagnetic fluctuation in the information conversion process and ensuring the correctness of the detection result.
While embodiments of the invention have been disclosed above, it is not limited to the applications listed in the description and the embodiments, which are fully applicable in all kinds of fields of application of the invention, and further modifications may readily be effected by those skilled in the art, so that the invention is not limited to the specific details without departing from the general concept defined by the claims and the scope of equivalents.
It should be noted that: the precedence order of the above embodiments of the present invention is only for description, and does not represent the merits of the embodiments. And specific embodiments thereof have been described above. Other embodiments are within the scope of the following claims. In some cases, the actions or steps recited in the claims may be performed in a different order than in the embodiments and still achieve desirable results. In addition, the processes depicted in the accompanying figures do not necessarily require the particular order shown, or sequential order, to achieve desirable results. In some embodiments, multitasking and parallel processing may also be possible or may be advantageous.
The embodiments in the present specification are described in a progressive manner, and the same and similar parts among the embodiments are referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, for the device and electronic apparatus embodiments, since they are substantially similar to the method embodiments, the description is relatively simple, and reference may be made to some descriptions of the method embodiments for relevant points.
The foregoing description has disclosed fully preferred embodiments of the present invention. It should be noted that those skilled in the art can make modifications to the embodiments of the present invention without departing from the scope of the appended claims. Accordingly, the scope of the appended claims is not to be limited to the specific embodiments described above.

Claims (10)

1. A keyboard detection method based on industrial control is characterized by comprising the following steps:
dividing the keyboard into a plurality of ith-order areas, and obtaining the number N of keys in the ith-order areai
Simultaneously pressing all keys in the ith order area, receiving output information output after the keys are pressed, and obtaining the number M of characters in the output informationi
Judging the number N of the keysiAnd the number M of charactersiWhether they are equal;
when the number of the keys is NiAnd the number M of charactersiWhen the number of the keys is equal, all the keys in other ith areas are pressed simultaneously;
when the number of the keys is NiAnd the number M of charactersiWhen the number of the keys in the (i + 1) th order area is not equal, the (i) th order area is subdivided into a plurality of (i + 1) th order areas, and all the keys are continuously pressed simultaneously in the (i + 1) th order area until the number of the keys in the (i + 1) th order area is Ni+1The continuation of the division of the (i + 1) th order region is not performed when the number of cylinders is the same.
2. The keyboard detection method based on industrial control as claimed in claim 1, wherein the subdividing of the i-order area into a plurality of i + 1-order areas, thereafter, comprises:
obtaining the number N of keys in the i +1 th order areai+1
Simultaneously pressing all keys in the (i + 1) th order area, receiving output information output after the keys are pressed, and obtaining the number M of characters in the output informationi+1
Judging the number N of the keysi+1And the number M of charactersi+1Whether they are equal;
when the number of the keys is Ni+1And the number M of charactersi+1When equal, all the other (i + 1) th regions are pressedKeys are pressed simultaneously;
when the number of the keys is Ni+1And the number M of charactersiWhen the key number is not equal to the preset value, the (i + 1) th order area is divided again until the number N of the keys in the (i + 2) th order areai+2The continuation of the division of the i +2 th order region is not performed when the number of cylinders is the same.
3. The method for detecting the keyboard based on the industrial control as claimed in claim 1, wherein the step of simultaneously pressing all the keys in the ith-order area comprises a step of simultaneously pressing all the keys in the ith-order area by a cylinder-driven pressing plate.
4. The keyboard detecting method of claim 1, wherein the number of keys N in the up to i +1 th order regioni+1If the number of cylinders is the same, the step (i + 1) of continuously dividing the region is not executed, and the method comprises the following steps:
up to the number N of keys in the i +1 th areai+1And when the number of the cylinders is the same, the execution cylinder drives the pressing fingers to press the corresponding keys one by one, and the i +1 th area is not divided continuously.
5. The keyboard detection method of claim 3, wherein the keyboard is divided into a plurality of ith order regions, and the number N of keys in the ith order region is obtainediThe method comprises the following steps:
dividing the keyboard into a plurality of ith-order areas, and obtaining the number N of keys in the ith-order areaiAnd calling a pressing plate corresponding to the size of the ith-order area.
6. The keyboard detection method based on industrial control as claimed in claim 1, wherein all keys in ith order area are pressed simultaneously, output information output after the keys are pressed is received, and the number M of characters in the output information is obtainediThe method comprises the following steps:
all keys in the ith order area are pressed simultaneously, and the receiving key is pressedThe output signal sent to the upper computer is obtained, and the number M of the characters in the output signal sent to the upper computer is obtainedi
7. A keyboard detection device based on industrial control is characterized by comprising:
a region dividing module for dividing the keyboard into multiple ith order regions to obtain the number N of keys in the ith order regioni(ii) a Wherein i is 1, 2, 3, … … and n, wherein n is more than or equal to 2;
a character number obtaining module, configured to press all keys in the ith-order region simultaneously, receive output information output after the keys are pressed, and obtain a character number M in the output informationi
A judging module for judging the number N of the keysiAnd the number M of charactersiWhether they are equal;
when the number of the keys is NiAnd the number M of charactersiWhen the number of the keys is equal, all the keys in other ith-order areas are pressed simultaneously;
when the number of the keys is NiAnd the number M of charactersiWhen the number of the keys in the (i + 1) th order area is not equal, the (i) th order area is subdivided into a plurality of (i + 1) th order areas, and all the keys are continuously pressed simultaneously in the (i + 1) th order area until the number of the keys in the (i + 1) th order area is Ni+1The continuation of the division of the (i + 1) th order region is not performed when the number of cylinders is the same.
8. The keyboard detecting device based on industrial control as claimed in claim 7, wherein the area dividing module is further configured to subdivide the i-th order area into a plurality of i + 1-th order areas, and then obtain the number of keys N in the i + 1-th order areai+1
The character number obtaining module is further configured to press all keys in the (i + 1) th order region simultaneously, receive output information output after the keys are pressed, and obtain the number M of characters in the output informationi+1
The judging module is also used for judgingNumber of keys Ni+1And the number M of charactersi+1Whether they are equal;
when the number of the keys is Ni+1And the number M of charactersi+1When the key pressing positions are equal, all keys in other (i + 1) th order areas are pressed simultaneously;
when the number of the keys is Ni+1And the number M of charactersiWhen the key number is not equal to the preset value, the (i + 1) th order area is divided again until the number N of the keys in the (i + 2) th order areai+2The continuation of the division of the (i + 1) th order region is not performed when the number of cylinders is the same.
9. The apparatus for detecting keyboard based on industrial control as claimed in claim 7, wherein said pressing all keys in ith order area simultaneously comprises pressing all keys in ith order area simultaneously by the air cylinder driving pressing board.
10. The keyboard detecting device based on industrial control as claimed in claim 7, wherein the number of keys N in the region up to the i +1 th orderi+1When the number of cylinders is the same, the i +1 th region is not divided, and the method comprises the following steps:
the number N of keys in the region up to the (i + 1) th orderi+1And when the number of the cylinders is the same, executing the cylinder to drive the pressing fingers to press the corresponding keys one by one, and not executing the continuous division of the (i + 1) th order area.
CN202010888960.1A 2020-08-28 2020-08-28 Keyboard detection method and device based on industrial control Pending CN112084081A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010888960.1A CN112084081A (en) 2020-08-28 2020-08-28 Keyboard detection method and device based on industrial control

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010888960.1A CN112084081A (en) 2020-08-28 2020-08-28 Keyboard detection method and device based on industrial control

Publications (1)

Publication Number Publication Date
CN112084081A true CN112084081A (en) 2020-12-15

Family

ID=73729425

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010888960.1A Pending CN112084081A (en) 2020-08-28 2020-08-28 Keyboard detection method and device based on industrial control

Country Status (1)

Country Link
CN (1) CN112084081A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114297013A (en) * 2021-12-31 2022-04-08 东莞市蓝科信息科技有限公司 Method and system for detecting keyboard of notebook computer and storage medium thereof

Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US4348761A (en) * 1980-09-08 1982-09-07 Pioneer Research, Inc. Portable field test unit for computer data and program storage disc drive
JPH05333985A (en) * 1992-05-27 1993-12-17 Oki Electric Ind Co Ltd Automatic testing device for keyboard
JPH06348532A (en) * 1993-06-11 1994-12-22 Patoraito:Kk Method for confirming operation of display device
US6314825B1 (en) * 1999-02-18 2001-11-13 Behavior Tech Computer Corp. Keyboard testing apparatus
KR20080097563A (en) * 2007-05-02 2008-11-06 오종구 Keyboard system and operating method thereof
CN102819472A (en) * 2011-06-08 2012-12-12 苏州三诺信息科技有限公司 Quick detecting method for laptop keyboard
CN103678065A (en) * 2013-12-10 2014-03-26 深圳市新国都技术股份有限公司 Method for testing code keyboard and code keyboard test machine
US8756499B1 (en) * 2013-04-29 2014-06-17 Google Inc. Gesture keyboard input of non-dictionary character strings using substitute scoring
CN107239137A (en) * 2017-04-25 2017-10-10 中国农业大学 A kind of character input method and device based on dummy keyboard
CN107329862A (en) * 2017-06-19 2017-11-07 北京小米移动软件有限公司 Detection method, device and the terminal of keyboard
CN109300725A (en) * 2018-09-30 2019-02-01 苏州富强科技有限公司 A kind of absorption type keyboard light transmission detection components

Patent Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US4348761A (en) * 1980-09-08 1982-09-07 Pioneer Research, Inc. Portable field test unit for computer data and program storage disc drive
JPH05333985A (en) * 1992-05-27 1993-12-17 Oki Electric Ind Co Ltd Automatic testing device for keyboard
JPH06348532A (en) * 1993-06-11 1994-12-22 Patoraito:Kk Method for confirming operation of display device
US6314825B1 (en) * 1999-02-18 2001-11-13 Behavior Tech Computer Corp. Keyboard testing apparatus
KR20080097563A (en) * 2007-05-02 2008-11-06 오종구 Keyboard system and operating method thereof
CN102819472A (en) * 2011-06-08 2012-12-12 苏州三诺信息科技有限公司 Quick detecting method for laptop keyboard
US8756499B1 (en) * 2013-04-29 2014-06-17 Google Inc. Gesture keyboard input of non-dictionary character strings using substitute scoring
CN103678065A (en) * 2013-12-10 2014-03-26 深圳市新国都技术股份有限公司 Method for testing code keyboard and code keyboard test machine
CN107239137A (en) * 2017-04-25 2017-10-10 中国农业大学 A kind of character input method and device based on dummy keyboard
CN107329862A (en) * 2017-06-19 2017-11-07 北京小米移动软件有限公司 Detection method, device and the terminal of keyboard
CN109300725A (en) * 2018-09-30 2019-02-01 苏州富强科技有限公司 A kind of absorption type keyboard light transmission detection components

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
侯正江;陶国良;周文;: "按键耐磨性能测试系统的研制", 液压气动与密封, no. 04, 15 August 2006 (2006-08-15), pages 4 - 6 *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114297013A (en) * 2021-12-31 2022-04-08 东莞市蓝科信息科技有限公司 Method and system for detecting keyboard of notebook computer and storage medium thereof

Similar Documents

Publication Publication Date Title
US8587557B2 (en) Touch position detection apparatus and method using multistage scan
CN112084081A (en) Keyboard detection method and device based on industrial control
CN1991786A (en) Software test method and software test apparatus
CN1900917A (en) Apparatus and method for testing system board
CN112149881B (en) DNA binding residue prediction method based on convolutional neural network
CN1892810A (en) Tuning device for musical instruments and computer program for the same
CN1716173A (en) Numeric keypad having keys assigned multiple-strokes for ideographic character input
CN1247615A (en) Method and appts. for recognizing patterns
US20090161187A1 (en) Output data generating image processing
JP4228233B2 (en) Color measuring device, color measuring method and color measuring program
CN100343801C (en) Method for producing intelligent virtual display
TWI395116B (en) Notebook computer and keyboard controller thereof
CN1098809A (en) Playing information analytical equipment and and sound detection device
CN1917035A (en) Method and apparatus of correcting color coordinate and display device including apparatus of correcting color coordinate
CN1731714A (en) System and method for testing RF module upstream channel gain and isolation degree
CN104394292A (en) Scanning correction method and image scanning module with correction function
CN112084079A (en) Method and device for detecting keyboard reaction capability based on industrial Internet
CN112434069A (en) Multi-source heterogeneous database access adaptation method and adapter
US7869914B2 (en) Vehicle quality analyzing system and plural data management method
CN112033717B (en) Keyboard detection system
CN111680438A (en) Metal plate stretching experiment data conversion processing method
US8959258B2 (en) Detection system for detecting button being pressed and method thereof
CN1713250A (en) Video signal processing apparatus and video signal processing method
CN1129101C (en) Electronic equipment with teaching-guiding function and its demonstration method of demonstrating process
CN2580444Y (en) Matrix keyboard circuit

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