A table processing method based on Unicode and related device

Through the table processing method based on Universal Code, the problem of poor display effect of character terminals when drawing complex tables is solved, clearer and more beautiful table display is achieved, and the user experience is improved.

CN112395830BActive Publication Date: 2025-01-21TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN201910702453.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2019-07-31
Publication Date
2025-01-21
Estimated Expiration
2039-11-08

AI Technical Summary

Technical Problem

When drawing tables, existing character terminals find it difficult to clearly represent content in complex scenarios, especially when multiple row tables display different column counts, they cannot be expressed concisely and clearly, affecting the display effect and user experience.

Method used

The table processing method based on Universal Code is used to obtain the characters in the table, determine the characters that meet the preset conditions based on the ruler information or corner information, and convert these characters according to the preset rules to generate a table more suitable for display.

Benefits of technology

It improves the clarity and aesthetics of table display on character terminals, adapts to the needs of different scenarios, enhances the readability of information and improves user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112395830B_ABST
    Figure CN112395830B_ABST
Patent Text Reader

Abstract

The present application discloses a table processing method based on Unicode and a related device, which determines multiple characters in a first table drawn based on a Unicode encoding table in a character terminal according to feature information, and respectively determines information of dimensions such as their length or inflection point and related drawing requirements, and then converts the determined multiple characters according to characters in a preset set. Different display modes can be selected according to different scene requirements, and the method is adaptable to the drawing of multi-row and multi-column tables, which improves the clarity and beauty of the character terminal display, and has tables with multiple functions, greatly increasing the readability of information and improving user experience.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a table processing method based on Unicode and related devices. Background Art

[0002] With the development of computer technology, character terminals have gradually become necessary human-computer interaction tools in embedded applications. Commonly used character terminals include serial port terminals, pseudo terminals, console terminals, etc. They are character-type devices that display in the form of strings. The interface is relatively simple and usually interacts with users in the form of menus. After the character terminal is started, a menu message is displayed to prompt the user to input. The user enters the command, the device processes the command and displays the next menu, and this is repeated continuously to achieve the purpose of human-computer interaction.

[0003] Generally, character terminals use common characters such as "+", "-", "|" to draw table information. For example, Figure 1 The table shown is a schematic diagram of a table drawn in a general character terminal.

[0004] However, the table drawn based on the above characters is difficult to clearly represent the corresponding content in some complex scenarios, and cannot be represented concisely and clearly when a multi-row table displays different numbers of columns, which affects the display effect and the user experience. Summary of the invention

[0005] In view of this, the first aspect of the present application provides a table processing method based on Unicode, which can be applied to the system or operation process of a character terminal, specifically comprising: obtaining a first table, the first table including A characters, the A characters are converted based on the Unicode encoding table, and A is a positive integer; determining B characters that meet a preset condition, B≤A, and B is a positive integer, the preset condition is set based on feature information of the first table, the feature information includes scale information or corner information, the scale information is used to indicate length-related parameters, and the corner information is used to indicate the position of different characters in a segment of characters; converting the B characters according to preset rules to obtain a second table, the preset rules include converting the B characters into C characters in a preset set, C≥B, C is a positive integer, and the preset set is set based on the Unicode encoding table.

[0006] Preferably, in some possible implementations of the present application, if the characteristic information is scale information, and the preset condition is to divide the first table according to preset intervals, then determining B characters that meet the preset conditions includes: obtaining the scale information of the first table, wherein the scale information is based on the display of the current interface; if the length indicated by the scale information is within the range displayed on the interface, then determining B characters on the first table according to the preset intervals.

[0007] Preferably, in some possible implementations of the present application, the method further includes: if the length indicated by the ruler information exceeds the range displayed on the interface, determining a third table, wherein the third table is the portion of the first table that exceeds the range displayed on the interface; transferring the third table to within the range of the interface; and determining B characters on the third table at preset intervals.

[0008] Preferably, in some possible implementations of the present application, if the characteristic information is corner information, then determining B characters that meet preset conditions includes: determining the position of the difference character based on the corner information; if the character string containing the difference character is greater than a preset length, then determining the difference character as the B characters.

[0009] Preferably, in some possible implementations of the present application, the first table also includes first data, the first data is text information, and the B characters are converted according to a preset rule to obtain a second table, including: determining the Unicode encoding corresponding to the text information and calculating the character length; selecting the D characters greater than or equal to the character length and entering them into a blank character group to obtain a second table.

[0010] Preferably, in some possible implementations of the present application, the first data is color information, and the converting of the B characters according to preset rules to obtain a second table includes: determining the Unicode code corresponding to the color information to obtain a color character; and adding the color character to the B characters according to preset position information to obtain a second table.

[0011] Preferably, in some possible implementations of the present application, the first table also includes second data, and the second data is input point information. The selecting the D characters greater than or equal to the character length and inputting them into the blank character group to obtain the second table includes: determining the input starting point of the first data in the table according to the second data; selecting the D characters greater than or equal to the character length and inputting them into the blank character group from the input starting point to obtain the second table.

[0012] A second aspect of the present application provides another table processing device, comprising: an acquisition unit, configured to acquire a first table, wherein the first table includes A characters, the A characters are converted based on a Unicode encoding table, and A is a positive integer;

[0013] a determination unit, configured to determine B characters that meet a preset condition, where B≤A, and B is a positive integer, wherein the preset condition is set based on feature information of the first table, wherein the feature information includes scale information or angle information, wherein the scale information is used to indicate a length-related parameter, and the angle information is used to indicate a position of a difference character in a segment of characters;

[0014] A conversion unit is used to convert the B characters according to a preset rule to obtain a second table, wherein the preset rule includes converting the B characters into C characters in a preset set, C≥B, C is a positive integer, and the preset set is set based on the Unicode encoding table.

[0015] Preferably, in some possible implementations of the present application, the characteristic information is scale information, the preset condition is to divide the first table according to preset intervals,

[0016] The determining unit is specifically configured to obtain the scale information of the first table, wherein the scale information is determined based on the display status of the current interface;

[0017] The determining unit is specifically configured to determine B characters on the first table at preset intervals if the length indicated by the ruler information is within a range displayed on the interface.

[0018] Preferably, in some possible implementations of the present application,

[0019] The determining unit is further configured to determine a third table if the length indicated by the ruler information exceeds the range displayed on the interface, wherein the third table is a portion of the first table that exceeds the range displayed on the interface;

[0020] The conversion unit is further used to transfer the third table into the interface range;

[0021] The conversion unit is further used to determine B characters on the third table according to preset intervals.

[0022] Preferably, in some possible implementations of the present application, the characteristic information is corner information.

[0023] The determining unit is specifically configured to determine the position of the difference character according to the corner information;

[0024] The determining unit is specifically configured to determine the difference characters as the B characters if the character string in which the difference characters are located is greater than a preset length.

[0025] Preferably, in some possible implementations of the present application, the first table further includes first data, and the first data is text information.

[0026] The conversion unit is specifically used to determine the Unicode code corresponding to the text information and calculate the character length;

[0027] The conversion unit is specifically used to select the D characters greater than or equal to the character length and input them into the blank character group to obtain a second table.

[0028] Preferably, in some possible implementations of the present application, the first data is color information,

[0029] The conversion unit is specifically used to determine the Unicode code corresponding to the color information to obtain the color character;

[0030] The conversion unit is specifically configured to add the color character to the B characters according to preset position information to obtain a second table.

[0031] Preferably, in some possible implementations of the present application, the first table further includes second data, the second data is input point information, and the conversion unit is specifically configured to determine the input starting point of the first data in the table according to the second data;

[0032] The conversion unit is specifically used to select the D characters greater than or equal to the character length and input them into the blank character group from the input starting point to obtain a second table.

[0033] The third aspect of the present application provides a computer device, comprising: a memory, a processor and a bus system; the memory is used to store program code; the processor is used to execute the table processing method described in the first aspect or any one of the first aspects according to the instructions in the program code.

[0034] A fourth aspect of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores instructions, which, when executed on a computer, enables the computer to execute the table processing method described in the first aspect or any one of the first aspects.

[0035] It can be seen from the above technical solutions that the embodiments of the present application have the following advantages:

[0036] By determining the multiple characters in the first table to be drawn based on the Unicode encoding table in the character terminal according to the feature information, and respectively determining the information of dimensions such as their length or inflection point and related drawing requirements, and then converting the determined multiple characters according to the characters in the preset set, different display modes can be selected according to different scene requirements, and it is adaptable to the drawing of multi-row and multi-column tables, which improves the clarity and beauty of the character terminal display, and has tables with multiple functions, greatly increasing the readability of information and improving user experience. BRIEF DESCRIPTION OF THE DRAWINGS

[0037] In order to more clearly illustrate the embodiments of the present application 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 embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying any creative work.

[0038] Figure 1 It is a table diagram drawn in a general character terminal;

[0039] Figure 2 This is a network architecture diagram for character terminal operation;

[0040] Figure 3 A flowchart of a table processing method based on Unicode provided in an embodiment of the present application;

[0041] Figure 4 A schematic diagram of a table processing process provided in an embodiment of the present application;

[0042] Figure 5 A schematic diagram of another process of table processing provided in an embodiment of the present application;

[0043] Figure 6 A schematic diagram of another process of table processing provided in an embodiment of the present application;

[0044] Figure 7 A flowchart of another Unicode-based table processing method provided in an embodiment of the present application;

[0045] Figure 8 It is a table display schematic diagram of a character terminal provided in an embodiment of the present application;

[0046] Fig. 9 This is a schematic diagram of an interface display of a table processing provided in an embodiment of the present application;

[0047] Fig.10 A schematic diagram of an application scenario provided for an embodiment of the present application;

[0048] Fig.11 A schematic diagram of another application scenario provided for an embodiment of the present application;

[0049] Fig.12 A schematic diagram of another application scenario provided for an embodiment of the present application;

[0050] Fig.13 A schematic diagram of the structure of a table processing device provided in an embodiment of the present application;

[0051] Fig.14A schematic diagram of the structure of another table processing device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0052] The embodiment of the present application provides a table processing method based on Unicode and a related device, which can be applied to the operation process of the relevant system or program of the character terminal. Specifically, multiple characters in a first table are drawn based on the Unicode encoding table in the character terminal according to the feature information, and the information of dimensions such as their length or inflection point and related drawing requirements are determined respectively. Then, the determined multiple characters are converted according to the characters in the preset set. Different display modes can be selected according to different scene requirements. It is adaptable to the drawing of multi-row and multi-column tables, which improves the clarity and beauty of the display of the character terminal, and has a table with multiple functions, which greatly increases the readability of information and improves the user experience.

[0053] The terms "first", "second", "third", "fourth", etc. (if any) in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein, for example. In addition, the terms "including" and "corresponding to" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0054] It should be understood that the table processing method provided in the present application can be applied to the operation process of the character terminal. Specifically, the character terminal can be operated in the following manner: Figure 2 In the network architecture shown in Figure 2 The figure shows the network architecture of the character terminal. As can be seen from the figure, the character terminal can interact with multiple servers and display data in the form of strings. The interface is relatively simple and usually interacts with the user in the form of menus. After the character terminal is started, a menu message is displayed to prompt the user to input. The user enters the command, the device processes the command and displays the next menu. This is repeated to achieve the purpose of human-computer interaction. It can be understood that Figure 2 Three servers are shown in the figure. In actual scenarios, more or fewer servers may participate in data interaction. The specific number depends on the actual scenario and is not limited here.

[0055] With the development of computer technology, character terminals have gradually become necessary human-computer interaction tools in embedded applications. Commonly used character terminals include serial port terminals, pseudo terminals, console terminals, etc. They are character-type devices that display in the form of strings. The interface is relatively simple and usually interacts with users in the form of menus. After the character terminal is started, a menu message is displayed to prompt the user to input. The user enters the command, the device processes the command and displays the next menu, and this is repeated continuously to achieve the purpose of human-computer interaction.

[0056] Generally, character terminals use common characters such as "+", "-", "|" to draw table information. For example, Figure 1 The table shown is a schematic diagram of a table drawn in a general character terminal.

[0057] However, the table drawn based on the above characters is difficult to clearly represent the corresponding content in some complex scenarios, and cannot be represented concisely and clearly when a multi-row table displays different numbers of columns, which affects the display effect and the user experience.

[0058] To solve the above problems, the following describes the table processing method in this application in combination with the above system architecture. Figure 3 , Figure 3 A flowchart of a Unicode-based table processing method provided in an embodiment of the present application, the embodiment of the present application at least comprises the following steps:

[0059] 301. Get A characters in the first table.

[0060] In this embodiment, the first table can be transmitted from the server side, or it can be generated by the character terminal; that is, the first table can be the table data sent by the server side, and the table processing method provided in the embodiment of the present application can be applied after receiving the table and before displaying the table, and can be used as a display preprocessing process; for the case where the first table is generated by the character terminal, the table processing method provided in the embodiment of the present application can be applied to the process of the user inputting relevant table data or drawing the table, and can be used as an application in a character terminal or as an external plug-in of a character terminal, and the specific method depends on the actual scenario.

[0061] It can be understood that in this embodiment, a Unicode encoding drawing table from 0x2500 (hexadecimal) to 0x250F (hexadecimal) can be used, wherein the first table can be drawn by characters such as "+", "-", "|", and the A characters in the first table can be determined by determining the Unicode encoding corresponding to the symbol. For example, "+" is U+253C, and U+254B or U+2542 can also be derived based on different line types. The A characters can be determined by obtaining the above characters or finding the corresponding encodings.

[0062] 302. Determine B characters that meet a preset condition.

[0063] In this embodiment, the preset condition is set based on the characteristic information of the first table, wherein the characteristic information includes scale information or corner information, the scale information is used to indicate length-related parameters, and the corner information is used to indicate the positions of different characters in a segment of characters.

[0064] It can be understood that the preset condition can be set based on one of the scale information or the corner information, for example: the preset condition is that the character length corresponding to the scale information is less than five characters; the preset condition can also be set based on multiple of the scale information or the corner information, for example: the preset condition is that the character length corresponding to the scale information is less than five characters and the distance between the difference characters indicated by the corner information is greater than ten characters; the preset condition can also be set based on other feature information, for example: interface display, color coding, row position, etc., which can display the parameters of related elements in the table.

[0065] It should be noted that when the number of B characters is equal to the number of A characters, all data in the first table can be re-encoded, that is, all characters can be converted into Unicode codes, and then the second table can be generated according to the preset Unicode code change correspondence, for example: all U+253C can be converted to U+252C.

[0066] 303. Convert the B characters into C characters in a preset set according to a preset rule to obtain a second table.

[0067] In this embodiment, the preset set can be one or more of “─”, “│”, “┘”, “└”, “┐”, “┌”, “┴”, “┬”, “├”, “┤”, “┼”, or other characters or combinations in the Unicode encoding table based on 0x2500 (hexadecimal) to 0x250F (hexadecimal).

[0068] It should be noted that C≥B, when C=B, there is a correspondence between the conversion characters, and the correspondence is determined based on the direction of the rows or columns of the table. For example, when the drawing direction of the table is downward, the "+" in the first table is converted to "┬", and the corresponding encoding conversion method may be U+253C to U+252C; when C>B, there may be a correspondence between the combinations of characters in multiple preset sets, for example, the "+" in the first table is converted to "─" "│" and, and the corresponding encoding conversion method may be U+253C to U+2500 and U+2502. This is because the table is in the corner area, which may be "┐", and then converted to a combination of "─" "│".

[0069] It can be understood that the setting of the preset rules can be based on the characteristic information of the first table. For example: for corner information, determine the drawing direction of the row or column of the first table, and then select the characters in the corresponding preset set; for scale information, determine the spacing between the characters in the first table, and then select the characters in the preset set that can achieve the target spacing.

[0070] In combination with the above embodiments, it can be seen that by determining the multiple characters in the first table drawn based on the Unicode encoding table in the character terminal according to the feature information, and determining the information of dimensions such as their length or inflection point and related drawing requirements respectively, and then converting the determined multiple characters according to the characters in the preset set, different display modes can be selected according to different scene requirements, and it is adaptable to the drawing of multi-row and multi-column tables, which improves the clarity and beauty of the character terminal display, and has tables with multiple functions, greatly increasing the readability of information and improving user experience.

[0071] The following describes the feature information in conjunction with a specific scenario. When the feature information is corner information, such as Figure 4 As shown, it is a schematic diagram of a table processing process provided by an embodiment of the present application. Since the corner information is used to indicate the position of the difference character in a segment of characters, corresponding to the figure, that is, there is a character representation of "+----" in a row of characters, at this time, it can be determined that "+" is a difference character. According to the preset rules, the drawing direction of the table can be determined to be from left to right, that is, "+" can be converted to "┌", that is, U+253C is converted to U+250C. Based on the above method, the difference characters are converted to obtain Figure 4 The conversion result in .

[0072] In another possible scenario, the feature information includes corner information and scale information, such as Figure 5 As shown, it is a schematic diagram of another process of table processing provided by an embodiment of the present application. Since the scale information indicates that the character interval is 0, the "---" in the original table is converted to "---". Then, since the corner information is used to indicate the position of the difference character in a segment of characters, corresponding to the figure, that is, there is a character representation of "+----" in a row of characters, at this time, it can be determined that "+" is a difference character. According to the preset rules, the drawing direction of the table can be determined to be from left to right, that is, "+" can be converted to "┌", that is, U+253C is converted to U+250C. Based on the above method, the difference characters are converted in this way, and then the result can be obtained. Figure 5 The conversion effect in .

[0073] In another possible scenario, Figure 6As shown in FIG. 1 , it is a schematic diagram of another table processing process provided by an embodiment of the present application. The display interface of the terminal is limited. At this time, the table display is incomplete, that is, A1 and A2 cannot be fully displayed. At this time, the encoding information corresponding to A1 and A2 can be called out first, and then input into the vacant display interface position after the other parts in the display interface are drawn. Then, the corresponding character conversion process based on the ruler information or the corner information is performed, and the following can be obtained. Figure 6 The conversion effect in .

[0074] It is understandable that if A1 is associated with adjacent characters in the original table, corresponding associated characters can be generated during encoding. When the user performs a zoom-out operation, the display interface is sufficient to display the original table, and A1 is transferred to the corresponding position according to the associated characters.

[0075] In actual scenarios, there is generally corresponding data information in the table. The following is an explanation of the scenario with reference to the accompanying drawings. Figure 7 As shown, Figure 7 A flowchart of another Unicode-based table processing method provided in an embodiment of the present application, the embodiment of the present application at least includes the following steps:

[0076] 701. Obtain A characters in the first table.

[0077] In this embodiment, the first table can be transmitted from the server side, or it can be generated by the character terminal; that is, the first table can be the table data sent by the server side, and the table processing method provided in the embodiment of the present application can be applied after receiving the table and before displaying the table, and can be used as a display preprocessing process; for the case where the first table is generated by the character terminal, the table processing method provided in the embodiment of the present application can be applied to the process of the user inputting relevant table data or drawing the table, and can be used as an application in a character terminal or as an external plug-in of a character terminal, and the specific method depends on the actual scenario.

[0078] It can be understood that in this embodiment, a Unicode encoding drawing table from 0x2500 (hexadecimal) to 0x250F (hexadecimal) can be used, wherein the first table can be drawn by characters such as "+", "-", "|", and the A characters in the first table can be determined by determining the Unicode encoding corresponding to the symbol. For example, "+" is U+253C, and U+254B or U+2542 can also be derived based on different line types. The A characters can be determined by obtaining the above characters or finding the corresponding encodings.

[0079] 702. Determine B characters that meet a preset condition.

[0080] In this embodiment, the preset condition is set based on the characteristic information of the first table, wherein the characteristic information includes scale information or corner information, the scale information is used to indicate length-related parameters, and the corner information is used to indicate the positions of different characters in a segment of characters.

[0081] It can be understood that the preset condition can be set based on one of the scale information or the corner information, for example: the preset condition is that the character length corresponding to the scale information is less than five characters; the preset condition can also be set based on multiple of the scale information or the corner information, for example: the preset condition is that the character length corresponding to the scale information is less than five characters and the distance between the difference characters indicated by the corner information is greater than ten characters; the preset condition can also be set based on other feature information, for example: interface display, color coding, row position, etc., which can display the parameters of related elements in the table.

[0082] It should be noted that when the number of B characters is equal to the number of A characters, all data in the first table can be re-encoded, that is, all characters can be converted into Unicode codes, and then the second table can be generated according to the preset Unicode code change correspondence, for example: all U+253C can be converted to U+252C.

[0083] 703. Convert the B characters into C characters in a preset set according to a preset rule to obtain a second table.

[0084] In this embodiment, the preset set can be one or more of “─”, “│”, “┘”, “└”, “┐”, “┌”, “┴”, “┬”, “├”, “┤”, “┼”, or other characters or combinations in the Unicode encoding table based on 0x2500 (hexadecimal) to 0x250F (hexadecimal).

[0085] It should be noted that C≥B, when C=B, there is a correspondence between the conversion characters, and the correspondence is determined based on the direction of the rows or columns of the table. For example, when the drawing direction of the table is downward, the "+" in the first table is converted to "┬", and the corresponding encoding conversion method may be U+253C to U+252C; when C>B, there may be a correspondence between the combinations of characters in multiple preset sets, for example, the "+" in the first table is converted to "─" "│" and, and the corresponding encoding conversion method may be U+253C to U+2500 and U+2502. This is because the table is in the corner area, which may be "┐", and then converted to a combination of "─" "│".

[0086] It can be understood that the setting of the preset rules can be based on the characteristic information of the first table. For example: for corner information, determine the drawing direction of the row or column of the first table, and then select the characters in the corresponding preset set; for scale information, determine the spacing between the characters in the first table, and then select the characters in the preset set that can achieve the target spacing.

[0087] 704. Input into the second table according to the data type and input settings of the first table.

[0088] In this embodiment, the data type of the first table can be text, color coding, display logo and other related information. When the text information is in Chinese, the Unicode code corresponding to the Chinese can be determined and the character length can be calculated; then the D characters greater than or equal to the character length are selected to enter a blank character group to enter the corresponding Chinese.

[0089] When the data type is color coding, the coding form of rgb(0,0,0) can be used, where the three numbers in the brackets correspond to the lighting degree of the three primary colors of red, green, and blue, respectively, and the value range is 0-255, 0 is completely dark, and 255 is fully lit for the color; that is, rgb(0,0,0) corresponds to a black screen because all colors are dark, so rgb(255,255,255) is white because all colors are lit and the screen is completely white. Select the corresponding color code and enter it into the corresponding blank character area in the table to realize the background color selection in the table.

[0090] In addition, there may be a need for typesetting during the process of inputting related texts, and corresponding display identifiers may be specified to specify information such as the alignment or font size of the input text information.

[0091] The effect of the table processing method provided in the embodiment of the present application is described below in conjunction with a specific scenario. Figure 8 As shown, it is a table display schematic diagram of a character terminal provided in an embodiment of the present application, which has undergone character conversion based on ruler information, character conversion based on corner information, and input requirements of related text information.

[0092] It can be seen from the above embodiments that by determining the multiple characters in the first table drawn based on the Unicode encoding table in the character terminal according to the feature information, and respectively determining the information of dimensions such as their length or inflection point and related drawing requirements, and then converting the determined multiple characters according to the characters in the preset set, different display modes can be selected according to different scene requirements, and it is adaptable to the drawing of multi-row and multi-column tables, which improves the clarity and beauty of the character terminal display, and can draw related features in response to different data and user needs, greatly increasing the readability of information and improving user experience.

[0093] When the above method embodiment is applied in a conversion program, the following method can be used: Fig. 9 The display method described, Fig. 9 A schematic diagram of an interface display of a table processing provided in an embodiment of the present application. The interface may include a converted table display. When the user wants to know the specific conversion process, he can click the processing details button to see the original table and the corresponding conversion method and the corresponding basis.

[0094] Combined with the above table conversion method, the above method can be applied to a variety of scenarios where information needs to be displayed on a character terminal, such as: Fig.10 A schematic diagram of an application scenario provided by an embodiment of the present application, the figure is an application scenario of a WeChat subscription account, specifically at least the character conversion method provided by the present application is applied to draw a table, and the input point information corresponding to the corresponding second data is also used, that is, the left alignment method is adopted; in another possible scenario, Fig.11 Another application scenario schematic diagram provided in the embodiment of the present application, the figure is an application scenario of WeChat card wallet, specifically compared with Fig.10 In the scenario, this embodiment is also applied to the use of color information in the first data, that is, background color change. It can be understood that the color information can be a single color or a combination of multiple colors, and can correspond to images corresponding to one or more colors; in another possible scenario, Fig.12 A schematic diagram of another application scenario provided for an embodiment of the present application shows an application scenario of search. In this embodiment, the table conversion method provided in the above embodiment is adopted to make the interface neat and clear, easy for users to use, and improve the user experience.

[0095] In order to better implement the above solution of the embodiment of the present application, the following also provides related devices for implementing the above solution. Fig.13 , Fig.13 This is a structural diagram of a table processing device provided in an embodiment of the present application. The table processing device 1300 includes:

[0096] An acquiring unit 1301 is configured to acquire a first table, wherein the first table includes A characters, the A characters are converted based on a Unicode encoding table, and A is a positive integer;

[0097] A determining unit 1302 is used to determine B characters that meet a preset condition, where B≤A, and B is a positive integer, wherein the preset condition is set based on feature information of the first table, wherein the feature information includes scale information or corner information, wherein the scale information is used to indicate a length-related parameter, and the corner information is used to indicate a position of a difference character in a segment of characters;

[0098] The conversion unit 1303 is used to convert the B characters according to a preset rule to obtain a second table, wherein the preset rule includes converting the B characters into C characters in a preset set, C≥B, C is a positive integer, and the preset set is set based on the Unicode encoding table.

[0099] Preferably, in some possible implementations of the present application, the characteristic information is scale information, the preset condition is to divide the first table according to preset intervals,

[0100] The determining unit 1302 is specifically configured to obtain the scale information of the first table, where the scale information is determined based on the display status of the current interface;

[0101] The determining unit 1302 is specifically configured to determine B characters on the first table at preset intervals if the length indicated by the ruler information is within a range displayed on the interface.

[0102] Preferably, in some possible implementations of the present application,

[0103] The determining unit 1302 is further configured to determine a third table if the length indicated by the ruler information exceeds the range displayed on the interface, wherein the third table is a portion of the first table that exceeds the range displayed on the interface;

[0104] The conversion unit 1303 is further used to transfer the third table into the range of the interface;

[0105] The converting unit 1303 is further configured to determine B characters on the third table according to a preset interval.

[0106] Preferably, in some possible implementations of the present application, the characteristic information is corner information.

[0107] The determining unit 1302 is specifically configured to determine the position of the difference character according to the corner information;

[0108] The determining unit 1302 is specifically configured to determine the difference characters as the B characters if the character string containing the difference characters is greater than a preset length.

[0109] Preferably, in some possible implementations of the present application, the first table further includes first data, and the first data is text information.

[0110] The conversion unit 1303 is specifically used to determine the Unicode code corresponding to the text information and calculate the character length;

[0111] The conversion unit 1303 is specifically configured to select the D characters greater than or equal to the character length and input them into the blank character group to obtain a second table.

[0112] Preferably, in some possible implementations of the present application, the first data is color information,

[0113] The conversion unit 1303 is specifically used to determine the Unicode code corresponding to the color information to obtain the color character;

[0114] The conversion unit 1303 is specifically configured to add the color character to the B characters according to preset position information to obtain a second table.

[0115] Preferably, in some possible implementations of the present application, the first table further includes second data, the second data is input point information, and the conversion unit 1303 is specifically configured to determine the input starting point of the first data in the table according to the second data;

[0116] The conversion unit 1303 is specifically configured to select the D characters greater than or equal to the character length and input them into the blank character group from the input starting point to obtain a second table.

[0117] By configuring the table processing instructions of the relevant indicator type to be determined according to preset rules, wherein the preset rules include dividing the table processing instructions of the indicator type to be determined into at least two parts, the at least two parts include a business-related part and a processing method part, the processing method part is used to indicate multiple calculation methods or multiple aggregation methods, which facilitates the configuration of the table processing instructions for relevant indicators in multi-dimensional test scenarios. Due to the various forms of configuration, the comprehensiveness of the statistical results is guaranteed, making the test results more accurate; and the configuration process is simplified, thereby improving the efficiency of the test.

[0118] The present application also provides a table processing device. Fig.14 , Fig.1414 is a schematic diagram of the structure of another table processing device provided in an embodiment of the present application. The table processing device 1400 may have relatively large differences due to different configurations or performances, and may include one or more central processing units (CPU) 1422 (for example, one or more processors) and a memory 1432, and one or more storage media 1430 (for example, one or more mass storage devices) storing application programs 1442 or data 1444. Among them, the memory 1432 and the storage medium 1430 may be temporary storage or permanent storage. The program stored in the storage medium 1430 may include one or more modules (not shown in the figure), and each module may include a series of instruction operations in the table processing device. Furthermore, the central processing unit 1422 may be configured to communicate with the storage medium 1430 to execute a series of instruction operations in the storage medium 1430 on the table processing device 1400.

[0119] The table processing device 1400 may also include one or more power supplies 1426, one or more wired or wireless network interfaces 1450, one or more input and output interfaces 1458, and / or, one or more operating systems 1441, such as Windows ServerTM, Mac OS XTM, UnixTM, LinuxTM, FreeBSDTM, etc.

[0120] The steps performed by the table processing device in the above embodiment can be based on the Fig.13 The table processing device structure shown.

[0121] The present application also provides a computer-readable storage medium in which data table processing instructions are stored. When the computer-readable storage medium is run on a computer, the computer executes the above-mentioned Figures 3 to 7 The illustrated embodiment describes the steps performed by the table processing device in the method.

[0122] The present application also provides a computer program product including data table processing instructions, which, when executed on a computer, enables the computer to execute the above Figures 3 to 7 The illustrated embodiment describes the steps performed by the table processing device in the method.

[0123] The present application also provides a table processing system, which may include Fig.13 The table processing device in the described embodiment, or Fig.14 A form processing device as described.

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

[0125] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.

[0126] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0127] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0128] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, a spreadsheet processing device, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), disk or optical disk and other media that can store program code.

[0129] As described above, the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or perform equivalent conversions on some of the technical features therein. However, these modifications or conversions do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application.

Claims

1. A table processing method based on Unicode, applied to a character terminal, characterized in that: include: Obtain a first table, wherein the first table includes A characters, the A characters are converted based on the Unicode encoding table, and A is a positive integer; Determine B characters that meet a preset condition, B≤A, and B is a positive integer, the preset condition is set based on the characteristic information of the first table, the characteristic information includes scale information or angle information, the scale information is used to indicate a length-related parameter, and the angle information is used to indicate a position of a difference character in a segment of characters; According to a preset rule, the B characters are converted into C characters in a preset set to obtain a second table, wherein the preset rule is set based on the feature information of the first table, wherein for the corner information, the drawing direction of the row or column of the first table is determined, and the corresponding character in the preset set is selected, and for the scale information, the spacing between the characters in the first table is determined, and the characters in the preset set that reach the target spacing are selected, C ≥ B, C is a positive integer, and the preset set is set based on the Unicode encoding table; If the characteristic information is scale information, and the preset condition is to divide the first table according to preset intervals, then determining B characters that meet the preset condition includes: Obtaining the scale information of the first table, wherein the scale information is based on the display condition of the current interface; If the length indicated by the ruler information is within the range displayed on the interface, determining B characters on the first table according to a preset interval; Wherein, if the characteristic information is corner information, determining B characters that meet the preset conditions includes: Determine the position of the difference character according to the corner information; If the character string containing the difference characters is greater than a preset length, the difference characters are determined to be the B characters.

2. The table processing method according to claim 1, characterized in that: The method further comprises: If the length indicated by the ruler information exceeds the range displayed on the interface, determining a third table, wherein the third table is the portion of the first table that exceeds the range displayed on the interface; Transferring the third table to the interface range; B characters are determined on the third table at preset intervals.

3. The table processing method according to claim 1 or 2, characterized in that: The first table also includes first data, which is text information. The B characters are converted according to a preset rule to obtain a second table, including: Determine the Unicode code corresponding to the text information and calculate the character length; Select D characters greater than or equal to the character length and input them into the blank character group to obtain a second table, D≤B, and D is a positive integer.

4. The table processing method according to claim 3, characterized in that: The first data is color information, and the B characters are converted according to a preset rule to obtain a second table, including: Determine the Unicode code corresponding to the color information to obtain the color character; The color character is added to the B characters according to the preset position information to obtain a second table.

5. The table processing method according to claim 3, characterized in that: The first table also includes second data, the second data is input point information, and the D characters greater than or equal to the character length are selected and input into the blank character group to obtain the second table, including: Determine the input starting point of the first data in the table according to the second data; The D characters greater than or equal to the character length are selected and input into the blank character group from the input starting point to obtain a second table.

6. A table processing device based on Unicode, applied to a character terminal, characterized in that: include: An acquiring unit, configured to acquire a first table, wherein the first table includes A characters, the A characters are converted based on the Unicode encoding table, and A is a positive integer; a determination unit, configured to determine B characters that meet a preset condition, where B≤A, and B is a positive integer, wherein the preset condition is set based on feature information of the first table, wherein the feature information includes scale information or angle information, wherein the scale information is used to indicate a length-related parameter, and the angle information is used to indicate a position of a difference character in a segment of characters; a conversion unit, converting the B characters into C characters in a preset set according to a preset rule to obtain a second table, wherein the preset rule is set based on the feature information of the first table, wherein for the corner information, the drawing direction of the row or column of the first table is determined, and the corresponding character in the preset set is selected; and for the scale information, the spacing between the characters in the first table is determined, and the characters in the preset set that reach the target spacing are selected, C ≥ B, C is a positive integer, and the preset set is set based on the Unicode encoding table; If the characteristic information is scale information, and the preset condition is to divide the first table according to preset intervals, the determining unit is specifically configured to: Obtaining the scale information of the first table, wherein the scale information is based on the display condition of the current interface; If the length indicated by the ruler information is within the range displayed on the interface, determining B characters on the first table according to a preset interval; Wherein, if the characteristic information is corner information, the determining unit is specifically used to: Determine the position of the difference character according to the corner information; If the character string containing the difference characters is greater than a preset length, the difference characters are determined to be the B characters.

7. The device according to claim 6, characterized in that The determining unit is further configured to determine a third table if the length indicated by the ruler information exceeds the range displayed on the interface, wherein the third table is a portion of the first table that exceeds the range displayed on the interface; The conversion unit is further used to transfer the third table to the interface range; and determine B characters on the third table according to preset intervals.

8. The device according to claim 6 or 7, characterized in that The first table also includes first data, the first data is text information, and the conversion unit is specifically used to: Determine the Unicode code corresponding to the text information and calculate the character length; Select D characters greater than or equal to the character length and input them into the blank character group to obtain a second table, D≤B, and D is a positive integer.

9. The device according to claim 8, characterized in that The first data is color information, and the conversion unit is specifically used for: Determine the Unicode code corresponding to the color information to obtain the color character; The color character is added to the B characters according to the preset position information to obtain a second table.

10. A computer device, characterized in that: The computer device comprises a processor and a memory: The memory is used to store program codes; the processor is used to execute the table processing method according to any one of claims 1 to 5 according to instructions in the program codes.

11. A computer-readable storage medium, wherein instructions are stored in the computer-readable storage medium, and when the computer-readable storage medium is run on a computer, the computer is enabled to execute the table processing method according to any one of claims 1 to 5.

12. A computer program product, characterized in that The computer program product includes data table processing instructions, and when the computer program product is run on a computer, the computer is enabled to execute the table processing method according to any one of claims 1 to 5.

Citation Information

Patent Citations

  • Indexing and searching ideographic characters on a networked system of computers

    WO2001090930A1

  • Encoding and decoding method, encoding device and decoding device

    WO2016029801A1