A method and device for recognizing text in RDP window title

By defining and using text conversion tables and combining with binary tree data structures, the problem of slow text recognition speed and low accuracy in RDP window titles is solved, and fast and accurate text recognition is achieved.

CN111914513BActive Publication Date: 2025-03-18YIYANG SAFETY TECH CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN201910379750.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2019-05-08
Publication Date
2025-03-18
Estimated Expiration
2039-05-08

AI Technical Summary

Technical Problem

The prior art is slow and has low accuracy when identifying the text semantics of window titles for RDP transmissions, especially at low resolutions.

Method used

By defining a text conversion table, the glyph feature information corresponds to the character encoding information, and the text conversion table is stored using a binary tree data structure to achieve rapid search and recognition.

Benefits of technology

It realizes the rapid and correct recognition of RDP window title text, improves the speed and accuracy of text recognition, and reduces memory usage.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN111914513B_ABST
    Figure CN111914513B_ABST
Patent Text Reader

Abstract

A method for recognizing text in an RDP window title, the method comprising: defining a text conversion table, which includes glyph feature information and corresponding character encoding information; intercepting and parsing RDP protocol data including the RDP window title, and extracting the glyph feature information data in the RDP window title; inputting the glyph feature information data in the RDP window title into the text conversion table, and obtaining the corresponding character encoding information data by looking up the table; and storing the character encoding information data of the RDP window title in a database. The present invention also discloses a device for recognizing text in an RDP window title. The present invention can improve the accuracy of text recognition in an RDP window title, and can also shorten the time for text recognition in an RDP window title.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer technology, and in particular to a method and device for recognizing text in an RDP window title. Background Art

[0002] Remote Desktop Protocol (RDP) is a multi-channel protocol that allows clients to connect to servers that provide terminal services. RDP attempts to provide only those necessary services to achieve efficient operation and small scale. RDP supports virtual channels to transmit data exchanges between clients and servers. RDP-based remote desktops allow users to use all applications, files, and network resources on remote computers without executing local programs. With the rapid development of the Internet, RDP has been widely used, and the network security risks that come with it are increasing. Therefore, it is necessary to audit the content transmitted by RDP in order to promptly discover security information such as illegal access and abnormal operations to ensure network security.

[0003] One of the important tasks of RDP audit is to audit the window title transmitted by RDP. The common method of transmitting text between computers is: the sender transmits character encodings such as Unicode and ASCII, and the receiver uses font software or hardware rendering to display the text; if the font library is missing on the receiving end, the content cannot be displayed correctly. However, the method of RDP transmitting window title text is different. Its transmission method is: directly transmitting glyph codes (glyph codes: a type of dot matrix code. In order to output Chinese characters on a monitor or printer, Chinese characters are designed into dot matrices according to graphic symbols, and the corresponding dot matrix codes are obtained). This can avoid the problem of incorrect display due to the lack of fonts on the remote receiving end, thus solving the above problem. On the other hand, when using glyph codes to express glyphs to transmit text, although the receiving end can correctly display the glyphs, the auditor cannot automatically identify the semantics of the text and then audit it.

[0004] The existing technology generally uses OCR technology to recognize the text semantics of the window title transmitted by RDP, but there are the following problems:

[0005] 1. The recognition speed of OCR technology is too slow. It takes only a few tenths of a second to recognize 10 words.

[0006] Second, OCR technology requires that the resolution of the text to be recognized is relatively large. Chinese characters generally need to be larger than 16*16 pixels. However, the window title text transmitted by RDP is mostly only 10*10 pixels or 12*12 pixels, resulting in low recognition rate and accuracy of text recognition using OCR.

[0007] Therefore, a fast and reliable method is urgently needed to identify the text semantics of the window title transmitted by RDP. Summary of the invention

[0008] The present invention discloses a method for recognizing text in an RDP window title, the method comprising:

[0009] Define a text conversion table, which contains glyph feature information and corresponding character encoding information;

[0010] Intercept and parse RDP protocol data including RDP window title, and extract font feature information data in the RDP window title;

[0011] Inputting the glyph feature information data in the RDP window title into the text conversion table, and obtaining the corresponding character encoding information data by looking up the table;

[0012] The character encoding information data of the RDP window title is stored in a database.

[0013] Specifically, the method for defining a text conversion table includes:

[0014] Representing the glyph feature information in binary form;

[0015] The glyph feature information is converted one by one into a unique unified query code, wherein the unified query code is a binary number with a constant number of bits C; the conversion rule for converting the unified query code is specifically as follows: assuming that the maximum number of bits of the binary number representing the glyph feature information is C; if the number of bits of the binary number representing the glyph feature information to be converted is equal to C, then the unified query code is equal to the binary number representing the glyph feature information; otherwise, the unified query code is equal to the binary number representing the glyph feature information converted by a bit-filling algorithm into a binary number with a number of bits equal to C;

[0016] The glyph feature information and the unified query code are matched one by one with the corresponding character encoding information to generate a character conversion table;

[0017] The text conversion table is stored in a binary tree data structure, the unified query code of the text conversion table is stored as a node of the binary tree, and the character encoding information in the text conversion table is stored as a leaf node of the binary tree.

[0018] Specifically, the method of inputting the glyph feature information data in the RDP window title into the text conversion table and obtaining the corresponding character encoding information data by looking up the table comprises:

[0019] Representing the glyph feature information data in the RDP window title in binary form;

[0020] The binary number representing the glyph feature information data in the RDP window title is converted into the unified query code data according to the conversion rule of converting the unified query code and using the padding algorithm;

[0021] The unified query code data is input into the text conversion table, and the text conversion table is stored in a binary tree data structure; each digit of the unified query code data is matched one by one with the node starting from the root of the binary tree in sequence to form a path, and a leaf node is found to obtain the character encoding information data of the RDP window title.

[0022] Specifically, the method for defining a text conversion table further includes:

[0023] Representing the glyph feature information in binary form;

[0024] Generate a text conversion record by combining the glyph feature information and the corresponding character encoding information;

[0025] The plurality of character conversion records are combined into one character conversion table, wherein the number of bits of the binary number representing the character feature information contained in each character conversion record is the same; the number of bits of the binary number representing the character feature information contained in the character conversion records is different, and multiple character conversion tables can be combined; and the multiple character conversion tables form a character conversion library;

[0026] Each of the text conversion tables is stored in a binary tree data structure, the glyph feature information of the text conversion table is stored as a node of the binary tree, and the character encoding information in the text conversion table is stored as a leaf node of the binary tree.

[0027] Specifically, the method of inputting the glyph feature information data in the RDP window title into the text conversion table and obtaining the corresponding character encoding information data of the RDP window title by looking up the table further comprises:

[0028] Representing the glyph feature information data in the RDP window title in binary form;

[0029] According to the number of bits of the binary number representing the glyph feature information in the RDP window title, matching the corresponding text conversion table in the text conversion library;

[0030] The binary number representing the glyph feature information in the RDP window title is input into the matching text conversion table, and the text conversion table is stored in a binary tree data structure; each digit of the binary number representing the glyph feature information in the RDP window title is matched one by one in sequence with the nodes starting from the root of the binary tree to form a path, find the leaf node, and obtain the character encoding information data of the RDP window title.

[0031] The present invention also discloses a device for recognizing text in an RDP window title, comprising:

[0032] A conversion table definition unit, used to define a text conversion table, which includes glyph feature information and character encoding information;

[0033] A data extraction unit, used for intercepting and parsing RDP protocol data including the RDP window title, and extracting the font feature information data of the RDP window title;

[0034] The character recognition unit is used to input the glyph feature information data of the RDP window title obtained from the data extraction unit into the character conversion table obtained from the conversion table definition unit, obtain the corresponding character encoding information data by searching the character conversion table, and save it into the database.

[0035] Specifically, the conversion table definition unit includes:

[0036] A font feature information digitization module, used to represent the font feature information in binary form;

[0037] The unified query code generation module is used to convert the glyph feature information obtained from the glyph feature information dataization module into a unique unified query code one by one, wherein the unified query code is a binary number with a constant number of bits C; the conversion rule for converting the unified query code is as follows: assuming that the maximum number of bits of the binary number representing the glyph feature information is C; if the number of bits of the binary number representing the glyph feature information to be converted is equal to C, then the unified query code is equal to the binary number representing the glyph feature information; otherwise, the unified query code is equal to the binary number representing the glyph feature information converted by a bit-filling algorithm into a binary number with a number of bits equal to C;

[0038] A character conversion table generating module, used for generating a character conversion table by matching the character feature information obtained from the character feature information digitization module and the unified query code obtained from the unified query code generating module with the character encoding information corresponding thereto in a one-to-one manner;

[0039] The text conversion table storage module is used to store the text conversion table obtained from the text conversion table generation module in a binary tree data structure, the unified query code of the text conversion table is stored as a node of the binary tree, and the character encoding information in the text conversion table is stored as a leaf node of the binary tree.

[0040] Specifically, the text recognition unit includes:

[0041] A font feature information data binarization module, used to represent the font feature information data in the RDP window title obtained from the data extraction unit in binary form;

[0042] A unified query code data conversion module, used for converting the binary number representing the glyph feature information data in the RDP window title obtained from the glyph feature information data binarization module into the unified query code data according to the conversion rule of converting the unified query code and using the padding algorithm;

[0043] The query module 1 is used to input the unified query code data obtained from the unified query code data conversion module into the text conversion table obtained from the text conversion table storage module, wherein the text conversion table is stored in a binary tree data structure; sequentially match each digit of the unified query code data with a node starting from the root of the binary tree one by one to form a path, find a leaf node, obtain the character encoding information data of the RDP window title; and save it in a database.

[0044] Specifically, the conversion table definition unit further includes:

[0045] A font feature information digitization module, used to represent the font feature information in binary form;

[0046] A character conversion library generation module is used to generate a character conversion record by matching the character feature information obtained from the character feature information dataization module with the corresponding character encoding information; a plurality of the character conversion records are combined into a character conversion table, wherein the number of bits of the binary number representing the character feature information contained in each of the character conversion records is the same; the number of bits of the binary number representing the character feature information contained in the character conversion records is different, and a plurality of the character conversion tables can be combined; the plurality of the character conversion tables form a character conversion library;

[0047] The text conversion library storage module is used to store each of the text conversion tables obtained from the text conversion library generation module in a binary tree data structure, wherein the information representing the glyph features of the text conversion table is stored as a node of the binary tree, and the character encoding information in the text conversion table is stored as a leaf node of the binary tree.

[0048] Specifically, the text recognition unit further includes:

[0049] A font feature information data binarization module, used to represent the font feature information data in the RDP window title obtained from the data extraction unit in binary form;

[0050] a matching module, configured to match the corresponding character conversion table in the character conversion library obtained from the character conversion library storage module according to the number of bits of the binary number representing the character feature information in the RDP window title obtained from the character feature information data binarization module; and send the feature attribute information of the character conversion table to the query module 2;

[0051] The query module 2 is used to input the binary number representing the glyph feature information in the RDP window title obtained from the glyph feature information data binarization module into the matching text conversion table obtained from the text conversion library storage module, wherein the text conversion table is stored in a binary tree data structure, and each digit of the binary number representing the glyph feature information in the RDP window title is matched one by one with the nodes starting from the root of the binary tree in sequence to form a path, find the leaf node, obtain the character encoding information data of the RDP window title, and save it in the database.

[0052] Compared with the prior art, the invention has the beneficial effect of being able to quickly and correctly recognize the received text fonts as text with corresponding semantics, and then provide them for auditing. The corresponding software program is compact and practical.

[0053] 1. Fast text recognition speed. The time complexity of recognizing text by querying the text conversion table is O(1) per word, and the time complexity is independent of the number of characters in the table. The speed of OCR varies according to the OCR algorithm, because it is necessary to match the text contained in the library and the feature length of each character at the same time, so the fastest speed can only reach O(N^2).

[0054] 2. High accuracy rate. The text is recognized by looking up the text conversion table one by one, and there will be no garbled characters or wrong characters.

[0055] 3. Small memory usage. The space complexity of the text conversion table is O(N) per word. The space complexity has nothing to do with the number of characters contained in the table, but is related to the number of binary digits N that represent the character feature information. BRIEF DESCRIPTION OF THE DRAWINGS

[0056] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0057] Figure 1 A flowchart of a method for recognizing text in an RDP window title provided in Example 1 of the present application;

[0058] Figure 2 A schematic diagram of character feature information;

[0059] Figure 3 A flowchart of another method for recognizing text in RDP window titles provided in Embodiment 2 of the present application;

[0060] Figure 4 is another schematic diagram of character feature information;

[0061] Figure 5 To convert text stored in a binary tree structure to represent intent;

[0062] Figure 6 A flowchart of another method for recognizing text in an RDP window title provided in Embodiment 3 of the present application;

[0063] Figure 7 A schematic diagram of the structure of a device for recognizing text in an RDP window title provided in Embodiment 4 of the present application;

[0064] Figure 8 A schematic diagram of the structure of another device for text recognition of RDP window titles provided in Embodiment 5 of the present application;

[0065] Fig. 9 A schematic diagram of the structure of another device for RDP window title text recognition provided in Example 6 of the present application. DETAILED DESCRIPTION

[0066] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0067] See also Figure 1 , Figure 1 A flowchart of a method for recognizing text in an RDP window title provided in Embodiment 1 of the present application is provided, wherein the method comprises:

[0068] Step S101: Define a character conversion table, which contains glyph feature information and corresponding character encoding information.

[0069] Character encoding information refers to the binary character encoding used in a computer's text system, that is, using binary numbers to correspond to the text characters in a character set. Common character encodings include: ASCII encoding, EBCDIC encoding, GB2312 encoding, Unicode encoding, UTF-8 encoding, etc. Character encoding information is the exchange code for communicating input, output, and the system platform, facilitating the storage of text in a computer and its transmission through a communication network. The same text character will have different character encodings when using different character encoding formats. For example, the Unicode encoding of the Chinese character "中" is "u4e2d", and the UTF-8 encoding is "0xE4 0xB8 0xAD".

[0070] Glyph feature information refers to designing Chinese characters as dot matrices for output on a display or printer. Using "1" to represent the pixel points with text and "0" to represent blank points, the glyph features can be represented as binary numbers. For example, the Chinese character "中" can be designed into a glyph as shown in Figure 2 shown below. Then, the glyph feature information of the character "中" can be represented as "0000110000000011000001111111100100110010010011001001001100100111111110000011000000001100000000110000".

[0071] The methods for defining the character conversion table include:

[0072] Step 1, select a character encoding to represent the character encoding information;

[0073] Step 2, collect the glyph feature information of the commonly used characters in the RDP window title;

[0074] Step 3, correspond the glyph feature information with its corresponding character encoding information one by one to generate the character conversion table.

[0075] For example, please refer to Table 1 below. Select Unicode encoding to represent the character encoding information and represent Figure 2The binary number "0000110000000011000001111111100100110010010011001001001100100111111110000011000000001100000000110000" of the "middle" - shaped feature information corresponds to the Unicode encoding "u4e2d" representing "middle", and a record in the character conversion table is generated.

[0076]

[0077]

[0078] Table 1 Schematic Diagram of Character Conversion

[0079] It should be noted that in view of the following characteristics of the RDP window title text: 1) The text size is relatively fixed. 2) The resolution is low, and common resolutions are 10 * 10 pixels or 12 * 12 pixels. 3) The number of common words in the title is limited. The scale of the character conversion table is controllable. Further, the character conversion table can be expanded at any time. If there is a situation where the glyph feature information not included in the existing character conversion table cannot query the corresponding character encoding information, it can be overcome by adding records to the character conversion table.

[0080] Step S102: Intercept and parse the RDP protocol data containing the RDP window title, and extract the glyph feature information data in the RDP window title.

[0081] It includes the following steps:

[0082] Step 1, intercept the RDP protocol packet from the network;

[0083] Step 2, analyze the RDP communication protocol and store the same RDP instruction in one message;

[0084] Step 3, parse the RDP message and separate the RDP window title;

[0085] Step 4, decode the RDP window title and extract the glyph feature information data contained in the RDP window title.

[0086] Step S103: Input the glyph feature information data in the RDP window title into the character conversion table, and obtain the character encoding information data corresponding to each window title text glyph by looking up the table.

[0087] Step S104: Store the character encoding information data of the RDP window title into the database.

[0088] Compared with the prior art, the present invention uses the method of querying the text conversion table to identify the RDP window title text, which improves the speed of text recognition and ensures the accuracy of text recognition.

[0089] Furthermore, after the RDP window title text is recognized, the character encoding information data of the RDP window title will be stored in the database as a record of the audit log, and this record indicates that a window is opened. Combining with other contents of the RDP audit log, such as: user account, RDP connection time, closing time, operation occurrence time, client address, etc., it can be shown that the user opened an application and performed operations in a specific time and scenario. The auditing party can design business rules for auditing according to the business scenario and business requirements. For example: the auditing party can pre-define the keywords to be audited, such as "Registry Editor", and define the warning rules, such as "Execute SMS warning"; then when the character encoding information data of the RDP window title is stored in the database, it will be compared with the keyword "Registry Editor", and if the comparison result is in line, the SMS warning will be triggered.

[0090] It can be seen from this that the present invention improves the speed of text recognition and ensures the accuracy of text recognition, thereby improving the efficiency and accuracy of RDP auditing.

[0091] Please refer to Figure 3 , Figure 3 which is a schematic flowchart of another method for identifying RDP window title text provided in the second embodiment of the present application. The method includes:

[0092] Step S201: Represent the glyph feature information in binary numbers, including:

[0093] Step 1: Collect the glyph feature information of the commonly used characters in the RDP window title.

[0094] Step 2: Given that the default RDP window title text resolutions of different server-side operating systems are different but relatively fixed, and the common resolutions are 10*10 pixels or 12*12 pixels, the glyph feature information can be represented by 100-bit or 144-bit binary numbers respectively. For example, the Chinese character "中" can be designed into Figure 2 glyph in the 10*10 pixel dot matrix, then the glyph feature information of the character "中" can be represented by a 100-bit binary number as "0000110000000011000001111111100100110010010011001001001100100111111110000011000000001100000000110000". The Chinese character "中" can be designed into Figure 4If it is the glyph of the Chinese character "中", then the glyph feature information of the Chinese character "中" can be represented by a 144-bit binary number as "000001100000000001100000000001100000011111111110010001100010010001100010010001100010011111111110000001100000000001100000000001100000000001100000".

[0095] Step S202: Convert the glyph feature information into a unique unified query code one by one. The unified query code is a binary number with a constant number of bits C. The specific conversion rule for converting the unified query code is: Let the maximum bit value of the binary number representing the glyph feature information be C. If the number of bits of the binary number representing the glyph feature information to be converted is equal to C, then the unified query code is equal to the binary number representing the glyph feature information; otherwise, the unified query code is equal to the binary number obtained by converting the binary number representing the glyph feature information through a padding algorithm into a binary number with the number of bits equal to C.

[0096] The purpose of this step is to make all binary numbers representing glyph feature information have the same number of bits, so that characters with different resolutions can be queried using a character conversion table. The padding algorithm includes head padding, tail padding, row-by-row padding, etc.

[0097] Still taking Figure 2 and Figure 4 as an example. In this example, C = 144. If the head padding algorithm is selected, Figure 2 the unified query code of the Chinese character "中" is padded from 100 bits to 144 bits as "000000000000000000000000000000000000000000000000110000000011000001111111100100110010010011001001001100100111111110000011000000001100000000110000". Figure 4 The 144-bit unified query code of the Chinese character "中" is "000001100000000001100000000001100000011111111110010001100010010001100010010001100010011111111110000001100000000001100000000001100000000001100000".

[0098] Step S203: Correlate the glyph feature information and the unified query code with their corresponding character encoding information one by one to generate a character conversion table.

[0099] The method for generating a character conversion table includes:

[0100] Step 1, select a character encoding to represent the character encoding information;

[0101] Step 2, correlate the glyph feature information and the unified query code with their corresponding character encoding information one by one to generate a character conversion table.

[0102] For example, please refer to Table 2 below. Select the Unicode encoding to represent the character encoding information. The binary number, unified query code representing the glyph feature information of "中" which is Figure 2 and Figure 4 are corresponding to the Unicode encoding "u4e2d" representing "中", thus generating two records in the character conversion table.

[0103]

[0104]

[0105] Table 2 Schematic diagram of another character conversion representation

[0106] Step S204: Store the character conversion table in a binary tree data structure. The unified query code of the character conversion table is stored as the nodes of the binary tree, and the character encoding information in the character conversion table is stored as the leaf nodes of the binary tree.

[0107] Please refer to Figure 5 Schematic diagram of the character conversion table stored in a binary tree structure. If the Unicode encoding is selected to represent the character encoding information, the leaves of the binary tree are Unicode codes; the nodes forming the path from the root to the leaves of the binary tree are the corresponding unified query codes. It should be noted that the degree of the binary tree is equal to the number of digits of the unified query code. Figure 5 For the convenience of expression, the degree of the actual structure is simplified.

[0108] Step S205: Intercept and parse the RDP protocol data containing the RDP window title, and extract the glyph feature information data in the RDP window title.

[0109] For the method of intercepting and parsing the RDP protocol data containing the RDP window title and extracting the glyph feature information data in the RDP window title, please refer to Step S102 in Embodiment 1 of this application.

[0110] Step S206: Represent the glyph feature information data in the RDP window title in binary.

[0111] Step S207: converting the binary number representing the glyph feature information data in the RDP window title into the Unicode data according to the conversion rule for converting the Unicode and using the padding algorithm.

[0112] It should be noted that this step must use the same padding algorithm as step S202 of the second embodiment of the present application.

[0113] Step S208: input the unified query code data into the text conversion table, which is stored in a binary tree data structure; match each digit of the unified query code data with the nodes starting from the root of the binary tree one by one in sequence to form a path, find the leaf node, and obtain the character encoding information data of the RDP window title.

[0114] Step S209: storing the character encoding information data of the RDP window title in a database.

[0115] Compared with the prior art, the present invention stores the text conversion table in a binary tree data structure, thereby further improving the speed of querying the text conversion table.

[0116] See also Figure 6 , Figure 6 A flowchart of another method for recognizing text in an RDP window title provided in Embodiment 3 of the present application is provided. The method comprises:

[0117] Step S301: Represent the glyph feature information in binary form.

[0118] For the method of expressing the glyph feature information in binary form, please refer to step S201 of the second embodiment of the present application.

[0119] Step S302: Match the glyph feature information with the corresponding character encoding information to generate a text conversion record.

[0120] The following steps are included:

[0121] Step 1, selecting a character encoding to represent character encoding information;

[0122] Step 2: Match the glyph feature information and the unified query code with the corresponding character encoding information one by one to generate a text conversion record.

[0123] For example, refer to Table 1, select Unicode encoding to represent character encoding information, and Figure 2The binary number "0000110000000011000001111111100100110010010011001001001100100111111110000011000000001100000000110000" of the "middle" - shaped feature information corresponds to the Unicode encoding "u4e2d" representing "middle", and thus a text conversion record is generated.

[0124] Step S303: Combine multiple said text conversion records into one said text conversion table, where the number of bits of the binary number representing the glyph feature information included in each said text conversion record is the same; if the number of bits of the binary number representing the glyph feature information included in the said text conversion records is different, multiple said text conversion tables can be formed; multiple said text conversion tables form a text conversion library.

[0125] Given that the default RDP window title text resolutions of different server - side operating systems are different, the number of bits of the binary number used to represent the glyph feature information of the RDP window title text is different. For example, the glyph feature information with a resolution of 10 * 10 pixels can be represented by a 100 - bit binary number, and the glyph feature information with a resolution of 12 * 12 pixels can be represented by a 144 - bit binary number. According to the number of bits of the binary number, the text conversion records are divided into tables, and the text conversion records with the same number of bits of the binary number are grouped into one text conversion table, then multiple text conversion tables will be obtained, and multiple said text conversion tables form a text conversion library. In this example, the text conversion library consists of two text conversion tables with 100 - bit binary numbers and 144 - bit binary numbers.

[0126] Step S304: Store each said text conversion table in the data structure of a binary tree respectively. The said binary number representing the glyph feature information in the text conversion table is stored as the nodes of the binary tree, and the said character encoding information in the text conversion table is stored as the leaf nodes of the binary tree.

[0127] Please refer to Figure 5 The schematic diagram of the text conversion table stored in the binary tree structure. If the Unicode encoding is selected to represent the character encoding information, the leaves of the binary tree are Unicode codes; the nodes forming the path from the root to the leaves of the binary tree are the corresponding glyph feature information. It should be noted that the degree of the binary tree is equal to the number of bits of the unified query code, Figure 5 For the convenience of expression, the degree of the actual structure is simplified.

[0128] Step S305: Intercept and parse the RDP protocol data containing the RDP window title, and extract the glyph feature information data in the RDP window title.

[0129] For a method of intercepting and parsing RDP protocol data including an RDP window title and extracting glyph feature information data in the RDP window title, please refer to step S102 of the first embodiment of the present application.

[0130] Step S306: Representing the glyph feature information data in the RDP window title in binary form.

[0131] Step S307: matching the corresponding text conversion table in the text conversion library according to the number of bits of the binary number representing the glyph feature information in the RDP window title.

[0132] Step S308: inputting the binary number representing the glyph feature information in the RDP window title into the matching text conversion table, wherein the text conversion table is stored in a binary tree data structure; sequentially matching each digit of the binary number representing the glyph feature information in the RDP window title with the nodes starting from the root of the binary tree one by one to form a path, finding a leaf node, and obtaining the character encoding information data of the RDP window title.

[0133] Step S309: storing the character encoding information data of the RDP window title in a database.

[0134] Compared with the prior art, the present invention stores the text conversion table in a binary tree data structure, thereby further improving the speed of querying the text conversion table.

[0135] Embodiment 4 of the present invention discloses a device for recognizing text in an RDP window title, the structure of which is shown in FIG. Figure 7 As shown:

[0136] The conversion table definition unit M1 is used to define a text conversion table, which includes font feature information and character encoding information;

[0137] The data extraction unit M2 is used to intercept and parse the RDP protocol data including the RDP window title, and extract the font feature information data of the RDP window title;

[0138] The text recognition unit M3 is used to input the glyph feature information data of the RDP window title obtained from the data extraction unit M2 into the text conversion table obtained from the conversion table definition unit M1, obtain the corresponding character encoding information data by searching the text conversion table, and save it into the database DB.

[0139] Embodiment 5 of the present invention further discloses a device for recognizing text in an RDP window title, the structure of which is shown in FIG. Figure 8 As shown:

[0140] The conversion table definition unit M1 further comprises:

[0141] The font feature information digitization module M11 is used to represent the font feature information in binary form.

[0142] The unified query code generation module M12 is used to convert the glyph feature information obtained from the glyph feature information digitization module M11 into a unique unified query code one by one, wherein the unified query code is a binary number with a constant number of bits C; the conversion rule for converting the unified query code is as follows: let the maximum number of bits of the binary number representing the glyph feature information be C; if the number of bits of the binary number representing the glyph feature information to be converted is equal to C, then the unified query code is equal to the binary number representing the glyph feature information; otherwise, the unified query code is equal to the binary number representing the glyph feature information converted by a bit-filling algorithm into a binary number with a number of bits equal to C.

[0143] The character conversion table generating module M13 is used to generate a character conversion table by matching the character feature information obtained from the character feature information digitizing module M11 and the uniform query code obtained from the uniform query code generating module M12 to the corresponding character encoding information.

[0144] The text conversion table storage module M14 is used to store the text conversion table obtained from the text conversion table generation module M13 in a binary tree data structure, the unified query code of the text conversion table is stored as a node of the binary tree, and the character encoding information in the text conversion table is stored as a leaf node of the binary tree.

[0145] The text recognition unit M3 further comprises:

[0146] The font feature information data binarization module M31 is used to represent the font feature information data in the RDP window title obtained from the data extraction unit M2 in binary form;

[0147] A unified query code data conversion module M32, used for converting the binary number representing the glyph feature information data in the RDP window title obtained from the glyph feature information data binarization module M31 into the unified query code data according to the conversion rule of converting the unified query code and using the padding algorithm;

[0148] The query module M33 is used to input the unified query code data obtained from the unified query code conversion module M32 into the text conversion table obtained from the text conversion table storage module M14, and the text conversion table is stored in a binary tree data structure; each digit of the unified query code data is matched one by one with the node starting from the root of the binary tree in sequence to form a path, find the leaf node, obtain the character encoding information data of the RDP window title, and save it in the database DB.

[0149] Embodiment 6 of the present invention further discloses another device for RDP window title text recognition, the structure of which is shown as follows: Fig. 9 As shown:

[0150] The conversion table definition unit M1 further comprises:

[0151] The font feature information digitization module M11 is used to represent the font feature information in binary form;

[0152] The character conversion library generation module M15 is used to generate a character conversion record by matching the character feature information obtained from the character feature information digitization module M11 with the corresponding character encoding information; compose a plurality of the character conversion records into a character conversion table, wherein the number of bits of the binary number representing the character feature information contained in each of the character conversion records is the same; the number of bits of the binary number representing the character feature information contained in the character conversion records is different, and a plurality of the character conversion tables can be composed; the plurality of the character conversion tables compose a character conversion library;

[0153] The text conversion library storage module M16 is used to store each of the text conversion tables obtained from the text conversion library generation module M15 in a binary tree data structure, wherein the information representing the glyph features of the text conversion table is stored as a node of the binary tree, and the character encoding information in the text conversion table is stored as a leaf node of the binary tree.

[0154] The text recognition unit M3 further comprises:

[0155] The font feature information data binarization module M31 is used to represent the font feature information data in the RDP window title obtained from the data extraction unit M2 in binary form;

[0156] A matching module M34 is used to match the corresponding text conversion table in the text conversion library in the text conversion library storage module M16 according to the number of bits of the binary number representing the text feature information in the RDP window title obtained from the text feature information data binarization module M31; and send the feature attribute information of the text conversion table to the query module 2 M35;

[0157] The query module 2 M35 is used to input the binary number representing the glyph feature information in the RDP window title obtained from the glyph feature information data binarization module M31 into the matching text conversion table obtained from the text conversion library storage module M16, wherein the text conversion table is stored in a binary tree data structure, and each digit of the binary number representing the glyph feature information in the RDP window title is matched one by one with the nodes starting from the root of the binary tree in sequence to form a path, find the leaf node, and obtain the character encoding information data of the RDP window title; and save it in the database DB.

[0158] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the above-described systems, units and specific corresponding working processes of the units can refer to the aforementioned method steps and will not be repeated here.

[0159] The above description of the disclosed embodiments enables one skilled in the art to implement or use the present invention. Various modifications to these embodiments will be apparent to one skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but rather to the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A method for recognizing text in an RDP window title, characterized in that: The method comprises: Define a text conversion table, which includes glyph feature information and corresponding character encoding information, wherein the character encoding information refers to the binary character encoding used in the computer text system, wherein the definition of the text conversion table includes the following steps: Step 1, selecting a character encoding to represent the encoding information of the character; Step 2, collecting the font feature information of the commonly used characters in the RDP window title, and representing the font feature information in binary numbers; Step 3, matching the glyph feature information with the corresponding character encoding information one by one to generate a text conversion table; Intercepting and parsing RDP protocol data including RDP window titles, and extracting glyph feature information data in the RDP window titles, including the following steps: Step 1: intercept the RDP protocol packet from the network; Step 2: Analyze the RDP communication protocol and store the same RDP command in one message; Step 3: parse the RDP message and separate the RDP window title; Step 4: Decode the RDP window title and extract the glyph feature information data contained in the RDP window title; Inputting the glyph feature information data in the RDP window title into the text conversion table, and obtaining the corresponding character encoding information data by looking up the table; The character encoding information data of the RDP window title is stored in a database; The definition text conversion table also includes: Generate a text conversion record by combining the glyph feature information and the corresponding character encoding information; The plurality of character conversion records are combined into one character conversion table, wherein the number of bits of the binary number representing the character feature information contained in each character conversion table is the same; the number of bits of the binary number representing the character feature information contained in the character conversion records is different, and multiple character conversion tables can be combined; and multiple character conversion tables form a character conversion library; Furthermore, the definition of the text conversion table further comprises the following steps: Each of the character conversion tables is stored in a binary tree data structure, wherein the character feature information of the character conversion table is stored as a node of the binary tree, and the character encoding information in the character conversion table is stored as a leaf node of the binary tree; and The method of inputting the glyph feature information data in the RDP window title into the text conversion table and obtaining the character encoding information data of the corresponding RDP window title by looking up the table further comprises: Representing the glyph feature information data in the RDP window title in binary form; According to the number of bits of the binary number representing the glyph feature information in the RDP window title, matching the corresponding text conversion table in the text conversion library; The binary number representing the glyph feature information in the RDP window title is input into the matching text conversion table, and the text conversion table is stored in a binary tree data structure; each digit of the binary number representing the glyph feature information in the RDP window title is matched one by one in sequence with the nodes starting from the root of the binary tree to form a path, find the leaf node, and obtain the character encoding information data of the RDP window title.

2. A device for recognizing text in RDP window title, characterized in that: Include: The conversion table definition unit is used to define a text conversion table, the text conversion table includes glyph feature information and character encoding information, the character encoding information refers to the binary character encoding used in the computer text system, and the conversion table definition unit includes a glyph feature information data module, the glyph feature information data module is used to represent the glyph feature information in binary numbers, wherein the definition of the text conversion table includes the following steps: Step 1, selecting a character encoding to represent the encoding information of the character; Step 2, collecting the glyph feature information of the commonly used characters in the RDP window title, and the conversion table definition unit represents the glyph feature information in binary numbers; Step 3, the text conversion table generation module generates a text conversion table by matching the glyph feature information with the corresponding character encoding information one by one; The data extraction unit is used to intercept and parse the RDP protocol data including the RDP window title, and extract the font feature information data of the RDP window title, including the following steps: Step 1: intercept the RDP protocol packet from the network; Step 2: Analyze the RDP communication protocol and store the same RDP command in one message; Step 3: parse the RDP message and separate the RDP window title; Step 4: Decode the RDP window title and extract the glyph feature information data contained in the RDP window title; A character recognition unit, used for inputting the glyph feature information data of the RDP window title obtained from the data extraction unit into the character conversion table obtained from the conversion table definition unit, obtaining corresponding character encoding information data by searching the character conversion table, and saving the data into a database; The conversion table definition unit also includes: A character conversion library generation module is used to generate a character conversion record by matching the character feature information obtained from the character feature information dataization module with the corresponding character encoding information; a plurality of the character conversion records are combined into a character conversion table, wherein the number of bits of the binary number representing the character feature information contained in each character conversion table is the same; the number of bits of the binary number representing the character feature information contained in the character conversion records is different, and a plurality of the character conversion tables can be combined; and the plurality of the character conversion tables form a character conversion library; A text conversion library storage module, used to store each of the text conversion tables obtained from the text conversion library generation module in a binary tree data structure, wherein the information representing the glyph features of the text conversion table is stored as a node of the binary tree, and the character encoding information in the text conversion table is stored as a leaf node of the binary tree; and The character recognition unit also includes: A font feature information data binarization module, used to represent the font feature information data in the RDP window title obtained from the data extraction unit in binary form; a matching module, configured to match the corresponding character conversion table in the character conversion library obtained from the character conversion library storage module according to the number of bits of the binary number representing the character feature information in the RDP window title obtained from the character feature information data binarization module; and send the feature attribute information of the character conversion table to the query module 2; The query module 2 is used to input the binary number representing the glyph feature information in the RDP window title obtained from the glyph feature information data binarization module into the matching text conversion table obtained from the text conversion library storage module, wherein the text conversion table is stored in a binary tree data structure, and each digit of the binary number representing the glyph feature information in the RDP window title is matched one by one with the nodes starting from the root of the binary tree in sequence to form a path, find the leaf node, obtain the character encoding information data of the RDP window title, and save it in the database.

Citation Information

Patent Citations

  • Picture character identification method and apparatus thereof

    CN106599940A

  • Data processing method and system

    CN107403108A

  • Rapid processing method, equipment and system of nondestructive file and storage medium

    CN108829872A