CN113138910A - Input data acquisition method, device and medium - Google Patents
Input data acquisition method, device and medium Download PDFInfo
- Publication number
- CN113138910A CN113138910A CN202110441348.4A CN202110441348A CN113138910A CN 113138910 A CN113138910 A CN 113138910A CN 202110441348 A CN202110441348 A CN 202110441348A CN 113138910 A CN113138910 A CN 113138910A
- Authority
- CN
- China
- Prior art keywords
- function
- screen
- input data
- target
- character
- 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
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/30—Monitoring
- G06F11/34—Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment
- G06F11/3438—Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment monitoring of user actions
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F21/00—Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
- G06F21/50—Monitoring users, programs or devices to maintain the integrity of platforms, e.g. of processors, firmware or operating systems
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
- Y02D10/00—Energy efficient computing, e.g. low power processors, power management or thermal management
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- General Engineering & Computer Science (AREA)
- Computer Hardware Design (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Computer Security & Cryptography (AREA)
- Software Systems (AREA)
- Quality & Reliability (AREA)
- User Interface Of Digital Computer (AREA)
- Input From Keyboards Or The Like (AREA)
Abstract
The application discloses an input data acquisition method, an input data acquisition device and an input data acquisition medium, wherein the method comprises the steps of constructing corresponding relations between character codes and characters in advance, establishing a capture function based on a screen-up function, acquiring target character codes corresponding to input data and contained in the screen-up function through the capture function when the screen-up function executes screen-up operation of the input data, and determining target characters corresponding to the target character codes according to the corresponding relations. Because the screen-up function displays the character codes corresponding to the input data on the screen, the capture function established based on the screen-up function can accurately acquire the character codes contained in the screen-up function, namely the capture function can directly acquire the characters input by the user, so that character ambiguity generated when key information corresponding to the characters input by the user is acquired is avoided, the accuracy of acquiring the input data is improved, and the information collection capability is improved.
Description
Technical Field
The present application relates to the field of network space security, and in particular, to a method, an apparatus, and a medium for acquiring input data.
Background
With the increasing development of networks, information collection has become an indispensable part of the network space security field. At present, data input by a user through an input method is obtained, and key information of a keyboard is usually obtained based on a message hook (such as a Windows message hook) or a kernel-layer keyboard filtering mode, that is, the existing input data obtaining method can only obtain one letter, number and the like according to the key information, and cannot intuitively obtain the text content of the input data, for example, when the user inputs Chinese through pinyin, only pinyin letters corresponding to the Chinese can be obtained, and the Chinese often has the phenomenon of homophone and polyphone, so that the existing obtaining method cannot accurately obtain the input data of the user, the accuracy of obtaining the input data is reduced, and the information collecting capability is reduced.
Therefore, how to improve the accuracy of input data acquisition and thus the information collection capability is an urgent problem to be solved by those skilled in the art.
Disclosure of Invention
The application aims to provide an input data acquisition method, which is used for improving the accuracy of input data acquisition so as to improve the information collection capability. The purpose of this application is still to provide an input data acquisition device and medium.
In order to solve the above technical problem, the present application provides an input data obtaining method, including:
pre-constructing a corresponding relation between each character code and each character;
establishing a capture function according to the screen-on function;
under the condition that the screen-up function executes screen-up operation of input data, acquiring a target character code which is contained in the screen-up function and corresponds to the input data through the capture function;
determining a target character corresponding to the target character code according to the corresponding relation;
the screen-up function is specifically a function for displaying the input data, and the screen-up operation is specifically an instruction operation for displaying the input data.
Preferably, when the screen-up function executes the screen-up operation on the input data, the acquiring, by the capture function, the target text code included in the screen-up function and corresponding to the input data specifically includes:
establishing an assembly function containing the context environment data of the capture function and the screen-up function according to the screen-up function;
establishing a jump instruction corresponding to the assembly function;
inserting the jump instruction into the screen-up function;
under the condition that the screen-up function executes the input data to perform the screen-up operation, the assembly function calls the capture function through the jump instruction so that the capture function can acquire the target character code;
and under the condition that the acquisition of the capture function is finished, the screen-up function continues to finish the screen-up operation through the assembly function and the context environment data.
Preferably, the inserting the jump instruction into the screen-up function specifically includes:
acquiring an address of the screen-up function;
and inserting the jump instruction according to the address.
Preferably, the screen-up function is specifically: ImmGetComositionStringW or CRange:SetText.
Preferably, when the screen-up function is the immgetcomposionstringw, the acquiring an address of the screen-up function specifically includes:
acquiring a DLL handle corresponding to the ImmGetComositionStringW;
and acquiring the address of the ImmGetComposionStringW according to the DLL handle.
Preferably, when the screen loading function is CRange:: SetText, the acquiring the address of the screen loading function specifically comprises:
and obtaining the address of the CRange SetText by a method for searching the feature code.
Preferably, before determining the target text corresponding to the target text code according to the corresponding relationship, the method further includes:
classifying the corresponding relation according to the character category;
acquiring a character coding range corresponding to each category;
acquiring a target character coding range of the target character coding;
determining the target character corresponding to the target character code according to the corresponding relationship, specifically:
and under the condition that the target character coding range is matched with the character coding range corresponding to the target category, determining the target characters according to the target corresponding relation corresponding to the target category.
In order to solve the above technical problem, the present application further provides an input data acquiring apparatus, including:
the construction module is used for constructing the corresponding relation between each character code and each character in advance;
the first establishing module is used for establishing a capturing function according to the screen-on function;
the first acquisition module is used for acquiring a target character code which is contained in the screen-loading function and corresponds to the input data through the capture function under the condition that the screen-loading function executes the screen-loading operation of the input data;
the first determining module is used for determining the target characters corresponding to the target character codes according to the corresponding relation;
the screen-up function is specifically a function for displaying the input data, and the screen-up operation is specifically an instruction operation for displaying the input data.
In order to solve the above technical problem, the present application further provides an input data acquiring apparatus, including:
a memory for storing a computer program;
a processor for implementing the steps of the input data acquisition method as described above when executing the computer program.
In order to solve the above technical problem, the present application further provides a computer-readable storage medium, on which a computer program is stored, and the computer program, when executed by a processor, implements the steps of the input data acquiring method as described above.
According to the input data acquisition method, the corresponding relation between each character code and each character is established in advance, the capture function is established based on the screen-loading function, when the screen-loading function executes the screen-loading operation of the input data, the target character code corresponding to the input data and contained in the screen-loading function is acquired through the capture function, and the target character corresponding to the target character code is determined according to the corresponding relation. Because the screen-up function displays the character codes corresponding to the input data on the screen, the capture function established based on the screen-up function can accurately acquire the character codes contained in the screen-up function, namely the capture function can directly acquire the characters input by the user, so that character ambiguity generated when key information corresponding to the characters input by the user is acquired is avoided, the accuracy of acquiring the input data is improved, and the information collection capability is improved.
In addition, the input data acquisition device and the input data acquisition medium provided by the application correspond to the input data acquisition method, and the effect is the same as that of the input data acquisition method.
Drawings
In order to more clearly illustrate the embodiments of the present application, the drawings needed for the embodiments will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and that other drawings can be obtained by those skilled in the art without inventive effort.
Fig. 1 is a flowchart of an input data obtaining method according to an embodiment of the present application;
fig. 2 is a flowchart illustrating a method for acquiring a target text code through a capture function according to an embodiment of the present disclosure;
fig. 3 is a schematic structural diagram of an input data acquiring apparatus according to an embodiment of the present application;
fig. 4 is a schematic structural diagram of another input data acquiring apparatus according to an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all the embodiments. All other embodiments obtained by a person of ordinary skill in the art based on the embodiments in the present application without any creative effort belong to the protection scope of the present application.
The core of the application is to provide an input data acquisition method, which is used for improving the accuracy of input data acquisition so as to improve the information collection capability. The core of the application is also to provide an input data acquisition device and medium.
In order that those skilled in the art will better understand the technical solutions of the present application, the following technical solutions are clearly and completely described in conjunction with the accompanying drawings and the detailed description, and it is obvious that the described embodiments are a part of the embodiments of the present application, not all of the embodiments of the present application. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
Fig. 1 is a flowchart of an input data obtaining method according to an embodiment of the present application. As shown in fig. 1, the method includes:
s10: and pre-constructing the corresponding relation between each character code and each character.
In the embodiment of the present application, the correspondence between each character code and each character may be a general correspondence, or may be a correspondence set by a user or a manufacturer. When the correspondence between each character code and each character is a correspondence set by a user or a manufacturer, the input method used by the user needs to be changed correspondingly to ensure that the finally obtained target character is matched with the character content of the data input by the user through the input method.
It should be noted that the correspondence between each character code and each character is not limited to the correspondence between a chinese character and its character code, but may also be the correspondence between a japanese character and its character code, or the correspondence between a russian character and its character code. It is understood that chinese, japanese and russian are only three expressions of the correspondence between each character code and each character, and do not represent only the three expressions.
S11: and establishing a capture function according to the screen-on function.
In this embodiment of the present application, S11 is specifically configured to obtain a calling convention and a return value type of the screen-up function, and establish the capture function according to the calling convention and the return value type, so as to obtain the text codes included in the parameters of the screen-up function by using the capture function.
In order to improve the application range of the input data acquisition method, the screen-on function comprises the following steps: ImmGetComositionStringW or CRange:SetText.
It should be noted that most Input methods are currently configured based on an Input Method Manager (IMM) or a Text Service Framework (TSF), and therefore, the screen-up function includes imgetcompositionsstringw corresponding to the IMM and CRange:: SetText corresponding to the TSF.
It is understood that when the input method is constructed based on other architectures, the function of the architecture for realizing display of input data can be acquired as the screen-on function.
The following description will be made in detail by the IMM and TSF in order to facilitate the understanding of the method of acquiring the screen-up function by those skilled in the art.
1) On-screen function of IMM
The method for determining the IMM screen function comprises the following steps: reading related functions of functions contained in an IMM framework by reading official documents and related reference materials, and further acquiring a screen-on function. Second, Application Program Interface (API) filtering: opening application software (such as a notepad) based on an IMM frame by using a debugger, recording breakpoints under all derived functions in IMM32.dll by using the debugger, observing the functions passing from pinyin input by a user to character selection and then to the screen by recording power failure after the user inputs data, and determining the screen function according to the position, name and parameter meanings of the function sequence; the recording breakpoint is used for outputting the function name to the diary of the debugger when the notebook executes a certain function so as to be convenient to view.
2) On screen function of TSF
The method for determining the IMM screen-on function is specifically a data tracing method: the method comprises the steps of opening application software (such as a written book) based on a TSF framework by using a memory modification editing tool (CE), searching a word through the CE to obtain a memory entry containing the word when a user inputs the word, scanning the word through the CE after inputting another word until a few memory entries are left in a CE result list, performing name analysis on virtual functions, looking up official documents, filtering breakpoints, performing observation through a debugger, and determining a screen-on function.
It should be noted that, because the IMM belongs to the framework of the functional API and the TSF belongs to the COM framework, the framework of the functional API may determine the screen function by using the above-mentioned IMM screen function determining method, and the COM framework may determine the screen function by using the above-mentioned IMM screen function determining method.
S12: and under the condition that the screen-up function executes the screen-up operation of the input data, acquiring a target character code which is contained in the screen-up function and corresponds to the input data through the capture function.
The screen-up function is a function for displaying input data, and the screen-up operation is instruction operation for displaying the input data.
In the embodiment of the application, when the upper screen function is immGetComposionStringW, the capture function obtains the target character code by obtaining a third parameter and a fourth parameter in the immGetComposionStringW, wherein the third parameter of the immGetComposionStringW is the character code corresponding to the input data, and the fourth parameter is the length of the character code; under the condition that the upper screen function is CRange:: SetText, the capture function can obtain the target character code by obtaining a fourth parameter and a fifth parameter in the CRange:: SetText, wherein the fourth parameter of the CRange:: SetText is the character code corresponding to the input data, and the fifth parameter is the length of the character code.
S13: and determining the target characters corresponding to the target character codes according to the corresponding relation.
For easy viewing, as a preferred embodiment, after S13, the method further includes: and storing the target words.
According to the input data acquisition method provided by the embodiment of the application, the corresponding relation between each character code and each character is constructed in advance, the capture function is established based on the screen-loading function, when the screen-loading function executes the screen-loading operation of the input data, the target character code corresponding to the input data and contained in the screen-loading function is acquired through the capture function, and the target character corresponding to the target character code is determined according to the corresponding relation. Because the screen-up function displays the character codes corresponding to the input data on the screen, the capture function established based on the screen-up function can accurately acquire the character codes contained in the screen-up function, namely the capture function can directly acquire the characters input by the user, so that character ambiguity generated when key information corresponding to the characters input by the user is acquired is avoided, the accuracy of acquiring the input data is improved, and the information collection capability is improved.
Fig. 2 is a flowchart illustrating obtaining a target text code through a capture function according to an embodiment of the present disclosure. As shown in fig. 2, on the basis of the foregoing embodiment, S12 specifically includes:
s20: and establishing an assembly function containing the capture function and the context environment data of the screen-on function according to the screen-on function.
It should be noted that, a calling convention and a return value type of the screen-up function are obtained, and an assembly function including context environment data of the capture function and the screen-up function is established according to the calling convention and the return value type.
S21: and establishing a jump instruction corresponding to the assembly function.
S22: a jump instruction is inserted into the screen function.
As a preferred embodiment, S22 is specifically: and acquiring the address of the screen-up function, and inserting a jump instruction according to the address.
When the screen-up function is immgetcomposotionsingstringw, the address for acquiring the screen-up function is specifically: a Dynamic Link Library (DLL) handle corresponding to the immcgetcomposionstringw is acquired, and an address of the immcgetcomposionstringw is acquired from the DLL handle.
It can be understood that when the screen-up function is imgetcomposionstringw, the related data of the IMM architecture is located in IMM32.dll, so that the address of imgetcomposionstringw can be derived by obtaining the handle of IMM 33.dll.
When the screen-up function is CRange, SetText, the address of the screen-up function is acquired as follows: and obtaining the address of the CRange SetText by a characteristic code searching method.
It should be noted that the method for searching for feature codes specifically includes: firstly, a current system version is obtained by utilizing a system API, and a screen-up function is positioned according to a feature code corresponding to the system version. And secondly, determining and positioning the function on the screen under the condition that at least two sections of feature codes are successfully positioned continuously through a plurality of multi-section feature codes corresponding to different versions. It can be understood that the two ways of searching for the feature code can be compatible with different system versions, thereby improving the general applicability of the input data acquisition method provided by the embodiment of the present application.
S23: and under the condition that the screen-up function executes input data to perform screen-up operation, the assembly function calls the capture function through the jump instruction so as to facilitate the capture function to acquire the target character code.
S24: and under the condition that the acquisition of the capture function is finished, the screen-up function continues to finish the screen-up operation through the assembly function and the context environment data of the screen-up function.
In the implementation, the inserted jump instruction may cover a part of the code of the screen-up function, and in order to ensure that the screen-up function can complete the screen-up operation, as a preferred embodiment, the method further includes: applying for a new memory space, storing codes corresponding to the jump instruction coverage address into the new memory space, jumping to a part of codes of the new memory space for executing the screen-up function through the context environment data of the screen-up function and the assembly function under the condition that the acquisition of the capture function is finished, and then jumping to the screen-up function to enable the screen-up function to continuously finish the screen-up operation.
According to the input data acquisition method provided by the embodiment of the application, in the process of acquiring the target character codes by the capture function, the assembly function containing the capture function and the context and environment data of the screen function is established according to the screen function, so that the screen function can realize the original screen function after the capture function acquires the target characters, and the practicability of the input data acquisition method is improved.
On the basis of the foregoing embodiment, before S13, the method further includes:
classifying the corresponding relation according to the character category, acquiring the character coding range corresponding to each category, acquiring the target character coding range of the target character coding, and determining the target character according to the target corresponding relation corresponding to the target category under the condition that the target character coding range is matched with the character coding range corresponding to the target category.
For example, the character encoding range of basic kanji characters is 4E00 to 9FA5, and the character encoding range of japanese hiragana characters is 3040 to 309F. And when the target character coding range is matched with the character coding range of the basic Chinese characters, determining the corresponding Chinese characters through the character codes of the basic Chinese characters.
It can be understood that, under the condition that the target character coding range is matched with the character coding range corresponding to the target category, the target character is determined according to the target corresponding relation corresponding to the target category, so that the speed of determining the target character after traversing all categories of character codes can be reduced, and the efficiency of acquiring input data is improved.
In the above embodiments, the input data acquiring method is described in detail, and the present application also provides embodiments corresponding to the input data acquiring apparatus. It should be noted that the present application describes the embodiments of the apparatus portion from two perspectives, one from the perspective of the function module and the other from the perspective of the hardware.
Fig. 3 is a schematic structural diagram of an input data acquiring apparatus according to an embodiment of the present application. As shown in fig. 3, the apparatus includes, based on the angle of the function module:
and the construction module 10 is used for constructing the corresponding relation between each character code and each character in advance.
A first establishing module 11, configured to establish a capture function according to the screen-on function.
The first obtaining module 12 is configured to, when the screen-up function performs a screen-up operation on input data, obtain, through the capture function, a target text code included in the screen-up function and corresponding to the input data.
And the first determining module 13 is configured to determine a target character corresponding to the target character code according to the corresponding relationship.
The screen-up function is a function for displaying input data, and the screen-up operation is instruction operation for displaying the input data.
Since the embodiments of the apparatus portion and the method portion correspond to each other, please refer to the description of the embodiments of the method portion for the embodiments of the apparatus portion, which is not repeated here.
As a preferred embodiment, the first obtaining module 12 specifically includes:
and the second establishing module is used for establishing an assembly function containing the context environment data of the capturing function and the screen-up function according to the screen-up function.
And the third establishing module is used for establishing a jump instruction corresponding to the assembly function.
And the first inserting module is used for inserting the jump instruction into the screen-loading function.
And the calling module is used for enabling the assembly function to call the capturing function through the jump instruction under the condition that the screen-up function executes the input data to perform the screen-up operation, so that the capturing function can conveniently acquire the target character code.
And the skip module is used for enabling the screen-loading function to continuously finish the screen-loading operation through the assembly function and the context environment data under the condition that the acquisition of the capture function is finished.
The insertion module specifically includes:
and the second acquisition module is used for acquiring the address of the screen-up function.
And the second inserting module is used for inserting the jump instruction according to the address.
A second acquisition module comprising:
and a third obtaining module, configured to obtain the DLL handle corresponding to immcgetcomposionstringw.
And the fourth obtaining module is used for obtaining the address of the ImmGetComposionStringW according to the DLL handle.
A second acquisition module comprising:
and the fifth acquisition module is used for acquiring the address of the CRange SetText by a characteristic code searching method.
Further comprising:
and the classification module is used for classifying the corresponding relation according to the character category.
And the sixth acquisition module is used for acquiring the character coding ranges corresponding to the categories.
And the seventh acquisition module is used for acquiring the target character coding range of the target character coding.
The first determining module 13 specifically includes:
and the second determining module is used for determining the target characters according to the target corresponding relation corresponding to the target category under the condition that the target character coding range is matched with the character coding range corresponding to the target category.
Further comprising:
and the storage module is used for storing the target characters.
The input data acquisition device provided by the embodiment of the application is used for pre-establishing the corresponding relation between each character code and each character and establishing the capture function based on the screen-loading function, when the screen-loading function executes the screen-loading operation of the input data, the target character code corresponding to the input data and contained in the screen-loading function is acquired through the capture function, and the target character corresponding to the target character code is determined according to the corresponding relation. Because the screen-up function displays the character codes corresponding to the input data on the screen, the capture function established based on the screen-up function can accurately acquire the character codes contained in the screen-up function, namely the capture function can directly acquire the characters input by the user, so that character ambiguity generated when key information corresponding to the characters input by the user is acquired is avoided, the accuracy of acquiring the input data is improved, and the information collection capability is improved.
Fig. 4 is a schematic structural diagram of another input data acquiring apparatus according to an embodiment of the present application. As shown in fig. 4, the apparatus includes, from the perspective of the hardware configuration:
a memory 20 for storing a computer program;
a processor 21 for implementing the steps of the input data acquisition method as in the above embodiments when executing the computer program.
The processor 21 may include one or more processing cores, such as a 4-core processor, an 8-core processor, and the like. The processor 21 may be implemented in at least one hardware form of Digital Signal Processing (DSP), Field-Programmable Gate Array (FPGA), and Programmable Logic Array (PLA). The processor 21 may also include a main processor and a coprocessor, where the main processor is a processor for Processing data in an awake state, and is also called a Central Processing Unit (CPU); a coprocessor is a low power processor for processing data in a standby state. In some embodiments, the processor 21 may be integrated with a Graphics Processing Unit (GPU) which is responsible for rendering and drawing the content required to be displayed on the display screen. In some embodiments, the processor 21 may further include an Artificial Intelligence (AI) processor for processing computational operations related to machine learning.
The memory 20 may include one or more computer-readable storage media, which may be non-transitory. Memory 20 may also include high speed random access memory, as well as non-volatile memory, such as one or more magnetic disk storage devices, flash memory storage devices. In this embodiment, the memory 20 is at least used for storing the following computer program 201, wherein after the computer program 201 is loaded and executed by the processor 21, the relevant steps of the input data acquisition method disclosed in any one of the foregoing embodiments can be implemented. In addition, the resources stored in the memory 20 may also include an operating system 202, data 203, and the like, and the storage manner may be a transient storage manner or a permanent storage manner. Operating system 202 may include, among others, Windows, Unix, Linux, and the like. The data 203 may include, but is not limited to, data involved in the input data acquisition method, and the like.
In some embodiments, the input data acquisition device may further include a display 22, an input/output interface 23, a communication interface 24, a power supply 25, and a communication bus 26.
Those skilled in the art will appreciate that the configuration shown in FIG. 4 does not constitute a limitation of the input data acquisition device and may include more or fewer components than those shown.
The input data acquisition device provided by the embodiment of the application comprises a memory and a processor, wherein when the processor executes a program stored in the memory, the following method can be realized: the method comprises the steps of constructing a corresponding relation between each character code and each character in advance, establishing a capture function based on a screen-loading function, acquiring a target character code corresponding to input data and contained in the screen-loading function through the capture function when the screen-loading function executes screen-loading operation of the input data, and determining a target character corresponding to the target character code according to the corresponding relation. Because the screen-up function displays the character codes corresponding to the input data on the screen, the capture function established based on the screen-up function can accurately acquire the character codes contained in the screen-up function, namely the capture function can directly acquire the characters input by the user, so that character ambiguity generated when key information corresponding to the characters input by the user is acquired is avoided, the accuracy of acquiring the input data is improved, and the information collection capability is improved.
Finally, the application also provides a corresponding embodiment of the computer readable storage medium. The computer-readable storage medium has stored thereon a computer program which, when being executed by a processor, carries out the steps as set forth in the above-mentioned method embodiments.
It is to be understood that if the method in the above embodiments is implemented in the form of software functional units and sold or used as a stand-alone product, it can be stored in a computer readable storage medium. Based on such understanding, the technical solutions of the embodiments of the present application may be embodied in the form of a software product, which is stored in a storage medium and executes all or part of the steps of the methods described in the embodiments of the present application, or all or part of the technical solutions. And the aforementioned storage medium includes: various media capable of storing program codes, such as a usb disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.
The computer readable storage medium provided by the embodiment of the application, the medium is stored with a computer program, and when the computer program is executed by a processor, the following method can be realized: the method comprises the steps of constructing a corresponding relation between each character code and each character in advance, establishing a capture function based on a screen-loading function, acquiring a target character code corresponding to input data and contained in the screen-loading function through the capture function when the screen-loading function executes screen-loading operation of the input data, and determining a target character corresponding to the target character code according to the corresponding relation. Because the screen-up function displays the character codes corresponding to the input data on the screen, the capture function established based on the screen-up function can accurately acquire the character codes contained in the screen-up function, namely the capture function can directly acquire the characters input by the user, so that character ambiguity generated when key information corresponding to the characters input by the user is acquired is avoided, the accuracy of acquiring the input data is improved, and the information collection capability is improved.
The above description details an input data acquisition method, apparatus, and medium provided by the present application. The embodiments are described in a progressive manner in the specification, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments are referred to each other. The device disclosed by the embodiment corresponds to the method disclosed by the embodiment, so that the description is simple, and the relevant points can be referred to the method part for description. It should be noted that, for those skilled in the art, it is possible to make several improvements and modifications to the present application without departing from the principle of the present application, and such improvements and modifications also fall within the scope of the claims of the present application.
It is further noted that, in the present specification, relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
Claims (10)
1. An input data acquisition method, comprising:
pre-constructing a corresponding relation between each character code and each character;
establishing a capture function according to the screen-on function;
under the condition that the screen-up function executes screen-up operation of input data, acquiring a target character code which is contained in the screen-up function and corresponds to the input data through the capture function;
determining a target character corresponding to the target character code according to the corresponding relation;
the screen-up function is specifically a function for displaying the input data, and the screen-up operation is specifically an instruction operation for displaying the input data.
2. The method according to claim 1, wherein when the screen-up function performs a screen-up operation on input data, acquiring, by the capture function, a target text code included in the screen-up function and corresponding to the input data includes:
establishing an assembly function containing the context environment data of the capture function and the screen-up function according to the screen-up function;
establishing a jump instruction corresponding to the assembly function;
inserting the jump instruction into the screen-up function;
under the condition that the screen-up function executes the input data to perform the screen-up operation, the assembly function calls the capture function through the jump instruction so that the capture function can acquire the target character code;
and under the condition that the acquisition of the capture function is finished, the screen-up function continues to finish the screen-up operation through the assembly function and the context environment data.
3. The input data acquisition method according to claim 2, wherein the inserting the jump instruction into the screen-up function specifically comprises:
acquiring an address of the screen-up function;
and inserting the jump instruction according to the address.
4. The input data acquisition method according to any one of claims 1 to 3, wherein the screen-up function is specifically: ImmGetComositionStringW or CRange:SetText.
5. The input data obtaining method according to claim 3, wherein when the screen-up function is the imgetcomposotionsstringw, the address for obtaining the screen-up function is specifically:
acquiring a DLL handle corresponding to the ImmGetComositionStringW;
and acquiring the address of the ImmGetComposionStringW according to the DLL handle.
6. The input data obtaining method of claim 3, wherein when the screen-up function is CRange:: SetText, the obtaining the address of the screen-up function specifically comprises:
and obtaining the address of the CRange SetText by a method for searching the feature code.
7. The method for acquiring input data according to claim 1, wherein before determining the target text corresponding to the target text code according to the correspondence, the method further comprises:
classifying the corresponding relation according to the character category;
acquiring a character coding range corresponding to each category;
acquiring a target character coding range of the target character coding;
determining the target character corresponding to the target character code according to the corresponding relationship, specifically:
and under the condition that the target character coding range is matched with the character coding range corresponding to the target category, determining the target characters according to the target corresponding relation corresponding to the target category.
8. An input data acquisition apparatus, comprising:
the construction module is used for constructing the corresponding relation between each character code and each character in advance;
the first establishing module is used for establishing a capturing function according to the screen-on function;
the first acquisition module is used for acquiring a target character code which is contained in the screen-loading function and corresponds to the input data through the capture function under the condition that the screen-loading function executes the screen-loading operation of the input data;
the first determining module is used for determining the target characters corresponding to the target character codes according to the corresponding relation;
the screen-up function is specifically a function for displaying the input data, and the screen-up operation is specifically an instruction operation for displaying the input data.
9. An input data acquisition apparatus, comprising:
a memory for storing a computer program;
a processor for implementing the steps of the input data acquisition method according to any one of claims 1 to 7 when executing said computer program.
10. A computer-readable storage medium, characterized in that a computer program is stored thereon, which computer program, when being executed by a processor, carries out the steps of the input data acquisition method according to one of claims 1 to 7.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110441348.4A CN113138910B (en) | 2021-04-23 | 2021-04-23 | Input data acquisition method, device and medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110441348.4A CN113138910B (en) | 2021-04-23 | 2021-04-23 | Input data acquisition method, device and medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN113138910A true CN113138910A (en) | 2021-07-20 |
CN113138910B CN113138910B (en) | 2023-08-08 |
Family
ID=76812468
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202110441348.4A Active CN113138910B (en) | 2021-04-23 | 2021-04-23 | Input data acquisition method, device and medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN113138910B (en) |
Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101329615A (en) * | 2007-06-21 | 2008-12-24 | 刘艳萍 | Method and device for displaying input information |
CN101853089A (en) * | 2010-06-01 | 2010-10-06 | 深圳市蓝韵实业有限公司 | Auxiliary input method for medicinal examination report |
CN105094362A (en) * | 2015-06-30 | 2015-11-25 | 百度在线网络技术(北京)有限公司 | Method and device for Chinese input |
WO2016107344A1 (en) * | 2014-12-30 | 2016-07-07 | 北京奇虎科技有限公司 | Method and device for screening on-screen candidate items of input method |
US20170147538A1 (en) * | 2015-11-23 | 2017-05-25 | Xiaomi Inc. | Methods, devices, and computer-readable medium for input processing |
CN107193391A (en) * | 2017-04-25 | 2017-09-22 | 北京百度网讯科技有限公司 | The method and apparatus that a kind of upper screen shows text message |
CN107608532A (en) * | 2016-07-11 | 2018-01-19 | 北京搜狗科技发展有限公司 | A kind of association-feeding method, device and electronic equipment |
US20200201535A1 (en) * | 2017-06-14 | 2020-06-25 | Zte Corporation | Convenient operating method and terminal |
-
2021
- 2021-04-23 CN CN202110441348.4A patent/CN113138910B/en active Active
Patent Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101329615A (en) * | 2007-06-21 | 2008-12-24 | 刘艳萍 | Method and device for displaying input information |
CN101853089A (en) * | 2010-06-01 | 2010-10-06 | 深圳市蓝韵实业有限公司 | Auxiliary input method for medicinal examination report |
WO2016107344A1 (en) * | 2014-12-30 | 2016-07-07 | 北京奇虎科技有限公司 | Method and device for screening on-screen candidate items of input method |
CN105094362A (en) * | 2015-06-30 | 2015-11-25 | 百度在线网络技术(北京)有限公司 | Method and device for Chinese input |
US20170147538A1 (en) * | 2015-11-23 | 2017-05-25 | Xiaomi Inc. | Methods, devices, and computer-readable medium for input processing |
CN107608532A (en) * | 2016-07-11 | 2018-01-19 | 北京搜狗科技发展有限公司 | A kind of association-feeding method, device and electronic equipment |
CN107193391A (en) * | 2017-04-25 | 2017-09-22 | 北京百度网讯科技有限公司 | The method and apparatus that a kind of upper screen shows text message |
US20200201535A1 (en) * | 2017-06-14 | 2020-06-25 | Zte Corporation | Convenient operating method and terminal |
Non-Patent Citations (3)
Title |
---|
CODERAIDRICH: "Inline hook ImmGetCompositionStringW获取中文输入", 《HTTPS://BLOG.CSDN.NET/CODERALDRICH/ARTICLE/DETAILS/43061953》 * |
JAYKY: "关于HOOK截获中文输入 (日文、韩文也应该适用)", 《HTTPS://BLOG.CSDN.NET/JAYKY/ARTICLE/DETAILS/1388212》 * |
周凯;: "一种Windows10中文用户输入痕迹信息提取方法研究与实现", 警察技术 * |
Also Published As
Publication number | Publication date |
---|---|
CN113138910B (en) | 2023-08-08 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109828903B (en) | Automatic testing method and device, computer device and storage medium | |
CN106484266B (en) | Text processing method and device | |
CN1517904B (en) | Ink marking device and associated application programmed interface | |
CN108427731B (en) | Page code processing method and device, terminal equipment and medium | |
CN113741898B (en) | Form generation method, device and equipment | |
CN109189686A (en) | Automation regression testing method, apparatus, storage medium and computer equipment | |
CN110442515B (en) | Application testing method, device, equipment and readable storage medium | |
CN110764680B (en) | Method and device for generating simulated keyboard, electronic equipment and computer readable medium | |
CN105959469B (en) | Short message display method, display device and terminal | |
CN110716866A (en) | Code quality scanning method and device, computer equipment and storage medium | |
CN114116441A (en) | UI (user interface) testing method and device, electronic equipment and storage medium | |
CN111460235A (en) | Atlas data processing method, device, equipment and storage medium | |
CN105094562A (en) | Information processing method and terminal | |
CN112835774B (en) | Visualization method and device for performance of display card, equipment and computer-readable storage medium | |
CN111240962B (en) | Test method, test device, computer equipment and computer storage medium | |
CN111142871A (en) | Front-end page development system, method, equipment and medium | |
CN113138910A (en) | Input data acquisition method, device and medium | |
CN110515618A (en) | Page info typing optimization method, equipment, storage medium and device | |
CN112783483B (en) | Function creation method, device, equipment and medium based on suspension button assembly | |
CN106844186B (en) | Offline test method of application and terminal equipment | |
CN113805861A (en) | Code generation method based on machine learning, code editing system and storage medium | |
CN109992514B (en) | Mobile application dynamic analysis method based on visual content | |
CN113569114A (en) | Visual display method and device for system data | |
CN113268617A (en) | Method and device for detecting metadata of papers | |
CN112001988A (en) | Animation effect generation method and device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |