Text display method, device and equipment and storage medium thereof
By identifying and marking regular and uncommon characters in text content, combining location information and target display styles, filtering display characters from the preset text library, solving the problem of uncommon characters display in the electronic version of the document, improving processing efficiency and display quality.
Patent Information
- Application Number
- CN202510286703.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-11
- Publication Date
- 2025-06-10
AI Technical Summary
In the prior art, when generating electronic versions of documents, it is impossible to effectively display rare words, resulting in incomplete display information of documents or slow processing efficiency.
By identifying the content of the text to be displayed, marking regular and uncommon text, determining the text location information, analyzing the text display instructions, filtering the display characters from the preset text library according to the target display style, and displaying them in combination with the position information.
It improves the processing efficiency of electronic version display of documents, ensures that rare words can be fully displayed, avoids the limitations of unified text display processing methods, and is more rational and scientific.
Smart Images

Figure CN120124587A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of text processing and is applied to the scenario of electronic display of documents, and particularly relates to a text display method, device, equipment and its storage medium. Background Art
[0002] Currently, in business scenarios such as financial insurance, bank credit, financial leasing, securities and futures, and medical health and elderly care, the electronic processing of business documents is increasing day by day. For example, the generation of property insurance contracts, medical bills, medical examination forms, etc. With the rapid development of Internet technology, more and more document displays have achieved paperless, replacing paper documents with electronic documents to present to target users.
[0003] In this case, replacing paper documents with electronic documents to present to target users can save a large amount of paper resource consumption. However, there are still certain display problems in presenting document results to users in the form of electronic documents at present. For example, if all the words shown in the document are regular words, the display and processing efficiency of the electronic document is relatively high. However, there are many places that involve the display, printing, etc. of rare Chinese characters, such as some names, addresses, etc. The Chinese character ranges supported by different coding standards and fonts are limited, and it often occurs that the generated document cannot display rare Chinese characters, which easily leads to the problems of incomplete display information or slow processing efficiency of the document. Summary of the Invention
[0004] The purpose of the embodiments of the present application is to propose a text display method, device, equipment and its storage medium to solve the problem that when generating existing documents, the generated document cannot display rare Chinese characters, which easily leads to the problems of incomplete display information or slow processing efficiency of the document.
[0005] In a first aspect, the embodiments of the present application provide a text display method, which adopts the following technical solutions:
[0006] A text display method includes the following steps:
[0007] Identify the text content to be displayed, and mark the regular words and rare words in the text content to be displayed;
[0008] Based on the marking result, determine the position information of all words in the text content to be displayed;
[0009] Parse the text display instruction to determine the target display style of all the words, where the target display style includes font size and font format;
[0010] According to the target display style, corresponding display characters are screened out from a preset character library, and in combination with the position information of all characters in the text content to be displayed respectively, the corresponding display characters are displayed at the target positions.
[0011] In a second aspect, an embodiment of the present application further provides a text display device, which adopts the following technical solution:
[0012] A text display device includes:
[0013] A text marking module, configured to identify the text content to be displayed and mark the regular characters and rare characters in the text content to be displayed;
[0014] A position information determination module, configured to determine the position information of all characters in the text content to be displayed respectively based on the marking result;
[0015] A display instruction parsing module, configured to parse a text display instruction to determine the target display style of all the characters, where the target display style includes font size and font format;
[0016] A display character display module, configured to screen out corresponding display characters from a preset character library according to the target display style, and in combination with the position information of all characters in the text content to be displayed respectively, display the corresponding display characters at the target positions.
[0017] In a third aspect, an embodiment of the present application further provides a computer device, which adopts the following technical solution:
[0018] A computer device includes a memory and a processor, where computer-readable instructions are stored in the memory, and when the processor executes the computer-readable instructions, the steps of the above-mentioned text display method are implemented.
[0019] In a fourth aspect, an embodiment of the present application further provides a computer-readable storage medium, which adopts the following technical solution:
[0020] A computer-readable storage medium, where computer-readable instructions are stored on the computer-readable storage medium, and when the computer-readable instructions are executed by a processor, the steps of the text display method as described above are implemented.
[0021] Compared with the prior art, the embodiments of the present application mainly have the following beneficial effects:
[0022] The text display method described in the embodiments of the present application identifies the text content to be displayed, and marks the regular characters and rare characters in the text content to be displayed; based on the marking results, determines the position information of all characters in the text content to be displayed respectively; parses the text display instruction to determine the target display style of all characters, where the target display style includes font size and font format; according to the target display style, filters out the corresponding display characters from the preset character library, and combines the position information of all characters in the text content to be displayed respectively, and displays the corresponding display characters at the target positions. Applying this method to the electronic display scenario of medical bills or financial bills facilitates subsequent generation and display of electronic version display text respectively according to the regularity and rarity of the character types in the text content to be displayed, thereby improving the processing efficiency and ensuring that the bills can also fully display rare characters. It avoids using a unified text display processing method for all characters, making it more reasonable and scientific. Description of the Drawings
[0023] In order to more clearly illustrate the solutions in the present application, the following will briefly introduce the drawings required for description in the embodiments of the present application. Obviously, the drawings in the following description are some embodiments of the present application. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.
[0024] Figure 1 is an exemplary system architecture diagram to which the present application can be applied;
[0025] Figure 2 is a flowchart of an embodiment of the text display method according to the present application;
[0026] Figure 3 is Figure 2 a flowchart of a specific embodiment of step 201;
[0027] Figure 4 is Figure 3 a flowchart of a specific embodiment of step 303;
[0028] Figure 5 is Figure 2 a flowchart of a specific embodiment of step 202;
[0029] Figure 6 is a flowchart of a specific embodiment of screening and judging rare characters in the text display method described in the present application;
[0030] Figure 7 is a schematic structural diagram of an embodiment of the text display device according to the present application;
[0031] Figure 8 It is a schematic structural diagram of an embodiment of a computer device according to the present application. Detailed implementation manners
[0032] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the technical field to which this application belongs; the terms used in the specification of this application are only for the purpose of describing specific embodiments and are not intended to limit this application; the terms "including" and "having" and any variations thereof in the specification and claims of this application and the above drawings are intended to cover non-exclusive inclusion. The terms "first", "second", etc. in the specification and claims of this application or the above drawings are used to distinguish different objects and not to describe a specific order.
[0033] Referring to "embodiments" herein means that a particular feature, structure, or characteristic described in connection with the embodiments can be included in at least one embodiment of this application. The phrase appears in various places in the specification and does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment mutually exclusive with other embodiments. Those skilled in the art will explicitly and implicitly understand that the embodiments described herein can be combined with other embodiments.
[0034] In order to enable those skilled in the technical field to better understand the solution of this application, the technical solutions in the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings.
[0035] As Figure 1 shown, the system architecture 100 may include a terminal device 101, a network 102, and a server 103. The terminal device 101 may be a laptop computer 1011, a tablet computer 1012, or a mobile phone 1013. The network 102 is a medium for providing a communication link between the terminal device 101 and the server 103. The network 102 may include various connection types, such as wired, wireless communication links, or fiber optic cables, etc.
[0036] A user may use the terminal device 101 to interact with the server 103 through the network 102 to receive or send messages, etc. Various communication client applications may be installed on the terminal device 101, such as a web browser application, a shopping application, a search application, an instant messaging tool, an email client, a social platform software, etc.
[0037] The terminal device 101 can be various electronic devices with a display screen and supporting web browsing. In addition to the laptop computer 1011, the tablet computer 1012, or the mobile phone 1013, the terminal device 101 can also be an e-book reader, an MP3 player (Moving Picture Experts Group Audio Layer III), an MP4 (Moving Picture Experts Group Audio Layer IV) player, a laptop portable computer, a desktop computer, and the like.
[0038] The server 103 can be a server that provides various services, such as a background server that provides support for the pages displayed on the terminal device 101.
[0039] It should be noted that the text display method provided by the embodiments of the present application is generally executed by the server. Correspondingly, the text display device is generally set in the server.
[0040] It should be understood that Figure 1 the numbers of the terminal devices, the network, and the server in
[0041] are merely illustrative. According to the implementation requirements, there can be any number of terminal devices, networks, and servers. Figure 2 Continuing to refer to
[0042] Step 201, identify the text content to be displayed, and mark the regular text and rare text in the text content to be displayed.
[0043] In this embodiment, the text content to be displayed refers to the text content to be presented to the user through an electronic version file. For example, when the user is a medical patient, the text content to be displayed refers to the medical test report results to be presented to the patient user through an electronic version file. Another example is that when the user is an insurance purchaser, the text content to be displayed refers to the electronic insurance policy data to be presented to the insurance purchaser through an electronic version file.
[0044] In this embodiment, for the identification of the text content to be displayed, specifically, the text content to be displayed can be identified by an optical recognition method, or by a text graphics extraction method, or by the encoded characters corresponding to each text character. For example, the GB2312-1980 encoded characters used in Chinese character encoding.
[0045] In this embodiment, the regular characters and rare characters in the text content to be displayed are marked. Specifically, the regular characters in the text content to be displayed can be marked first through a preset regular character recognition library, and then all the remaining unmarked characters in the text content to be displayed are marked as rare characters.
[0046] By recognizing the text content to be displayed, the regular characters and rare characters in the text content to be displayed are marked, so as to subsequently generate and display electronic version display characters respectively according to the regularity and rarity of the character types in the text content to be displayed. This avoids using a unified text display processing method for all characters, making it more reasonable and scientific.
[0047] Step 202: Based on the marking result, determine the position information of all characters in the text content to be displayed.
[0048] In this embodiment, the marking result is actually the row and column information of all characters when they are to be displayed to the user in electronic format after the electronic typesetting of all characters in the text content to be displayed. Specifically, for example: for the user name information "Wang XX" in the text content to be displayed, the surname character "Wang" is displayed at the fourth character in the third row, and the name characters "XX" are displayed at the fifth and sixth characters in the third row.
[0049] Based on the marking result, determine the position information of all characters in the text content to be displayed, so as to subsequently perform electronic display on all characters in the text content to be displayed.
[0050] Step 203: Analyze the text display instruction to determine the target display style of all the characters, where the target display style includes font size and font format.
[0051] In this embodiment, the text display instruction contains the target display style of all characters in the text content to be displayed, and the target display style includes the font size and font format. For example: the font format is regular script, italic, bold, etc., and the font size is 14px or No. 4 font, etc.
[0052] By analyzing the text display instruction, the target display style of all characters contained in the text display instruction is obtained. Generally, the target display style of all characters is adapted to the display interface of the user's display terminal. For example: if the user's display terminal is a mobile phone, then the target display style of all characters is adapted to the mobile phone display interface of the user. This is to facilitate the electronic version file displayed to the user to adapt to the user's interface reading habit.
[0053] Step 204: According to the target display style, filter out corresponding display characters from a preset character library, and combine the position information of all characters in the text content to be displayed respectively, and display the corresponding display characters at the target positions.
[0054] Specifically, according to the target display style, filter out corresponding display characters from a preset character library, and combine the position information of all characters in the text content to be displayed respectively, and display the corresponding display characters at the target positions, so as to generate an electronic document, and then send the electronic document to the user receiver for the user to view.
[0055] In this embodiment, by recognizing the text content to be displayed, mark the regular characters and rare characters in the text content to be displayed; based on the marking result, determine the position information of all characters in the text content to be displayed respectively; parse the text display instruction to determine the target display style of all characters, where the target display style includes font size and font format; according to the target display style, filter out corresponding display characters from a preset character library, and combine the position information of all characters in the text content to be displayed respectively, and display the corresponding display characters at the target positions. Apply the method to the electronic display scenario of medical bills or financial bills, so as to subsequently generate and display electronic version display text respectively according to the regularity and rarity of the character types in the text content to be displayed, thereby improving the processing efficiency and ensuring that the bills can also fully display rare characters. Avoid using a unified text display processing method for all characters, which is more reasonable and scientific.
[0056] Continue to refer to Figure 3 , Figure 3 is Figure 2 The flowchart of a specific embodiment of step 201 includes:
[0057] Step 301: Adopt a text graphics extraction method to extract the text graphics of all characters in the text content to be displayed;
[0058] Specifically, for the text graphics extraction method, optical recognition can be used to extract text graphics, or a neural network method can be combined with RGB pixel values to extract text graphics.
[0059] Step 302: Use a preset regular text graphics library as the retrieval domain, and use the text graphics of each character in the text content to be displayed as the retrieval graphics to perform text graphics retrieval from the retrieval domain;
[0060] In this embodiment, all common regular characters are default preset in the preset regular text graphics library.
[0061] Step 303: Mark the regular characters and rare characters in the text content to be displayed according to the text-graphic retrieval results.
[0062] In this embodiment, by extracting the text graphics of all characters in the text content to be displayed, and then combining a preset regular text-graphic library as the retrieval domain, and using the text graphics of each character in the text content to be displayed as the retrieval graphics for retrieval, the regular characters in the text content to be displayed can be retrieved.
[0063] Continue to refer to Figure 4 , Figure 4 Yes Figure 3 FIG. Figure 3 is a flowchart of a specific embodiment of step 303, including:
[0064] Step 401: Determine whether the text-graphic retrieval result of the current retrieval graphic in the retrieval domain is empty;
[0065] Specifically, since the retrieval domain is a preset regular text-graphic library, assuming that the text-graphic retrieval result of the current retrieval graphic in the retrieval domain is empty, it means that the character corresponding to the current retrieval graphic is not a regular character, and all characters with an empty text-graphic retrieval result in the retrieval domain are uniformly identified as rare characters.
[0066] Step 402: If the text-graphic retrieval result of the current retrieval graphic in the retrieval domain is empty, mark the character corresponding to the current retrieval graphic as a rare character;
[0067] Step 403: If the text-graphic retrieval result of the current retrieval graphic in the retrieval domain is not empty, mark the character corresponding to the current retrieval graphic as a regular character.
[0068] Specifically, after the text-graphic retrieval is completed, the rare characters and regular characters can be marked differently. For example, the row and column information of the rare characters and regular characters can be marked with different distinguishing colors for subsequent targeted processing.
[0069] Continue to refer to Figure 5 , Figure 5 Yes Figure 2 FIG. Figure 2 is a flowchart of a specific embodiment of step 202, including:
[0070] Step 501: Connect a preset text position information difference output interface, where the difference output interface includes a first output interface and a second output interface, and the difference output interface is used to differentially output the position information of regular characters and rare characters;
[0071] Differentiate output interfaces by preset text position information, so as to output the row and column information corresponding to regular text and the row and column information corresponding to rare text respectively at the corresponding output interfaces, facilitating subsequent recognition and text processing.
[0072] Step 502: According to the marking result, identify the row and column information corresponding to all regular texts in the text content to be displayed as the first type of text position information;
[0073] Step 503: According to the marking result, identify the row and column information corresponding to all rare texts in the text content to be displayed as the second type of text position information;
[0074] Step 504: Output the first type of text position information and the second type of text position information based on the differentiated output interface to obtain a text position information output result;
[0075] Step 505: Determine the position information of all texts in the text content to be displayed based on the text position information output result.
[0076] In this embodiment, the step of outputting the first type of text position information and the second type of text position information based on the differentiated output interface to obtain a text position information output result specifically includes: outputting the first type of text position information through the first output interface and outputting the second type of text position information through the second output interface, and serializing and organizing the text position information according to the row and column information to obtain the serialized and organized result as the output result, or outputting the second type of text position information through the first output interface and outputting the first type of text position information through the second output interface, and serializing and organizing the text position information according to the row and column information to obtain the serialized and organized result as the output result.
[0077] In this embodiment, the step of screening out corresponding display characters from a preset text library according to the target display style and combining the position information of all texts in the text content to be displayed respectively, and displaying the corresponding display characters at the target positions specifically includes: screening out corresponding display characters from a preset regular text character display library according to the target display style of regular texts, and combining the position information of all regular texts in the text content to be displayed respectively, and displaying the corresponding display characters at the target positions; screening out corresponding display characters from a preset rare text character display library according to the target display style of rare texts, and combining the position information of all rare texts in the text content to be displayed respectively, and displaying the corresponding display characters at the target positions.
[0078] In this embodiment, the text display characters included in the preset conventional text character display library and the preset rare text character display library are text characters pre-encoded according to different font sizes and font formats, such as: regular script, Song typeface, etc.
[0079] Continue to refer to Figure 6 , in some alternative implementation manners, during the execution of step 204, specifically, before the step of combining the position information of all rare characters in the text content to be displayed and displaying the corresponding display characters at the target positions, the method further includes a rare character screening and judgment step. Figure 6 It is a flowchart of a specific embodiment for screening and judging rare characters in the text display method of the present application, including the following steps:
[0080] Step 601, identify whether there is a null value in the corresponding display characters screened from the preset rare text character display library;
[0081] Step 602, if there is a null value in the corresponding display characters screened from the preset rare text character display library, then identify the corresponding rare text as the target rare text;
[0082] Specifically, if there is a null value in the corresponding display characters screened from the preset rare text character display library, it means that the preset rare text character display library does not contain the display characters corresponding to the corresponding display characters, that is, the target rare text is a new rare character and there is no previous usage record in the preset rare text character display library.
[0083] Step 603, obtain the text graphic of the target rare text, and adjust the shape and style of the text graphic through the target display style of the target rare text to obtain the adjusted text graphic;
[0084] Specifically, the step of obtaining the text graphic of the target rare text and adjusting the shape and style of the text graphic through the target display style of the target rare text to obtain the adjusted text graphic, in essence, is also to perform encoding correction through the font size and font format corresponding to the target display character, so as to obtain the corresponding corrected and adjusted text graphic.
[0085] Step 604, display the adjusted text graphic at the display position corresponding to the target rare text, and cache the adjusted text graphic into the rare text character display library.
[0086] Specifically, displaying the adjusted text graphics at the display position corresponding to the target rare character realizes presenting the new rare character to the user in electronic form. In addition, caching the adjusted text graphics in the rare character display library also facilitates the reuse of the rare characters in the future.
[0087] This application identifies the text content to be displayed, marks the common characters and rare characters in the text content to be displayed; based on the marking results, determines the position information of all characters in the text content to be displayed respectively; parses the text display instruction to determine the target display styles of all characters, where the target display styles include font size and font format; according to the target display styles, filters out the corresponding display characters from the preset character library, and combines the position information of all characters in the text content to be displayed respectively, and displays the corresponding display characters at the target positions. Applying this method to the electronic display scenarios of medical bills or financial bills facilitates subsequent generation and display of electronic display text respectively according to the commonness and rarity of the character types in the text content to be displayed, thereby improving the processing efficiency and ensuring that the bills can also fully display rare characters. It avoids using a unified text display processing method for all characters, making it more reasonable and scientific.
[0088] The embodiments of this application can acquire and process relevant data based on artificial intelligence technology. Among them, artificial intelligence (AI) is a theory, method, technology, and application system that uses digital computers or machines controlled by digital computers to simulate, extend, and expand human intelligence, perceive the environment, acquire knowledge, and use knowledge to obtain the best results.
[0089] The basic technologies of artificial intelligence generally include technologies such as sensors, dedicated artificial intelligence chips, cloud computing, distributed storage, big data processing technology, operation / interaction systems, and mechatronics. The software technologies of artificial intelligence mainly include several major directions such as computer vision technology, robotics, biometric technology, speech processing technology, natural language processing technology, and machine learning / deep learning.
[0090] In the embodiments of the present application, by identifying the text content to be displayed, the common characters and rare characters in the text content to be displayed are marked; based on the marking results, the position information of all characters in the text content to be displayed is determined respectively; the text display instruction is parsed to determine the target display styles of all characters, where the target display styles include font size and font format; according to the target display styles, the corresponding display characters are screened out from the preset character library, and combined with the position information of all characters in the text content to be displayed respectively, the corresponding display characters are displayed at the target positions. Applying the method to the electronic display scenarios of medical bills or financial bills is convenient for subsequent generation and display of electronic version display text respectively according to the commonness and rarity of the character types in the text content to be displayed, thereby improving the processing efficiency and ensuring that the bills can also fully display rare characters. It avoids adopting a unified character display processing method for all characters, which is more reasonable and scientific.
[0091] Further referring Figure 7 to Figure 2 as an implementation of the method shown above, the present application provides an embodiment of a text display device, and this device embodiment corresponds to Figure 2 the method embodiment shown, and this device can be specifically applied to various electronic devices.
[0092] As Figure 7 shown, the text display device 700 described in this embodiment includes: a text marking module 701, a position information determination module 702, a display instruction parsing module 703, and a display character display module 704. Among them:
[0093] The text marking module 701 is configured to identify the text content to be displayed and mark the common characters and rare characters in the text content to be displayed;
[0094] The position information determination module 702 is configured to determine the position information of all characters in the text content to be displayed respectively based on the marking results;
[0095] The display instruction parsing module 703 is configured to parse the text display instruction to determine the target display styles of all characters, where the target display styles include font size and font format;
[0096] The display character display module 704 is configured to screen out the corresponding display characters from the preset character library according to the target display styles, and combine with the position information of all characters in the text content to be displayed respectively, and display the corresponding display characters at the target positions.
[0097] This application identifies the text content to be displayed, and marks the common characters and rare characters in the text content to be displayed; based on the marking results, determines the position information of all characters in the text content to be displayed respectively; parses the text display instruction to determine the target display styles of all characters, where the target display styles include font size and font format; according to the target display styles, filters out the corresponding display characters from the preset character library, and combines the position information of all characters in the text content to be displayed respectively, and displays the corresponding display characters at the target positions. Applying the method to the electronic display scenario of medical documents or financial documents facilitates subsequent generation and display of electronic version display text respectively according to the commonness and rarity of the character types in the text content to be displayed, thereby improving the processing efficiency and ensuring that the documents can also fully display rare characters. It avoids using a unified character display processing method for all characters, which is more reasonable and scientific.
[0098] In this embodiment, the text marking module 701 includes a text graphic extraction unit, a text graphic retrieval unit, and a text marking processing unit. Among them:
[0099] The text graphic extraction unit is used to extract the text graphics of all characters in the text content to be displayed by using the text graphic extraction method;
[0100] The text graphic retrieval unit is used to use the preset common text graphic library as the retrieval domain, and use the text graphic of each character in the text content to be displayed as the retrieval graphic to perform text graphic retrieval from the retrieval domain;
[0101] The text marking processing unit is used to perform marking processing on the common characters and rare characters in the text content to be displayed according to the text graphic retrieval results.
[0102] In this embodiment, the text marking processing unit includes a judgment subunit, a first marking subunit, and a second marking subunit. Among them:
[0103] The judgment subunit is used to judge whether the text graphic retrieval result of the current retrieval graphic in the retrieval domain is empty;
[0104] The first marking subunit is used to mark the character corresponding to the current retrieval graphic as a rare character if the text graphic retrieval result of the current retrieval graphic in the retrieval domain is empty;
[0105] The second marking subunit is used to mark the character corresponding to the current retrieval graphic as a common character if the text graphic retrieval result of the current retrieval graphic in the retrieval domain is not empty.
[0106] In this embodiment, the position information determination module 702 includes a differential output interface connection unit, a regular text row and column information recognition unit, a rare text row and column information recognition unit, a position information differential output unit, and a text position information determination unit. Specifically:
[0107] The differential output interface connection unit is used to connect to a preset text position information differential output interface. Among them, the differential output interface includes a first output interface and a second output interface, and the differential output interface is used to differentially output the position information of regular text and rare text;
[0108] The regular text row and column information recognition unit is used to recognize the row and column information corresponding to all regular text in the to-be-displayed text content as the first type of text position information according to the marking result;
[0109] The rare text row and column information recognition unit is used to recognize the row and column information corresponding to all rare text in the to-be-displayed text content as the second type of text position information according to the marking result;
[0110] The position information differential output unit is used to output the first type of text position information and the second type of text position information based on the differential output interface to obtain a text position information output result;
[0111] The text position information determination unit is used to determine the position information of all text in the to-be-displayed text content based on the text position information output result.
[0112] In this embodiment, the display character display module 704 includes a regular text display unit and a rare text display unit. Specifically:
[0113] The regular text display unit is used to screen out corresponding display characters from a preset regular text character display library according to the target display style of regular text, and combine the position information of all regular text in the to-be-displayed text content respectively, and display the corresponding display characters at the target position;
[0114] The rare text display unit is used to screen out corresponding display characters from a preset rare text character display library according to the target display style of rare text, and combine the position information of all rare text in the to-be-displayed text content respectively, and display the corresponding display characters at the target position.
[0115] In this embodiment, the text display device 700 further includes a screening result recognition module, a target rare text recognition module, a text graphics adjustment module, and a post-adjustment processing module. Specifically:
[0116] The screening result recognition module is used to recognize whether there is a null value in the corresponding display characters screened from the preset rare character display library;
[0117] The target rare character recognition module is used to recognize the corresponding rare character as the target rare character if there is a null value in the corresponding display characters screened from the preset rare character display library;
[0118] The text graphics adjustment module is used to obtain the text graphics of the target rare character, and perform shape and style adjustment on the text graphics through the target display style of the target rare character to obtain the adjusted text graphics;
[0119] The post-adjustment processing module is used to display the adjusted text graphics at the corresponding display position of the target rare character, and cache the adjusted text graphics into the rare character display library.
[0120] Those of ordinary skill in the art can understand that all or part of the processes in the methods of the above embodiments can be completed by instructing relevant hardware through computer-readable instructions. These computer-readable instructions can be stored in a computer-readable storage medium. When the program is executed, it can include the processes of the embodiments of the above methods. Among them, the aforementioned storage medium can be a non-volatile storage medium such as a magnetic disk, an optical disc, a read-only memory (ROM), etc., or a random access memory (RAM), etc.
[0121] It should be understood that although the steps in the flowchart of the accompanying drawings are shown in sequence according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless there is a clear indication in this article, the execution of these steps has no strict order limit, and they can be executed in other orders. Moreover, at least a part of the steps in the flowchart of the accompanying drawings may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily executed at the same time, but can be executed at different times. Their execution order is not necessarily sequential, but can be executed alternately or alternately with at least a part of other steps or sub-steps or stages of other steps.
[0122] To solve the above technical problems, the embodiments of the present application also provide a computer device. For details, please refer to Figure 8 , Figure 8 which is the basic structural block diagram of the computer device in this embodiment.
[0123] The computer device 8 includes a memory 8a, a processor 8b, and a network interface 8c that are communicatively connected to each other through a system bus. It should be noted that Figure 8Only a computer device 8 with a component memory 8a, a processor 8b, and a network interface 8c is shown, but it should be understood that it is not required to implement all the shown components, and more or fewer components can be implemented alternatively. Among them, those skilled in the art of this technology can understand that the computer device here is a device that can automatically perform numerical calculations and / or information processing according to pre-set or stored instructions, and its hardware includes but is not limited to microprocessors, application specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), digital signal processors (DSPs), embedded devices, etc.
[0124] The computer device can be a computing device such as a desktop computer, a notebook, a palm computer, and a cloud server. The computer device can interact with the user through a keyboard, a mouse, a remote control, a touchpad, or a voice control device, etc.
[0125] The memory 8a at least includes one type of readable storage medium, and the readable storage medium includes flash memory, a hard disk, a multimedia card, a card-type memory (such as an SD or DX memory, etc.), a random access memory (RAM), a static random access memory (SRAM), a read-only memory (ROM), an electrically erasable programmable read-only memory (EEPROM), a programmable read-only memory (PROM), a magnetic memory, a magnetic disk, an optical disk, etc. In some embodiments, the memory 8a can be an internal storage unit of the computer device 8, such as the hard disk or memory of the computer device 8. In other embodiments, the memory 8a can also be an external storage device of the computer device 8, such as a plug-in hard disk equipped on the computer device 8, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. Of course, the memory 8a can also include both the internal storage unit and the external storage device of the computer device 8. In this embodiment, the memory 8a is generally used to store the operating system and various application software installed on the computer device 8, such as computer-readable instructions of a text display method, etc. In addition, the memory 8a can also be used to temporarily store various data that have been output or will be output.
[0126] In some embodiments, the processor 8b may be a Central Processing Unit (CPU), a controller, a microcontroller, a microprocessor, or other data processing chips. The processor 8b is generally used to control the overall operation of the computer device 8. In this embodiment, the processor 8b is used to run the computer-readable instructions stored in the memory 8a or process data, such as running the computer-readable instructions of the text display method.
[0127] The network interface 8c may include a wireless network interface or a wired network interface. The network interface 8c is generally used to establish a communication connection between the computer device 8 and other electronic devices.
[0128] The computer device proposed in this embodiment belongs to the field of text processing technology and is applied to the electronic display scenarios of medical documents or financial documents. This application identifies the text content to be displayed, marks the regular characters and rare characters in the text content to be displayed; based on the marking results, determines the position information of all characters in the text content to be displayed respectively; parses the text display instruction to determine the target display styles of all the characters, where the target display styles include font size and font format; according to the target display styles, filters out the corresponding display characters from a preset character library, and combines the position information of all characters in the text content to be displayed respectively, and displays the corresponding display characters at the target positions. Applying the method to the electronic display scenarios of medical documents or financial documents facilitates subsequent generation and display of electronic version display text respectively according to the regularity and rarity of the character types in the text content to be displayed, thereby improving the processing efficiency and ensuring that the rare characters can also be fully displayed in the documents. It avoids using a unified text display processing method for all characters, making it more reasonable and scientific.
[0129] This application also provides another implementation manner, that is, to provide a computer-readable storage medium storing computer-readable instructions that can be executed by a processor to cause the processor to execute the steps of the text display method as described above.
[0130] The computer-readable storage medium proposed in this embodiment belongs to the technical field of text processing and is applied to the electronic display scenarios of medical documents or financial documents. This application identifies the text content to be displayed, marks the regular characters and rare characters in the text content to be displayed; based on the marking results, determines the position information of all characters in the text content to be displayed; parses the text display instruction to determine the target display styles of all characters, where the target display styles include font size and font format; according to the target display styles, filters out the corresponding display characters from the preset character library, and combines the position information of all characters in the text content to be displayed, and displays the corresponding display characters at the target positions. Applying the method to the electronic display scenarios of medical documents or financial documents facilitates subsequent generation and display of electronic version display text respectively according to the regularity and rarity of the character types in the text content to be displayed, thereby improving the processing efficiency and ensuring that the rare characters can also be fully displayed in the documents. It avoids using a unified text display processing method for all characters, making it more reasonable and scientific.
[0131] Through the description of the above embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus a necessary general hardware platform. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of this application, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions for causing a terminal device (which can be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in various embodiments of this application.
[0132] Obviously, the above-described embodiments are only a part of the embodiments of this application, rather than all of the embodiments. The accompanying drawings show the preferred embodiments of this application, but do not limit the patent scope of this application. This application can be implemented in many different forms. On the contrary, the purpose of providing these embodiments is to make the understanding of the disclosed content of this application more thorough and comprehensive. Although this application has been described in detail with reference to the foregoing embodiments, for those skilled in the art, they can still modify the technical solutions described in the foregoing specific embodiments or equivalently replace some of the technical features. Any equivalent structure directly or indirectly using the content of this application's specification and drawings in other related technical fields is similarly within the scope of the patent protection of this application. The non-company software tools or components that appear in the embodiments of this application are only for illustration and do not represent actual use.
Claims
1. A text display method, characterized in that: The steps include: Identify the text content to be displayed, and mark the common characters and uncommon characters in the text content to be displayed; Based on the marking results, determining the position information of all characters in the text content to be displayed; Parsing the text display instruction to determine the target display style of all the text, wherein the target display style includes font size and font format; According to the target display style, corresponding display characters are selected from a preset character library, and the corresponding display characters are displayed at the target position in combination with the position information of all characters in the text content to be displayed.
2. The text display method according to claim 1, characterized in that: The step of identifying the text content to be displayed and marking the common characters and uncommon characters in the text content to be displayed specifically includes: Using a text graphic extraction method, extracting text graphics of all the text in the text content to be displayed; Using a preset conventional text graphic library as a search domain, using the text graphic of each word in the text content to be displayed as a search graphic, and performing text graphic search from the search domain; According to the text pattern retrieval result, the regular characters and uncommon characters in the text content to be displayed are marked.
3. The text display method according to claim 2, characterized in that: The step of marking the common characters and uncommon characters in the text content to be displayed according to the character pattern retrieval result specifically includes: Determine whether the text graphic search result of the current search graphic in the search domain is empty; If the text graphic search result of the current search graphic in the search domain is empty, then mark the text corresponding to the current search graphic as an uncommon text; If the text graphic search result of the current search graphic in the search domain is not empty, the text corresponding to the current search graphic is marked as regular text.
4. The text display method according to claim 1, characterized in that: The step of determining the position information of all characters in the text content to be displayed based on the marking result specifically includes: Connecting to a preset text position information distinguishing output interface, wherein the distinguishing output interface includes a first output interface and a second output interface, and the distinguishing output interface is used to distinguish and output the position information of conventional text and uncommon text; According to the marking result, identifying row and column information corresponding to all regular characters in the text content to be displayed as first type of character position information; According to the marking result, identifying the row and column information corresponding to all the rare characters in the text content to be displayed as the second type of character position information; Outputting the first category of text position information and the second category of text position information based on the difference output interface to obtain a text position information output result; Based on the text position information output result, the position information of all the characters in the text content to be displayed is determined.
5. The text display method according to claim 4, characterized in that: The step of outputting the first type of text position information and the second type of text position information based on the difference output interface to obtain the text position information output result specifically includes: The first type of text position information is output through the first output interface and the second type of text position information is output through the second output interface, and the text position information is serialized and sorted according to row and column information to obtain the serialization result as the output result, or, The second type of text position information is output through the first output interface and the first type of text position information is output through the second output interface, and the text position information is serialized according to row and column information to obtain the serialization result as the output result.
6. The text display method according to claim 2 or 3, characterized in that: The step of selecting corresponding display characters from a preset character library according to the target display style, and displaying the corresponding display characters at the target position in combination with the position information of all characters in the text content to be displayed, specifically includes: According to the target display style of the conventional characters, corresponding display characters are selected from a preset conventional character display library, and the corresponding display characters are displayed at the target position in combination with the position information of all the conventional characters in the text content to be displayed; According to the target display style of the rare characters, the corresponding display characters are selected from the preset rare character display library, and the corresponding display characters are displayed at the target position in combination with the position information of all the rare characters in the text content to be displayed.
7. The text display method according to claim 6, characterized in that: Before executing the step of combining the position information of all the uncommon characters in the text content to be displayed and displaying the corresponding display characters at the target position, the method further includes: Identify whether a corresponding display character selected from a preset rare text character display library has a null value; If there is a null value for the corresponding display character selected from the preset rare character display library, the corresponding rare character is identified as the target rare character; Acquire a character graphic of a target uncommon character, and adjust the shape and style of the character graphic according to a target display style of the target uncommon character to acquire an adjusted character graphic; The adjusted text graphic is displayed at a display position corresponding to the target uncommon text, and the adjusted text graphic is cached in the uncommon text character display library.
8. A text display device, characterized in that: include: A text marking module, used to identify the text content to be displayed, and mark the regular characters and uncommon characters in the text content to be displayed; A position information determination module, used to determine the position information of all characters in the text content to be displayed based on the marking result; A display instruction parsing module, used for parsing text display instructions to determine a target display style of all the characters, wherein the target display style includes a font size and a font format; The display character display module is used to select corresponding display characters from a preset character library according to the target display style, and display the corresponding display characters at the target position in combination with the position information of all characters in the text content to be displayed.
9. A computer device, characterized in that: The method comprises a memory and a processor, wherein the memory stores computer-readable instructions, and the processor implements the steps of the text display method according to any one of claims 1 to 7 when executing the computer-readable instructions.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-readable instructions, and when the computer-readable instructions are executed by a processor, the steps of the text display method according to any one of claims 1 to 7 are implemented.